Merge branch 'FixDatePicker' into 'develop'

Fix date picker

Fix #154

And more Smarty on poll creation

See merge request !115
This commit is contained in:
Antonin 2016-05-04 22:15:57 +02:00
commit b359139bae
9 changed files with 291 additions and 239 deletions

View File

@ -41,16 +41,10 @@ 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)) {
Utils::print_header(__('Error', 'Error!'));
bandeau_titre(__('Error', 'Error!'));
echo '
<div class="alert alert-danger">
<h3>' . __('Error', 'You haven\'t filled the first section of the poll creation.') . ' !</h3>
<p>' . __('Generic', 'Back to the homepage of') . ' <a href="' . Utils::get_server_name() . '"> ' . NOMAPPLICATION . '</a></p>
</div>' . "\n";
bandeau_pied();
$smarty->assign('title', __('Error', 'Error!'));
$smarty->assign('error', __('Error', 'You haven\'t filled the first section of the poll creation.'));
$smarty->display('error.tpl');
exit;
} else {
// Min/Max archive date
@ -64,7 +58,7 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
}
// Step 4 : Data prepare before insert in DB
if (isset($_POST['confirmecreation'])) {
if (isset($_POST['confirmation'])) {
// Define expiration date
$enddate = filter_input(INPUT_POST, 'enddate', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '#^[0-9]{2}/[0-9]{2}/[0-9]{4}$#']]);
@ -124,9 +118,6 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
} // Step 3/4 : Confirm poll creation and choose a removal date
else if (isset($_POST['fin_sondage_autre'])) {
Utils::print_header(__('Step 3', 'Removal date and confirmation (3 on 3)'));
bandeau_titre(__('Step 3', 'Removal date and confirmation (3 on 3)'));
// Store choices in $_SESSION
if (isset($_POST['choices'])) {
@ -178,45 +169,13 @@ if (empty($_SESSION['form']->title) || empty($_SESSION['form']->admin_name) || (
$end_date_str = utf8_encode(strftime($date_format['txt_date'], $max_expiry_time)); //textual date
echo '
<form name="formulaire" action="' . Utils::get_server_name() . 'create_classic_poll.php" method="POST" class="form-horizontal" role="form">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="well summary">
<h4>' . __('Step 3', 'List of your choices') . '</h4>
' . $summary . '
</div>
<div class="alert alert-info">
<p>' . __('Step 3', 'Your poll will automatically be archived') . ' ' . $config['default_poll_duration'] . ' ' . __('Generic', 'days') . ' ' .__('Step 3', 'after the last date of your poll.') . '
<br />' . __('Step 3', 'You can set a closer archiving date for it.') . '</p>
<div class="form-group">
<label for="enddate" class="col-sm-5 control-label">' . __('Step 3', 'Archiving date:') . '</label>
<div class="col-sm-6">
<div class="input-group date">
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
<input type="text" class="form-control" id="enddate" data-date-format="' . __('Date', 'dd/mm/yyyy') . '" aria-describedby="dateformat" name="enddate" value="' . $end_date_str . '" size="10" maxlength="10" placeholder="' . __('Date', 'dd/mm/yyyy') . '" />
</div>
</div>
<span id="dateformat" class="sr-only">' . __('Date', 'dd/mm/yyyy') . '</span>
</div>
</div>
<div class="alert alert-warning">
<p>' . __('Step 3', 'Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.') . '</p>';
if ($config['use_smtp'] == true) {
echo '
<p>' . __('Step 3', 'Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.') . '</p>';
}
echo '
</div>
<p class="text-right">
<button class="btn btn-default" onclick="javascript:window.history.back();" title="' . __('Step 3', 'Back to step 2') . '">' . __('Generic', 'Back') . '</button>
<button name="confirmecreation" value="confirmecreation" type="submit" class="btn btn-success">' . __('Step 3', 'Create the poll') . '</button>
</p>
</div>
</div>
</form>' . "\n";
$smarty->assign('title', __('Step 3', 'Removal date and confirmation (3 on 3)'));
$smarty->assign('summary', $summary);
$smarty->assign('end_date_str', $end_date_str);
$smarty->assign('default_poll_duration', $config['default_poll_duration']);
$smarty->assign('use_smtp', $config['use_smtp']);
bandeau_pied();
$smarty->display('create_classic_poll_step3.tpl');
// Step 2/4 : Select choices of the poll
} else {

View File

@ -16,13 +16,13 @@
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft https://git.framasoft.org/framasoft/framadate/)
*/
use Framadate\Choice;
use Framadate\Services\InputService;
use Framadate\Services\LogService;
use Framadate\Services\PollService;
use Framadate\Services\MailService;
use Framadate\Services\PollService;
use Framadate\Services\PurgeService;
use Framadate\Utils;
use Framadate\Choice;
include_once __DIR__ . '/app/inc/init.php';
@ -36,30 +36,139 @@ $inputService = new InputService();
if (is_readable('bandeaux_local.php')) {
include_once('bandeaux_local.php');
} else {
include_once('bandeaux.php');
}
// Step 1/4 : error if $_SESSION from info_sondage are not valid
// Min/Max archive date
$min_expiry_time = $pollService->minExpiryDate();
$max_expiry_time = $pollService->maxExpiryDate();
// The poll format is DATE
if ($_SESSION['form']->format !== 'D') {
$_SESSION['form']->format = 'D';
$_SESSION['form']->clearChoices();
}
if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) || ($config['use_smtp'] && !isset($_SESSION['form']->admin_mail))) {
$smarty->assign('title', __('Error', 'Error!'));
$smarty->assign('error', __('Error', 'You haven\'t filled the first section of the poll creation.'));
$smarty->display('error.tpl');
$step = 1;
} else if (!empty($_POST['confirmation'])) {
$step = 4;
} else if (empty($_POST['choixheures']) || isset($_SESSION['form']->totalchoixjour)) {
$step = 2;
} else {
// Min/Max archive date
$min_expiry_time = $pollService->minExpiryDate();
$max_expiry_time = $pollService->maxExpiryDate();
$step = 3;
}
// The poll format is DATE
if ($_SESSION['form']->format !== 'D') {
$_SESSION['form']->format = 'D';
$_SESSION['form']->clearChoices();
}
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->display('error.tpl');
exit;
// Step 4 : Data prepare before insert in DB
if (!empty($_POST['confirmation'])) {
case 2:
// Step 2/4 : Select dates of the poll
// Prefill form->choices
foreach ($_SESSION['form']->getChoices() as $c) {
$count = 3 - count($c->getSlots());
for ($i = 0; $i < $count; $i++) {
$c->addSlot('');
}
}
$count = 3 - count($_SESSION['form']->getChoices());
for ($i = 0; $i < $count; $i++) {
$c = new Choice('');
$c->addSlot('');
$c->addSlot('');
$c->addSlot('');
$_SESSION['form']->addChoice($c);
}
// Display step 2
$smarty->assign('title', __('Step 2 date', 'Poll dates (2 on 3)'));
$smarty->assign('choices', $_SESSION['form']->getChoices());
$smarty->assign('error', null);
$smarty->display('create_date_poll_step_2.tpl');
exit;
case 3:
// Step 3/4 : Confirm poll creation
// Handle Step2 submission
if (!empty($_POST['days'])) {
// Remove empty dates
$_POST['days'] = array_filter($_POST['days'], function ($d) {
return !empty($d);
});
// Check if there are at most MAX_SLOTS_PER_POLL slots
if (count($_POST['days']) > MAX_SLOTS_PER_POLL) {
// Display step 2
$smarty->assign('title', __('Step 2 date', 'Poll dates (2 on 3)'));
$smarty->assign('choices', $_SESSION['form']->getChoices());
$smarty->assign('error', __f('Error', 'You can\'t select more than %d dates', MAX_SLOTS_PER_POLL));
$smarty->display('create_date_poll_step_2.tpl');
exit;
}
// Clear previous choices
$_SESSION['form']->clearChoices();
for ($i = 0; $i < count($_POST['days']); $i++) {
$day = $_POST['days'][$i];
if (!empty($day)) {
// Add choice to Form data
$date = DateTime::createFromFormat(__('Date', 'datetime_parseformat'), $_POST['days'][$i])->setTime(0, 0, 0);
$time = $date->getTimestamp();
$choice = new Choice($time);
$_SESSION['form']->addChoice($choice);
$schedules = $inputService->filterArray($_POST['horaires' . $i], FILTER_DEFAULT);
for ($j = 0; $j < count($schedules); $j++) {
if (!empty($schedules[$j])) {
$choice->addSlot(strip_tags($schedules[$j]));
}
}
}
}
}
// Display step 3
$summary = '<ul>';
$choices = $_SESSION['form']->getChoices();
foreach ($choices as $choice) {
$summary .= '<li>' . strftime($date_format['txt_full'], $choice->getName());
$first = true;
foreach ($choice->getSlots() as $slots) {
$summary .= $first ? ': ' : ', ';
$summary .= $slots;
$first = false;
}
$summary .= '</li>';
}
$summary .= '</ul>';
$end_date_str = utf8_encode(strftime($date_format['txt_date'], $max_expiry_time)); // textual date
$smarty->assign('title', __('Step 3', 'Removal date and confirmation (3 on 3)'));
$smarty->assign('summary', $summary);
$smarty->assign('end_date_str', $end_date_str);
$smarty->assign('default_poll_duration', $config['default_poll_duration']);
$smarty->assign('use_smtp', $config['use_smtp']);
$smarty->display('create_classic_poll_step3.tpl');
exit;
case 4:
// Step 4 : Data prepare before insert in DB
// Define expiration date
$enddate = filter_input(INPUT_POST, 'enddate', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '#^[0-9]{2}/[0-9]{2}/[0-9]{4}$#']]);
@ -120,138 +229,4 @@ if (!isset($_SESSION['form']->title) || !isset($_SESSION['form']->admin_name) ||
// Redirect to poll administration
header('Location:' . Utils::getUrlSondage($admin_poll_id, true));
exit;
} else {
if (!empty($_POST['days'])) {
// Remove empty dates
$_POST['days'] = array_filter($_POST['days'], function($d) {return !empty($d);});
// Check if there are at most MAX_SLOTS_PER_POLL slots
if (count($_POST['days']) > MAX_SLOTS_PER_POLL) {
// Display step 2
$smarty->assign('title', __('Step 2 date', 'Poll dates (2 on 3)'));
$smarty->assign('choices', $_SESSION['form']->getChoices());
$smarty->assign('error', __f('Error', 'You can\'t select more than %d dates', MAX_SLOTS_PER_POLL));
$smarty->display('create_date_poll_step_2.tpl');
exit;
}
// Clear previous choices
$_SESSION['form']->clearChoices();
for ($i = 0; $i < count($_POST['days']); $i++) {
$day = $_POST['days'][$i];
if (!empty($day)) {
// Add choice to Form data
$date = DateTime::createFromFormat(__('Date', 'datetime_parseformat'), $_POST['days'][$i])->setTime(0, 0, 0);
$time = $date->getTimestamp();
$choice = new Choice($time);
$_SESSION['form']->addChoice($choice);
$schedules = $inputService->filterArray($_POST['horaires'.$i], FILTER_DEFAULT);
for($j = 0; $j < count($schedules); $j++) {
if (!empty($schedules[$j])) {
$choice->addSlot(strip_tags($schedules[$j]));
}
}
}
}
}
}
// Step 3/4 : Confirm poll creation
if (!empty($_POST['choixheures']) && !isset($_SESSION['form']->totalchoixjour)) {
Utils::print_header ( __('Step 3', 'Removal date and confirmation (3 on 3)') );
bandeau_titre(__('Step 3', 'Removal date and confirmation (3 on 3)'));
$end_date_str = utf8_encode(strftime($date_format['txt_date'], $max_expiry_time)); // textual date
// Summary
$summary = '<ul>';
$choices = $_SESSION['form']->getChoices();
foreach ($choices as $choice) {
$summary .= '<li>'.strftime($date_format['txt_full'], $choice->getName());
$first = true;
foreach ($choice->getSlots() as $slots) {
$summary .= $first ? ': ' : ', ';
$summary .= $slots;
$first = false;
}
$summary .= '</li>';
}
$summary .= '</ul>';
echo '
<form name="formulaire" action="' . Utils::get_server_name() . 'create_date_poll.php" method="POST" class="form-horizontal" role="form">
<div class="row" id="selected-days">
<div class="col-md-8 col-md-offset-2">
<h3>'. __('Step 3', 'Confirm the creation of your poll') .'</h3>
<div class="well summary">
<h4>'. __('Step 3', 'List of your choices').'</h4>
'. $summary .'
</div>
<div class="alert alert-info clearfix">
<p>' . __f('Step 3', 'Your poll will be automatically archived in %d days.', $config['default_poll_duration']) . '
<br />' . __('Step 3', 'You can set a closer archiving date for it.') .'</p>
<div class="form-group">
<label for="enddate" class="col-sm-5 control-label">'. __('Step 3', 'Archiving date:') .'</label>
<div class="col-sm-6">
<div class="input-group date">
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
<input type="text" class="form-control" id="enddate" data-date-format="'. __('Date', 'dd/mm/yyyy') .'" aria-describedby="dateformat" name="enddate" value="'.$end_date_str.'" size="10" maxlength="10" placeholder="'. __('Date', 'dd/mm/yyyy') .'" />
</div>
</div>
<span id="dateformat" class="sr-only">('. __('Date', 'dd/mm/yyyy') .')</span>
</div>
</div>
<div class="alert alert-warning">
<p>'. __('Step 3', 'Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.'). '</p>';
if($config['use_smtp'] == true) {
echo '<p>' . __('Step 3', 'Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.') .'</p>';
}
echo '
</div>
<p class="text-right">
<button class="btn btn-default" onclick="javascript:window.history.back();" title="'. __('Step 3', 'Back to step 2') . '">'. __('Generic', 'Back') . '</button>
<button name="confirmation" value="confirmation" type="submit" class="btn btn-success">'. __('Step 3', 'Create the poll') . '</button>
</p>
</div>
</div>
</form>'."\n";
bandeau_pied();
// Step 2/4 : Select dates of the poll
} else {
// Prefill form->choices
foreach ($_SESSION['form']->getChoices() as $c) {
$count = 3 - count($c->getSlots());
for($i=0; $i< $count; $i++) {
$c->addSlot('');
}
}
$count = 3 - count($_SESSION['form']->getChoices());
for($i=0; $i< $count; $i++) {
$c = new Choice('');
$c->addSlot('');
$c->addSlot('');
$c->addSlot('');
$_SESSION['form']->addChoice($c);
}
// Display step 2
$smarty->assign('title', __('Step 2 date', 'Poll dates (2 on 3)'));
$smarty->assign('choices', $_SESSION['form']->getChoices());
$smarty->assign('error', null);
$smarty->display('create_date_poll_step_2.tpl');
}
}

View File

@ -41,10 +41,9 @@
"ASTERISK": "*"
},
"Date": {
"dd/mm/yyyy": "dd/mm/yyyy",
"dd/mm/yyyy": "yyyy-mm-dd",
"datepicker": "yyyy-mm-dd",
"datetime_parseformat": "Y-m-d",
"%A, den %e. %B %Y": "%A %e %B %Y",
"FULL": "%A, den %e. %B %Y",
"SHORT": "%A %e %B %Y",
"DAY": "%a %e",
@ -202,9 +201,9 @@
"Keep the poll": "Umfrage beibehalten",
"Your poll has been removed!": "Ihre Umfrage wurde gelöscht!",
"Poll saved": "Umfrage gespeichert",
"Poll fully deleted": "Umfrage vollständig gelöscht",
"Vote added": "Wertung hinzugefügt",
"Vote updated": "Wertung aktualisiert",
"Poll fully deleted": "Umfrage vollständig gelöscht",
"Vote deleted": "Wertung gelöscht",
"All votes deleted": "Alle Wertungen werden gelöscht",
"Back to the poll": "Zurück zur Umfrage",
@ -296,7 +295,6 @@
"Migration": "Migration",
"Purge": "Säuberung",
"Logs": "Verlauf",
"Installation": "Installation",
"Poll ID": "Umfrage-ID",
"Format": "Format",
"Title": "Titel",
@ -349,6 +347,21 @@
"Author's message": "Nachricht vom Autor ",
"For sending to the polled users": "Nachricht für die Teilnehmer"
},
"Installation": {
"AppMail": "DE_Adresse mail de l'application",
"AppName": "DE_Nom de l'application",
"CleanUrl": "DE_URL propres",
"Database": "DE_Base de données",
"DbConnectionString": "DE_Chaîne de connexion",
"DbPassword": "DE_Mot de passe",
"DbPrefix": "DE_Préfixe",
"DbUser": "DE_Utilisateur",
"DefaultLanguage": "DE_Langue par défaut",
"General": "DE_Général",
"Install": "DE_Installer",
"MigrationTable": "DE_Table de migration",
"ResponseMail": "DE_Mail de réponse"
},
"Error": {
"Error!": "Fehler!",
"Enter a title": "Titel eingeben",

View File

@ -44,7 +44,6 @@
"dd/mm/yyyy": "yyyy-mm-dd",
"datepicker": "yyyy-mm-dd",
"datetime_parseformat": "Y-m-d",
"%A, den %e. %B %Y": "%A %e %B %Y",
"FULL": "%A, %B %e, %Y",
"SHORT": "%A %e %B %Y",
"DAY": "%a %e",
@ -60,16 +59,16 @@
"Select the language": "Select language",
"Change the language": "Change language"
},
"Maintenance": {
"The application": "The application",
"is currently under maintenance.": "is currently under maintenance.",
"Thank you for your understanding.": "Thank you for your understanding."
},
"Homepage": {
"Schedule an event": "Schedule an event",
"Make a classic poll": "Make a standard poll",
"Where are my polls": "Where are my polls?"
},
"Maintenance": {
"The application": "The application",
"is currently under maintenance.": "is currently under maintenance.",
"Thank you for your understanding.": "Thank you for your understanding."
},
"1st section": {
"What is that?": "What is Framadate?",
"Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.": "Framadate is an online service for planning an appointment or making a decision quickly and easily. No registration is required.",
@ -84,8 +83,8 @@
"2nd section": {
"The software": "The software",
"Framadate was initially based on ": "Framadate was initially based on ",
"a software developed by the University of Strasbourg. Today, it is developed by Framasoft association.": "software developed by the University of Strasbourg. These days, it is developed by the Framasoft association.",
"This software needs JavaScript and cookies enabled. It is compatible with the following web browsers:": "This software needs JavaScript and cookies enabled. It is compatible with the following web browsers:",
"a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft.": "software developed by the University of Strasbourg. These days, it is developed by the Framasoft association.",
"This software needs javascript and cookies enabled. It is compatible with the following web browsers:": "This software needs JavaScript and cookies enabled. It is compatible with the following web browsers:",
"It is governed by the": "Framadate is licensed under the",
"CeCILL-B license": "CeCILL-B license"
},
@ -216,10 +215,10 @@
"Keep the votes": "Keep the votes",
"Remove the votes": "Remove the votes",
"Confirm removal of all comments of the poll": "Confirm removal of all comments",
"Comment deleted": "Comment deleted",
"All comments deleted": "All comments deleted",
"Keep the comments": "Keep the comments",
"Remove the comments": "Remove the comments",
"Comment deleted": "Comment deleted",
"All comments deleted": "All comments deleted",
"Keep votes": "Keep votes",
"Keep comments": "Keep comments",
"Keep this poll": "Keep this poll"
@ -296,7 +295,6 @@
"Migration": "Migration",
"Purge": "Purge",
"Logs": "Logs",
"Installation": "Installation",
"Poll ID": "Poll ID",
"Format": "Format",
"Title": "Title",
@ -350,6 +348,21 @@
"Author's message": "Author's message",
"For sending to the polled users": "Participant link"
},
"Installation": {
"AppMail": "EN_Adresse mail de l'application",
"AppName": "EN_Nom de l'application",
"CleanUrl": "EN_URL propres",
"Database": "EN_Base de données",
"DbConnectionString": "EN_Chaîne de connexion",
"DbPassword": "EN_Mot de passe",
"DbPrefix": "EN_Préfixe",
"DbUser": "EN_Utilisateur",
"DefaultLanguage": "EN_Langue par défaut",
"General": "EN_Général",
"Install": "EN_Installer",
"MigrationTable": "EN_Table de migration",
"ResponseMail": "EN_Mail de réponse"
},
"Error": {
"Error!": "Error!",
"Enter a title": "Enter a title",

View File

@ -42,13 +42,12 @@
},
"Date": {
"dd/mm/yyyy": "dd/mm/aaaa",
"datepicker": "yyyy-mm-dd",
"datetime_parseformat": "Y-m-d",
"%A, den %e. %B %Y": "%A %e de %B de %Y",
"datepicker": "dd/mm/yyyy",
"datetime_parseformat": "d/m/Y",
"FULL": "%A, %e de %B de %Y",
"SHORT": "%A %e %B %Y",
"DAY": "%a %e",
"DATE": "%d-%m-%Y",
"DATE": "%d/%m/%Y",
"MONTH_YEAR": "%B de %Y",
"DATETIME": "%d/%m/%Y %H:%M",
"Add range dates": "ES_Ajout d'un intervalle de dates",
@ -125,9 +124,6 @@
"Poll rules": "Permisos de la encuesta",
"Edit the poll rules": "Modificar los permisos de la encuesta",
"Votes and comments are locked": "Los votos y comentarios están bloqueados",
"Votes and comments are open": "ES_Les votes et commentaires sont ouverts",
"Votes are editable": "ES_Les votes sont modifiables",
"Votes are editable solely by their owner.": "ES_Les votes sont modifiables uniquement par leur créateur",
"Save the new rules": "ES_Enregistrer les nouvelles permissions",
"Cancel the rules edit": "ES_Annuler le changement de permissions",
"Results are hidden": "Los resutaldos no son visibles",
@ -205,8 +201,8 @@
"Keep the poll": "Conservar la encuesta",
"Your poll has been removed!": "Su encuesta ha sido borrada",
"Poll saved": "Encuesta guardada",
"Vote added": "Voto guardado",
"Poll fully deleted": "Encuesta borrada definitivamente",
"Vote added": "Voto guardado",
"Vote updated": "Voto actualizado",
"Vote deleted": "Voto borrado",
"All votes deleted": "Todos los votos han sido borrados",
@ -232,6 +228,9 @@
"You are in the poll creation section.": "Usted ha eligido crear una nueva encuesta",
"Required fields cannot be left blank.": "Los campos requeridos tienen que ser llenados",
"Poll title": "Título de la encuesta",
"Poll id": "ES_Identifiant",
"Poll id rules": "ES_L'identifiant peut contenir des lettres, des chiffres et des tirets \"-\".",
"Poll id warning": "ES_En définissant un identifiant cela peut faciliter l'accès à ce sondage pour des personnes non désirées. Il est recommandé de le protéger par mot de passe.",
"Votes cannot be modified": "Los votos no pueden ser modificados",
"All voters can modify any vote": "Los votos pueden ser modificados por cualquiera",
"Voters can modify their vote themselves": "Los votos peuden ser modificados por su autor",
@ -296,7 +295,6 @@
"Migration": "Migración",
"Purge": "Purga",
"Logs": "Histórico",
"Installation": "Instalación",
"Poll ID": "ID de la encuesta",
"Format": "Formato",
"Title": "Título",
@ -349,6 +347,21 @@
"Author's message": "Reservado al autor",
"For sending to the polled users": "Para difusión a los votantes"
},
"Installation": {
"AppMail": "ES_Adresse mail de l'application",
"AppName": "ES_Nom de l'application",
"CleanUrl": "ES_URL propres",
"Database": "ES_Base de données",
"DbConnectionString": "ES_Chaîne de connexion",
"DbPassword": "ES_Mot de passe",
"DbPrefix": "ES_Préfixe",
"DbUser": "ES_Utilisateur",
"DefaultLanguage": "ES_Langue par défaut",
"General": "ES_Général",
"Install": "ES_Installer",
"MigrationTable": "ES_Table de migration",
"ResponseMail": "ES_Mail de réponse"
},
"Error": {
"Error!": "¡Error!",
"Enter a title": "Introducza un título",

View File

@ -44,7 +44,6 @@
"dd/mm/yyyy": "jj/mm/aaaa",
"datepicker": "dd/mm/yyyy",
"datetime_parseformat": "d/m/Y",
"%A, den %e. %B %Y": "%A %e %B %Y",
"FULL": "%A %e %B %Y",
"SHORT": "%A %e %B %Y",
"DAY": "%a %e",

View File

@ -42,13 +42,12 @@
},
"Date": {
"dd/mm/yyyy": "gg/mm/aaaa",
"datepicker": "gg/mm/yyyy",
"datetime_parseformat": "g/m/Y",
"%A, den %e. %B %Y": "%A %e %B %Y",
"datepicker": "dd/mm/yyyy",
"datetime_parseformat": "d/m/Y",
"FULL": "%A %e %B %Y",
"SHORT": "%A %e %B %Y",
"DAY": "%a %e",
"DATE": "%Y-%m-%d",
"DATE": "%d/%m/%Y",
"MONTH_YEAR": "%B %Y",
"DATETIME": "%d/%m/%Y %H:%M",
"Add range dates": "IT_Ajout d'un intervalle de dates",
@ -296,7 +295,6 @@
"Migration": "Migrazione",
"Purge": "Depurare",
"Logs": "Log",
"Installation": "Installazione",
"Poll ID": "ID del sondaggio",
"Format": "Formato",
"Title": "Titolo",
@ -349,6 +347,21 @@
"Author's message": "Riservato all'autore",
"For sending to the polled users": "Per diffondere ai partecipanti al sondaggio"
},
"Installation": {
"AppMail": "IT_Adresse mail de l'application",
"AppName": "IT_Nom de l'application",
"CleanUrl": "IT_URL propres",
"Database": "IT_Base de données",
"DbConnectionString": "IT_Chaîne de connexion",
"DbPassword": "IT_Mot de passe",
"DbPrefix": "IT_Préfixe",
"DbUser": "IT_Utilisateur",
"DefaultLanguage": "IT_Langue par défaut",
"General": "IT_Général",
"Install": "IT_Installer",
"MigrationTable": "IT_Table de migration",
"ResponseMail": "IT_Mail de réponse"
},
"Error": {
"Error!": "Errore!",
"Enter a title": "È necessario inserire un titolo !",
@ -380,6 +393,8 @@
"The column already exists": "IT_La colonne existe déjà",
"MISSING_VALUES": "Valori mancanti",
"CANT_CONNECT_TO_DATABASE": "Impossibile connettersi al database",
"Password is empty": "IT_Le mot de passe est vide.",
"Passwords do not match": "IT_Les mots de passe ne correspondent pas.",
"Poll id already used": "IT_L'identifiant est déjà utilisé",
"You can't select more than %d dates": "IT_Vous ne pouvez pas choisir plus de %d dates",
"Can't create the config.php file in '%s'.": "IT_Impossible de créer le fichier config.php dans '%s'."

View File

@ -37,18 +37,19 @@
"Link": "Ligam",
"Search": "Cercar",
"Creation date:": "Data de creacion :",
"Caption": "OC_Légende",
"ASTERISK": "*"
},
"Date": {
"dd/mm/yyyy": "jj/mm/aaaa",
"%A, den %e. %B %Y": "%A %e %B %Y",
"datepicker": "dd/mm/yyyy",
"datetime_parseformat": "d/m/Y",
"FULL": "%A %e %B %Y",
"SHORT": "%A %e %B %Y",
"DAY": "%a %e",
"DATE": "%Y-%m-%d",
"DATE": "%d/%m/%Y",
"MONTH_YEAR": "%B %Y",
"DATETIME": "%d/%m/%Y %H:%M",
"Add range dates": "OC_Ajout d'un intervalle de dates",
"Max dates count": "OC_Vous pouvez sélectionner au maximum 4 mois",
"Start date": "OC_Date de début",
@ -161,6 +162,13 @@
"anonyme": "anonim",
"Comment added": "Comentari apondut"
},
"Password": {
"Password": "OC_Mot de passe",
"Wrong password": "OC_Mot de passe incorrect.",
"Submit access": "OC_Accèder",
"You have to provide a password to access the poll.": "OC_Vous devez donner le mot de passe pour avoir accès à ce sondage.",
"You have to provide a password so you can participate to the poll.": "OC_Vous devez donner le mot de passe pour pouvoir participer à ce sondage."
},
"studs": {
"If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.": "Per participar a aqueste sondatge, picatz vòstre nom, triatz totas las valors que vos agradan e validatz amb lo boton al cap de linha.",
"POLL_LOCKED_WARNING": "L'administrator a clavat aqueste sondatge. Los vòtes e comentaris son gelats, es pas mai possible de participar",
@ -220,12 +228,19 @@
"You are in the poll creation section.": "Avètz causit de crear un sondatge novèl.",
"Required fields cannot be left blank.": "Mercés de garnir totes los formularis obligatòris, marcats amb una *.",
"Poll title": "Títol del sondatge",
"Poll id": "OC_Identifiant",
"Poll id rules": "OC_L'identifiant peut contenir des lettres, des chiffres et des tirets \"-\".",
"Poll id warning": "OC_En définissant un identifiant cela peut faciliter l'accès à ce sondage pour des personnes non désirées. Il est recommandé de le protéger par mot de passe.",
"Votes cannot be modified": "Cap de vòte pòt pas èsser modificat",
"All voters can modify any vote": "Totes los votants pòdon modificar sos vòtes",
"Voters can modify their vote themselves": "Cadun pòt modificar son pròpri vòte",
"To receive an email for each new vote": "Recebre un messatge per cada participacion",
"To receive an email for each new comment": "Recebre un messatge per cada comentari",
"Only the poll maker can see the poll's results": "Solament lo creator del sondatge pòt veire los resultats",
"Use a password to restrict access": "OC_Utiliser un mot de passe pour restreindre l'accès au sondage",
"The results are publicly visible": "OC_Les résultats sont visibles sans mot de passe",
"Poll password": "OC_Mot de passe",
"Confirm password": "OC_Confirmer votre mot de passe ",
"Go to step 2": "Anar a l'etapa 2"
},
"Step 2": {
@ -280,7 +295,6 @@
"Migration": "Migracion",
"Purge": "Purga",
"Logs": "Istoric",
"Installation": "Installacion",
"Poll ID": "ID sondatge",
"Format": "Format",
"Title": "Títol",
@ -379,6 +393,9 @@
"The column already exists": "La colomna existís ja",
"MISSING_VALUES": "Mancan de valors",
"CANT_CONNECT_TO_DATABASE": "Impossible de se connectar a la banca de donadas",
"Password is empty": "OC_Le mot de passe est vide.",
"Passwords do not match": "OC_Les mots de passe ne correspondent pas.",
"Poll id already used": "OC_L'identifiant est déjà utilisé",
"You can't select more than %d dates": "OC_Vous ne pouvez pas choisir plus de %d dates",
"Can't create the config.php file in '%s'.": "OC_Impossible de créer le fichier config.php dans '%s'."
},

View File

@ -0,0 +1,48 @@
{extends file='page.tpl'}
{block name="header"}
<script type="text/javascript">
window.date_formats = {
DATE: '{__('Date', 'DATE')}',
DATEPICKER: '{__('Date', 'datepicker')}'
};
</script>
<script type="text/javascript" src="{'js/app/framadatepicker.js'|resource}"></script>
{/block}
{block name="main"}
<form name="formulaire" method="POST" class="form-horizontal" role="form">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="well summary">
<h4>{__('Step 3', 'List of your choices')}</h4>
{$summary}
</div>
<div class="alert alert-info">
<p>{__('Step 3', 'Your poll will automatically be archived')} {$default_poll_duration} {__('Generic', 'days')} {__('Step 3', 'after the last date of your poll.')}
<br />{__('Step 3', 'You can set a closer archiving date for it.')}</p>
<div class="form-group">
<label for="enddate" class="col-sm-5 control-label">{__('Step 3', 'Archiving date:')}</label>
<div class="col-sm-6">
<div class="input-group date">
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
<input type="text" class="form-control" id="enddate" data-date-format="{__('Date', 'dd/mm/yyyy')}" aria-describedby="dateformat" name="enddate" value="{$end_date_str}" size="10" maxlength="10" placeholder="{__('Date', 'dd/mm/yyyy')}" />
</div>
</div>
<span id="dateformat" class="sr-only">{__('Date', 'dd/mm/yyyy')}</span>
</div>
</div>
<div class="alert alert-warning">
<p>{__('Step 3', 'Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll.')}</p>
{if $use_smtp}
<p>{__('Step 3', 'Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.')}</p>
{/if}
</div>
<p class="text-right">
<button class="btn btn-default" onclick="javascript:window.history.back();" title="{__('Step 3', 'Back to step 2')}">{__('Generic', 'Back')}</button>
<button name="confirmation" value="confirmation" type="submit" class="btn btn-success">{__('Step 3', 'Create the poll')}</button>
</p>
</div>
</div>
</form>
{/block}