Small fixes
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
ad450e2798
commit
2e3fe1dcd3
@ -47,6 +47,17 @@ $max_expiry_time = $pollService->maxExpiryDate();
|
|||||||
|
|
||||||
$form = unserialize($_SESSION['form']);
|
$form = unserialize($_SESSION['form']);
|
||||||
|
|
||||||
|
// The poll format is AUTRE (other) if we are in this file
|
||||||
|
if (!isset($form->format)) {
|
||||||
|
$form->format = 'A';
|
||||||
|
}
|
||||||
|
|
||||||
|
// The poll format is AUTRE (other)
|
||||||
|
if ($form->format !== 'A') {
|
||||||
|
$form->format = 'A';
|
||||||
|
$form->clearChoices();
|
||||||
|
}
|
||||||
|
|
||||||
if (!isset($form->title) || !isset($form->admin_name) || ($config['use_smtp'] && !isset($form->admin_mail))) {
|
if (!isset($form->title) || !isset($form->admin_name) || ($config['use_smtp'] && !isset($form->admin_mail))) {
|
||||||
$step = 1;
|
$step = 1;
|
||||||
} elseif (isset($_POST['confirmation'])) {
|
} elseif (isset($_POST['confirmation'])) {
|
||||||
@ -57,12 +68,6 @@ if (!isset($form->title) || !isset($form->admin_name) || ($config['use_smtp'] &&
|
|||||||
$step = 3;
|
$step = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The poll format is AUTRE (other)
|
|
||||||
if ($form->format !== 'A') {
|
|
||||||
$form->format = 'A';
|
|
||||||
$form->clearChoices();
|
|
||||||
}
|
|
||||||
|
|
||||||
switch ($step) {
|
switch ($step) {
|
||||||
case 2: // Step 2/4 : Select choices of the poll
|
case 2: // Step 2/4 : Select choices of the poll
|
||||||
$choices = $form->getChoices();
|
$choices = $form->getChoices();
|
||||||
|
@ -51,7 +51,7 @@ if (!isset($form->format)) {
|
|||||||
$form->format = 'D';
|
$form->format = 'D';
|
||||||
}
|
}
|
||||||
// If we come from another format, we need to clear choices
|
// If we come from another format, we need to clear choices
|
||||||
if (isset($form->format) && $form->format !== 'D') {
|
if ($form->format !== 'D') {
|
||||||
$form->format = 'D';
|
$form->format = 'D';
|
||||||
$form->clearChoices();
|
$form->clearChoices();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user