Skip to content
Snippets Groups Projects
Commit e9b456ad authored by Olivier PEREZ's avatar Olivier PEREZ
Browse files

(re) Allow accents in names

parent 08a3fe1b
Branches main
No related tags found
No related merge requests found
......@@ -165,7 +165,7 @@ if (!empty($_POST['save'])) { // Save edition of an old vote
$choices = $inputService->filterArray($_POST['choices'], FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => CHOICE_REGEX]]);
if (empty($name)) {
$message = new Message('danger', _('Name is incorrect.'));
$message = new Message('danger', _('The name is invalid.'));
}
if (count($choices) != count($_POST['choices'])) {
$message = new Message('danger', _('There is a problem with your choices.'));
......@@ -223,7 +223,7 @@ if (isset($_POST['add_comment'])) {
$comment = strip_tags($_POST['comment']);
if (empty($name)) {
$message = new Message('danger', _('Name is incorrect.'));
$message = new Message('danger', _('The name is invalid.'));
}
if ($message == null) {
......
......@@ -58,7 +58,7 @@ $ALLOWED_LANGUAGES = [
// Regex
const POLL_REGEX = '/^[a-z0-9]+$/';
const CHOICE_REGEX = '/^[012]$/';
const NAME_REGEX = '/(*UTF8)^[[:alnum:]_ -]+$/i';
const NAME_REGEX = '/^[áàâäãåçéèêëíìîïñóòôöõúùûüýÿæœa-z0-9_ -]+$/i';
// Path to logo
const LOGOBANDEAU = '<relative path to the logo file>';
......
No preview for this file type
......@@ -265,6 +265,9 @@ msgstr "Save the new rules"
msgid "Cancel the rules edit"
msgstr "Cancel the rules edit"
msgid "The name is invalid."
msgstr "Le nom n'est pas valide."
# Help text adminstuds.php
msgid "As poll administrator, you can change all the lines of this poll with this button"
msgstr "As poll administrator, you can change all the lines of this poll with this button"
......
No preview for this file type
......@@ -265,6 +265,9 @@ msgstr "Enregistrer les nouvelles permissions"
msgid "Cancel the rules edit"
msgstr "Annuler le changement de permissions"
msgid "The name is invalid."
msgstr "Le nom n'est pas valide."
# Help text adminstuds.php
msgid "As poll administrator, you can change all the lines of this poll with this button"
msgstr "En tant qu'administrateur, vous pouvez modifier toutes les lignes de ce sondage avec ce bouton"
......@@ -670,7 +673,7 @@ msgid ""
"has filled a line.\n"
"You can find your poll at the link"
msgstr ""
" vient de remplir une ligne.\n"
"vient de remplir une ligne.\n"
"Vous pouvez retrouver votre sondage avec le lien suivant"
msgid "Thanks for your confidence."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment