Merge branch 'fix-value-max-validation' into 'develop'

Fix ValueMax validation and improve error messages for username format

Closes #295 et #290

See merge request framasoft/framadate!263
This commit is contained in:
Thomas Citharel 2018-03-29 12:56:07 +02:00
commit 004fda4f96
13 changed files with 54 additions and 39 deletions

View File

@ -78,10 +78,12 @@ class InputService {
} }
public function filterInteger($int) { public function filterInteger($int) {
if (filter_var($int, FILTER_VALIDATE_INT)) { return filter_var($int, FILTER_VALIDATE_INT);
return $int;
} }
return null;
public function filterValueMax($int)
{
return $this->filterInteger($int) >= 1;
} }
public function filterBoolean($boolean) { public function filterBoolean($boolean) {

View File

@ -57,7 +57,7 @@ if ($goToStep2) {
$title = $inputService->filterTitle($_POST['title']); $title = $inputService->filterTitle($_POST['title']);
$use_ValueMax = isset($_POST['use_ValueMax']) ? $inputService->filterBoolean($_POST['use_ValueMax']) : false; $use_ValueMax = isset($_POST['use_ValueMax']) ? $inputService->filterBoolean($_POST['use_ValueMax']) : false;
$ValueMax = $use_ValueMax === true ? $inputService->filterInteger($_POST['ValueMax']) : null; $ValueMax = $use_ValueMax === true ? $inputService->filterValueMax($_POST['ValueMax']) : null;
$use_customized_url = isset($_POST['use_customized_url']) ? $inputService->filterBoolean($_POST['use_customized_url']) : false; $use_customized_url = isset($_POST['use_customized_url']) ? $inputService->filterBoolean($_POST['use_customized_url']) : false;
$customized_url = $use_customized_url === true ? $inputService->filterId($_POST['customized_url']) : null; $customized_url = $use_customized_url === true ? $inputService->filterId($_POST['customized_url']) : null;
@ -98,11 +98,9 @@ if ($goToStep2) {
$_SESSION['form']->use_password = ($use_password !== null); $_SESSION['form']->use_password = ($use_password !== null);
$_SESSION['form']->results_publicly_visible = ($results_publicly_visible !== null); $_SESSION['form']->results_publicly_visible = ($results_publicly_visible !== null);
if ($config['use_smtp'] === true) { if ($config['use_smtp'] === true && empty($mail)) {
if (empty($mail)) {
$error_on_mail = true; $error_on_mail = true;
} }
}
if ($title !== $_POST['title']) { if ($title !== $_POST['title']) {
$error_on_title = true; $error_on_title = true;
@ -117,11 +115,8 @@ if ($goToStep2) {
} }
} }
if ($use_ValueMax) { if ($use_ValueMax && $ValueMax === false) {
if ($use_ValueMax === false) {
$error_on_ValueMax = true; $error_on_ValueMax = true;
$error_on_customized_url_msg = __('Error', 'Mauvaise valeur');
}
} }
if ($name !== $_POST['name']) { if ($name !== $_POST['name']) {
@ -234,7 +229,7 @@ if (!empty($_POST[GO_TO_STEP_2])) {
if ($error_on_customized_url) { if ($error_on_customized_url) {
$errors['customized_url']['aria'] = 'aria-describeby="customized_url" '; $errors['customized_url']['aria'] = 'aria-describeby="customized_url" ';
$errors['customized_url']['class'] = ' has-error'; $errors['customized_url']['class'] = ' has-error';
$errors['customized_url']['msg'] = isset($error_on_customized_url_msg) ? $error_on_customized_url_msg : __('Error', 'Something is wrong with the format'); $errors['customized_url']['msg'] = isset($error_on_customized_url_msg) ? $error_on_customized_url_msg : __('Error', "Something is wrong with the format: customized urls should only consist of alphanumeric characters and hyphens.");
} }
if ($error_on_description) { if ($error_on_description) {
@ -250,7 +245,7 @@ if (!empty($_POST[GO_TO_STEP_2])) {
} elseif ($error_on_name) { } elseif ($error_on_name) {
$errors['name']['aria'] = 'aria-describeby="poll_name_error" '; $errors['name']['aria'] = 'aria-describeby="poll_name_error" ';
$errors['name']['class'] = ' has-error'; $errors['name']['class'] = ' has-error';
$errors['name']['msg'] = __('Error', 'Something is wrong with the format'); $errors['name']['msg'] = __('Error', "Something is wrong with the format: name shouldn't have any spaces before or after");
} }
if (empty($_POST['mail'])) { if (empty($_POST['mail'])) {
@ -276,7 +271,7 @@ if (!empty($_POST[GO_TO_STEP_2])) {
if ($error_on_ValueMax) { if ($error_on_ValueMax) {
$errors['ValueMax']['aria'] = 'aria-describeby="poll_ValueMax" '; $errors['ValueMax']['aria'] = 'aria-describeby="poll_ValueMax" ';
$errors['ValueMax']['class'] = ' has-error'; $errors['ValueMax']['class'] = ' has-error';
$errors['ValueMax']['msg'] = __('Error', 'error on ValueMax'); $errors['ValueMax']['msg'] = __('Error', 'Error on amount of voters limitation : value must be an integer greater than 0');
} }
} }
@ -285,6 +280,7 @@ $useRemoteUser = USE_REMOTE_USER && isset($_SERVER['REMOTE_USER']);
$smarty->assign('title', $title); $smarty->assign('title', $title);
$smarty->assign('useRemoteUser', $useRemoteUser); $smarty->assign('useRemoteUser', $useRemoteUser);
$smarty->assign('errors', $errors); $smarty->assign('errors', $errors);
$smarty->assign('advanced_errors', $goToStep2 && ($error_on_ValueMax || $error_on_customized_url || $error_on_password || $error_on_password_repeat));
$smarty->assign('use_smtp', $config['use_smtp']); $smarty->assign('use_smtp', $config['use_smtp']);
$smarty->assign('default_to_marldown_editor', $config['markdown_editor_by_default']); $smarty->assign('default_to_marldown_editor', $config['markdown_editor_by_default']);
$smarty->assign('goToStep2', GO_TO_STEP_2); $smarty->assign('goToStep2', GO_TO_STEP_2);

View File

@ -328,7 +328,7 @@
"All voters can modify any vote": "All voters can modify any vote", "All voters can modify any vote": "All voters can modify any vote",
"Customize the URL": "Customize the URL", "Customize the URL": "Customize the URL",
"Go to step 2": "الإنتقال إلى الخطوة 2", "Go to step 2": "الإنتقال إلى الخطوة 2",
"Limit the ammount of voters per option": "Limit the amount of voters per option", "Limit the amount of voters per option": "Limit the amount of voters per option",
"More informations here:": "المزيد من التفاصيل هنا :", "More informations here:": "المزيد من التفاصيل هنا :",
"Only the poll maker can see the poll's results": "Only the poll maker can see the poll results", "Only the poll maker can see the poll's results": "Only the poll maker can see the poll results",
"Optional parameters": "Optional parameters", "Optional parameters": "Optional parameters",

View File

@ -328,7 +328,7 @@
"All voters can modify any vote": "An holl vouezhierien a c'hall kemmañ an holl vouezhioù", "All voters can modify any vote": "An holl vouezhierien a c'hall kemmañ an holl vouezhioù",
"Customize the URL": "Personelaat an ere", "Customize the URL": "Personelaat an ere",
"Go to step 2": "Mont d'ar bazenn 2", "Go to step 2": "Mont d'ar bazenn 2",
"Limit the ammount of voters per option": "Limit the amount of voters per option", "Limit the amount of voters per option": "Limit the amount of voters per option",
"More informations here:": "Titouroù ouzhpenn amañ:", "More informations here:": "Titouroù ouzhpenn amañ:",
"Only the poll maker can see the poll's results": "N'eus nemet krouer ar sontadeg a c'hell gwelet an disoc'hoù", "Only the poll maker can see the poll's results": "N'eus nemet krouer ar sontadeg a c'hell gwelet an disoc'hoù",
"Optional parameters": "Arventennoù diret", "Optional parameters": "Arventennoù diret",

View File

@ -328,7 +328,7 @@
"All voters can modify any vote": "Jeder Teilnehmer kann jede abgegebene Wertung ändern", "All voters can modify any vote": "Jeder Teilnehmer kann jede abgegebene Wertung ändern",
"Customize the URL": "Link anpassen", "Customize the URL": "Link anpassen",
"Go to step 2": "Weiter zum 2. Schritt", "Go to step 2": "Weiter zum 2. Schritt",
"Limit the ammount of voters per option": "Begrenzung der anzahl der aähler pro option", "Limit the amount of voters per option": "Begrenzung der anzahl der aähler pro option",
"More informations here:": "DE_Plus d'informations ici :", "More informations here:": "DE_Plus d'informations ici :",
"Only the poll maker can see the poll's results": "Einzig der Autor der Abstimmung kann die Ergebnisse einsehen", "Only the poll maker can see the poll's results": "Einzig der Autor der Abstimmung kann die Ergebnisse einsehen",
"Optional parameters": "Optionale Einstellungen", "Optional parameters": "Optionale Einstellungen",

View File

@ -142,7 +142,10 @@
"Poll id already used": "Identifier is already used", "Poll id already used": "Identifier is already used",
"Something is going wrong...": "Something has gone wrong...", "Something is going wrong...": "Something has gone wrong...",
"Something is wrong with the format": "Something is wrong with the format", "Something is wrong with the format": "Something is wrong with the format",
"Something is wrong with the format: customized urls should only consist of alphanumeric characters and hyphens.": "Something is wrong with the format: customized urls should only consist of alphanumeric characters and hyphens.",
"Something is wrong with the format: name shouldn't have any spaces before or after": "Something is wrong with the format: name shouldn't have any spaces before or after",
"The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.", "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.",
"Error on amount of voters limitation : value must be an integer greater than 0": "Error on amount of voters limitation : value must be an integer greater than 0",
"The column already exists": "The column already exists", "The column already exists": "The column already exists",
"The name is invalid.": "The name is invalid.", "The name is invalid.": "The name is invalid.",
"The name you've chosen already exist in this poll!": "The name you've chosen already exists in this poll!", "The name you've chosen already exist in this poll!": "The name you've chosen already exists in this poll!",
@ -328,7 +331,7 @@
"All voters can modify any vote": "All voters can modify any vote", "All voters can modify any vote": "All voters can modify any vote",
"Customize the URL": "Customize the URL", "Customize the URL": "Customize the URL",
"Go to step 2": "Go to step 2", "Go to step 2": "Go to step 2",
"Limit the ammount of voters per option": "Limit the amount of voters per option", "Limit the amount of voters per option": "Limit the amount of voters per option",
"More informations here:": "More informations here:", "More informations here:": "More informations here:",
"Only the poll maker can see the poll's results": "Only the poll maker can see the poll results", "Only the poll maker can see the poll's results": "Only the poll maker can see the poll results",
"Optional parameters": "Optional parameters", "Optional parameters": "Optional parameters",

View File

@ -328,7 +328,7 @@
"All voters can modify any vote": "Los votos pueden ser modificados por cualquiera", "All voters can modify any vote": "Los votos pueden ser modificados por cualquiera",
"Customize the URL": "ES_Personnaliser le lien", "Customize the URL": "ES_Personnaliser le lien",
"Go to step 2": "Ir al paso número 2", "Go to step 2": "Ir al paso número 2",
"Limit the ammount of voters per option": "Limitar el número de votantes por opción", "Limit the amount of voters per option": "Limitar el número de votantes por opción",
"More informations here:": "ES_Plus d'informations ici :", "More informations here:": "ES_Plus d'informations ici :",
"Only the poll maker can see the poll's results": "Solo el creador de la encuesta puede ver los resultados", "Only the poll maker can see the poll's results": "Solo el creador de la encuesta puede ver los resultados",
"Optional parameters": "ES_Paramètres optionnels", "Optional parameters": "ES_Paramètres optionnels",

View File

@ -142,7 +142,10 @@
"Poll id already used": "L'identifiant est déjà utilisé", "Poll id already used": "L'identifiant est déjà utilisé",
"Something is going wrong...": "Quelque chose ne va pas...", "Something is going wrong...": "Quelque chose ne va pas...",
"Something is wrong with the format": "Quelque chose ne va pas avec le format", "Something is wrong with the format": "Quelque chose ne va pas avec le format",
"Something is wrong with the format: customized urls should only consist of alphanumeric characters and hyphens.": "Quelque chose ne va pas avec le format: les urls personalisées devraient contenir uniquement des caractères alphanumériques et des tirets.",
"Something is wrong with the format: name shouldn't have any spaces before or after": "Quelque chose ne va pas avec le format : le nom ne devrait pas contenir d'espaces avant ou après",
"The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "L'adresse saisie n'est pas correcte ! Il faut une adresse électronique valide (par exemple r.stallman@outlock.com) pour recevoir le lien vers le sondage.", "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "L'adresse saisie n'est pas correcte ! Il faut une adresse électronique valide (par exemple r.stallman@outlock.com) pour recevoir le lien vers le sondage.",
"Error on amount of voters limitation : value must be an integer greater than 0": "Erreur sur le nombre maximum de votants : la valeur doit être un entier supérieur à 0",
"The column already exists": "La colonne existe déjà", "The column already exists": "La colonne existe déjà",
"The name is invalid.": "Le nom n'est pas valide.", "The name is invalid.": "Le nom n'est pas valide.",
"The name you've chosen already exist in this poll!": "Le nom que vous avez choisi existe déjà !", "The name you've chosen already exist in this poll!": "Le nom que vous avez choisi existe déjà !",
@ -328,7 +331,7 @@
"All voters can modify any vote": "Tou·te·s les sondé·e·s peuvent modifier tous les votes", "All voters can modify any vote": "Tou·te·s les sondé·e·s peuvent modifier tous les votes",
"Customize the URL": "Personnaliser le lien", "Customize the URL": "Personnaliser le lien",
"Go to step 2": "Aller à l'étape 2", "Go to step 2": "Aller à l'étape 2",
"Limit the ammount of voters per option": "limiter le nombre de votants par option", "Limit the amount of voters per option": "limiter le nombre de votants par option",
"More informations here:": "Plus d'informations ici :", "More informations here:": "Plus d'informations ici :",
"Only the poll maker can see the poll's results": "Seul le ou la créateur·rice du sondage peut voir les résultats", "Only the poll maker can see the poll's results": "Seul le ou la créateur·rice du sondage peut voir les résultats",
"Optional parameters": "Paramètres facultatifs", "Optional parameters": "Paramètres facultatifs",

View File

@ -142,7 +142,10 @@
"Poll id already used": "L'identifiant est déjà utilisé", "Poll id already used": "L'identifiant est déjà utilisé",
"Something is going wrong...": "Quelque chose ne va pas...", "Something is going wrong...": "Quelque chose ne va pas...",
"Something is wrong with the format": "Quelque chose ne va pas avec le format", "Something is wrong with the format": "Quelque chose ne va pas avec le format",
"Something is wrong with the format: customized urls should only consist of alphanumeric characters and hyphens.": "Quelque chose ne va pas avec le format : les urls personalisées devraient contenir uniquement des caractères alphanumériques et des tirets.",
"Something is wrong with the format: name shouldn't have any spaces before or after": "Quelque chose ne va pas avec le format : le nom ne devrait pas contenir d'espaces avant ou après",
"The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "L'adresse saisie n'est pas correcte ! Il faut une adresse électronique valide (par exemple r.stallman@outlock.com) pour recevoir le lien vers le sondage.", "The address is not correct! You should enter a valid email address (like r.stallman@outlock.com) in order to receive the link to your poll.": "L'adresse saisie n'est pas correcte ! Il faut une adresse électronique valide (par exemple r.stallman@outlock.com) pour recevoir le lien vers le sondage.",
"Error on amount of voters limitation : value must be an integer greater than 0": "Erreur sur le nombre maximum de votants : la valeur doit être un entier supérieur à 0",
"The column already exists": "La colonne existe déjà", "The column already exists": "La colonne existe déjà",
"The name is invalid.": "Le nom n'est pas valide.", "The name is invalid.": "Le nom n'est pas valide.",
"The name you've chosen already exist in this poll!": "Le nom que vous avez choisi existe déjà !", "The name you've chosen already exist in this poll!": "Le nom que vous avez choisi existe déjà !",
@ -328,7 +331,7 @@
"All voters can modify any vote": "Tou·te·s les sondé·e·s peuvent modifier tous les votes", "All voters can modify any vote": "Tou·te·s les sondé·e·s peuvent modifier tous les votes",
"Customize the URL": "Personnaliser le lien", "Customize the URL": "Personnaliser le lien",
"Go to step 2": "Aller à l'étape 2", "Go to step 2": "Aller à l'étape 2",
"Limit the ammount of voters per option": "limiter le nombre de votants par option", "Limit the amount of voters per option": "limiter le nombre de votants par option",
"More informations here:": "Plus d'informations ici :", "More informations here:": "Plus d'informations ici :",
"Only the poll maker can see the poll's results": "Seul le ou la créateur·rice du sondage peut voir les résultats", "Only the poll maker can see the poll's results": "Seul le ou la créateur·rice du sondage peut voir les résultats",
"Optional parameters": "Paramètres facultatifs", "Optional parameters": "Paramètres facultatifs",

View File

@ -328,7 +328,7 @@
"All voters can modify any vote": "Tutti i votanti possono cambiare tutti i voti", "All voters can modify any vote": "Tutti i votanti possono cambiare tutti i voti",
"Customize the URL": "Personalizzare il link", "Customize the URL": "Personalizzare il link",
"Go to step 2": "Andare al punto 2", "Go to step 2": "Andare al punto 2",
"Limit the ammount of voters per option": "Limitare la quantità di elettori per opzione", "Limit the amount of voters per option": "Limitare la quantità di elettori per opzione",
"More informations here:": "IT_Plus d'informations ici :", "More informations here:": "IT_Plus d'informations ici :",
"Only the poll maker can see the poll's results": "Solo il creatore sondaggio possono vedere i risultati", "Only the poll maker can see the poll's results": "Solo il creatore sondaggio possono vedere i risultati",
"Optional parameters": "Parametri opzionali", "Optional parameters": "Parametri opzionali",

View File

@ -328,7 +328,7 @@
"All voters can modify any vote": "Alle stemmers kunnen elke stem aanpassen", "All voters can modify any vote": "Alle stemmers kunnen elke stem aanpassen",
"Customize the URL": "Link verpersoonlijken", "Customize the URL": "Link verpersoonlijken",
"Go to step 2": "Ga naar stap 2", "Go to step 2": "Ga naar stap 2",
"Limit the ammount of voters per option": "Limit the amount of voters per option", "Limit the amount of voters per option": "Limit the amount of voters per option",
"More informations here:": "More informations here:", "More informations here:": "More informations here:",
"Only the poll maker can see the poll's results": "Alleen degene die de poll aangemaakt heeft kan de resultaten zien", "Only the poll maker can see the poll's results": "Alleen degene die de poll aangemaakt heeft kan de resultaten zien",
"Optional parameters": "Optionele parameters", "Optional parameters": "Optionele parameters",

View File

@ -328,7 +328,7 @@
"All voters can modify any vote": "Totes los votants pòdon modificar sos vòtes", "All voters can modify any vote": "Totes los votants pòdon modificar sos vòtes",
"Customize the URL": "Personalizar lo ligam", "Customize the URL": "Personalizar lo ligam",
"Go to step 2": "Anar a letapa 2", "Go to step 2": "Anar a letapa 2",
"Limit the ammount of voters per option": "Limitar lo nombre de votants per opcion", "Limit the amount of voters per option": "Limitar lo nombre de votants per opcion",
"More informations here:": "Mai dinformacion aquí :", "More informations here:": "Mai dinformacion aquí :",
"Only the poll maker can see the poll's results": "Solament lo creator del sondatge pòt veire los resultats", "Only the poll maker can see the poll's results": "Solament lo creator del sondatge pòt veire los resultats",
"Optional parameters": "Paramètres opcionals", "Optional parameters": "Paramètres opcionals",

View File

@ -28,7 +28,7 @@
{if $useRemoteUser} {if $useRemoteUser}
<input type="hidden" name="name" value="{$form->admin_name}" />{$form->admin_name} <input type="hidden" name="name" value="{$form->admin_name}" />{$form->admin_name}
{else} {else}
<input id="yourname" type="text" name="name" class="form-control" {$errors['name']['aria']} value="{$poll_name|html}" /> <input id="yourname" type="text" required name="name" class="form-control" {$errors['name']['aria']} value="{$poll_name|html}" />
{/if} {/if}
</div> </div>
</div> </div>
@ -51,7 +51,7 @@
{if $useRemoteUser} {if $useRemoteUser}
<input type="hidden" name="mail" value="{$form->admin_mail}">{$form->admin_mail} <input type="hidden" name="mail" value="{$form->admin_mail}">{$form->admin_mail}
{else} {else}
<input id="email" type="text" name="mail" class="form-control" {$errors['email']['aria']} value="{$poll_mail|html}" /> <input id="email" required type="email" name="mail" class="form-control" {$errors['email']['aria']} value="{$poll_mail|html}" />
{/if} {/if}
</div> </div>
</div> </div>
@ -69,7 +69,7 @@
<label for="poll_title" class="col-sm-4 control-label">{__('Step 1', 'Poll title')} *</label> <label for="poll_title" class="col-sm-4 control-label">{__('Step 1', 'Poll title')} *</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input id="poll_title" type="text" name="title" class="form-control" {$errors['title']['aria']} <input id="poll_title" type="text" name="title" class="form-control" required {$errors['title']['aria']}
value="{$poll_title|html}"/> value="{$poll_title|html}"/>
</div> </div>
</div> </div>
@ -111,7 +111,7 @@
<span class="lead visible-xs-inline"> <span class="lead visible-xs-inline">
<i class="glyphicon glyphicon-cog" aria-hidden="true"></i> <i class="glyphicon glyphicon-cog" aria-hidden="true"></i>
</span> </span>
<a class="optionnal-parameters collapsed lead" role="button" data-toggle="collapse" href="#optionnal" aria-expanded="false" aria-controls="optionnal"> <a class="optionnal-parameters {if !$advanced_errors}collapsed{/if} lead" role="button" data-toggle="collapse" href="#optionnal" aria-expanded="{if $advanced_errors}false{else}true{/if}" aria-controls="optionnal">
{__('Step 1', "Optional parameters")} {__('Step 1', "Optional parameters")}
<i class="caret" aria-hidden="true"></i> <i class="caret" aria-hidden="true"></i>
<i class="caret caret-up" aria-hidden="true"></i> <i class="caret caret-up" aria-hidden="true"></i>
@ -121,32 +121,32 @@
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="collapse" id="optionnal"> <div class="collapse{if $advanced_errors} in{/if}" id="optionnal" {if $advanced_errors}aria-expanded="true"{/if}>
{* Poll identifier *} {* Poll identifier *}
<div class="form-group {$errors['customized_url']['class']}"> <div class="form-group {$errors['customized_url']['class']}">
{* Value MAX *} {* Value MAX *}
<div class="form-group"> <div class="form-group {$errors['ValueMax']['class']}">
<label for="use_valueMax" class="col-sm-4 control-label"> <label for="use_valueMax" class="col-sm-4 control-label">
{__('Step 1', 'Value Max')}<br/> {__('Step 1', 'Value Max')}<br/>
</label> </label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="checkbox"> <div class="checkbox">
<label> <label>
<input id="use_ValueMax" name="use_ValueMax" type="checkbox" > <input id="use_ValueMax" name="use_ValueMax" type="checkbox" {if $use_ValueMax}checked{/if}>
{__('Step 1', "Limit the ammount of voters per option")} {__('Step 1', "Limit the amount of voters per option")}
</label> </label>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group {$errors['ValueMax']['class']}">
<div id="ValueMax" {if !$use_ValueMax}class="hidden"{/if}> <div id="ValueMax" {if !$use_ValueMax}class="hidden"{/if}>
<div class="col-sm-offset-4 col-sm-8"> <div class="col-sm-offset-4 col-sm-8">
<label> <label>
<input id="ValueMax" type="number" min= "0" name="ValueMax"> <input id="ValueMax" type="number" min="0" name="ValueMax" value="{$ValueMax|html}" {$errors['ValueMax']['aria']}>
{__('Step 1', "ValueMax instructions")} {__('Step 1', "ValueMax instructions")}
</label> </label>
@ -155,6 +155,14 @@
</div> </div>
</div> </div>
{if !empty($errors['ValueMax']['msg'])}
<div class="alert alert-danger">
<p id="poll_customized_url_error">
{$errors['ValueMax']['msg']}
</p>
</div>
{/if}
{* Poll identifier *} {* Poll identifier *}
<div class="form-group {$errors['customized_url']['class']}"> <div class="form-group {$errors['customized_url']['class']}">