error on date poll creation

https://framagit.org/framasoft/framadate/issues/318

code style

modify error message on session expiration

new local text

remove empty string
This commit is contained in:
m 2018-04-15 14:34:53 +02:00 committed by Thomas Citharel
parent 290ec002d5
commit 41578b19c8
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
3 changed files with 17 additions and 16 deletions

View File

@ -43,7 +43,7 @@ if (is_file('bandeaux_local.php')) {
// Step 1/4 : error if $_SESSION from info_sondage are not valid
if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (($config['use_smtp']) ? empty($_SESSION['form']->admin_mail) : false)) {
$smarty->assign('title', __('Error', 'Error!'));
$smarty->assign('error', __('Error', 'You haven\'t filled the first section of the poll creation.'));
$smarty->assign('error', __('Error', 'You haven\'t filled the first section of the poll creation, or your session has expired.'));
$smarty->display('error.tpl');
exit;
}

View File

@ -45,7 +45,7 @@ $min_expiry_time = $pollService->minExpiryDate();
$max_expiry_time = $pollService->maxExpiryDate();
// The poll format is DATE
if ($_SESSION['form']->format !== 'D') {
if (isset($_SESSION['form']->format) && ($_SESSION['form']->format !== 'D')) {
$_SESSION['form']->format = 'D';
$_SESSION['form']->clearChoices();
}
@ -64,7 +64,7 @@ switch ($step) {
case 1:
// Step 1/4 : error if $_SESSION from info_sondage are not valid
$smarty->assign('title', __('Error', 'Error!'));
$smarty->assign('error', __('Error', 'You haven\'t filled the first section of the poll creation.'));
$smarty->assign('error', __('Error', 'You haven\'t filled the first section of the poll creation, or your session has expired.'));
$smarty->display('error.tpl');
exit;

View File

@ -155,32 +155,33 @@
"You already voted": "You already voted",
"You can't create a poll with hidden results with the following edition option:": "You can't create a poll with hidden results with the following option: ",
"You can't select more than %d dates": "You can't select more than %d dates",
"You haven't filled the first section of the poll creation, or your session has expired.": "You haven't filled the first section of the poll creation, or your session has expired.",
"You haven't filled the first section of the poll creation.": "You haven't filled in the first section of the poll.",
"Your vote wasn't counted, because someone voted in the meantime and it conflicted with your choices and the poll conditions. Please retry.": "Your vote wasn't counted, because someone voted in the meantime and it conflicted with your choices and the poll conditions. Please retry."
},
"FindPolls": {
"Address": "Address",
"Created polls": "Created polls",
"Have a good day!": "Have a good day!",
"Here is the list of the polls that you manage on %s:": "Here is the list of the polls that you manage on %s:",
"If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator on %s.": "If you weren't the source of this action and if you think this is an abuse of the service, please notify the administrator at %s.",
"Last access date": "Last access date",
"List of your polls": "List of your polls",
"Local Storage Help": "To help you find your previous polls, we save inside your browser each poll you create or access to. These informations are saved only inside this browser. The informations saved are the following:",
"Local Storage Help Delete": "To delete this information, you can click the bin matching each line or click the « delete my polls index » option. This won't delete your polls.",
"Local Storage Help Information Accessed": "The date on which you created or last accessed the poll",
"Local Storage Help Information Address": "It's address",
"Local Storage Help Information Title": "The title of the poll",
"PS: this email has been sent because you or someone else asked to get back the polls created with your email address.": "PS: this email has been sent because you or someone else asked to get back the polls created with your email address.",
"Polls saved inside this browser": "Polls saved inside this browser",
"Polls sent": "Polls sent",
"Created polls": "Created polls",
"Visited polls": "Visited polls",
"Remove all polls from this browser": "Remove all my polls from this browser's index",
"Remove poll from index": "Remove poll from index",
"Send me my polls": "Send me my polls",
"Send my polls by email": "Send my polls by email",
"Polls saved inside this browser": "Polls saved inside this browser",
"Local Storage Help": "To help you find your previous polls, we save inside your browser each poll you create or access to. These informations are saved only inside this browser. The informations saved are the following:",
"Local Storage Help Information Title": "The title of the poll",
"Local Storage Help Information Address": "It's address",
"Local Storage Help Information Accessed": "The date on which you created or last accessed the poll",
"Local Storage Help Delete": "To delete this information, you can click the bin matching each line or click the « delete my polls index » option. This won't delete your polls.",
"Title": "Title",
"Address": "Address",
"Last access date": "Last access date",
"Remove poll from index": "Remove poll from index",
"There are no polls saved inside your browser yet": "There are no polls saved inside your browser yet",
"Remove all polls from this browser": "Remove all my polls from this browser's index"
"Title": "Title",
"Visited polls": "Visited polls"
},
"Generic": {
"(in the format name@mail.com)": "(in the format name@mail.com)",