Nb de colonnes minimum du sondage passé à 1 au lieu de 2

This commit is contained in:
FramaJosephK 2015-02-26 13:33:03 +01:00
parent edc7e84bd9
commit 3e1ef601ce
11 changed files with 21 additions and 33 deletions

View File

@ -113,7 +113,3 @@ while($dsondage = $sondage->FetchNextObject(false)) {
echo '</table></form>'."\n";
bandeau_pied(true);
// si on annule la suppression, rafraichissement de la page
if (Utils::issetAndNoEmpty('annulesuppression') === true) {
}

View File

@ -880,7 +880,7 @@ if (substr($dsondage->format, 0, 1)=="D") {
}
// Remove col
$tr_add_remove_col .= (count($toutsujet) > 2 ) ? '<td headers="'.$td_headers[$i].'"><button type="submit" name="effacecolonne'.$i.'" class="btn btn-link btn-sm" title="' . _('Remove the column') . ' ' .$radio_title[$i]. '"><span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">'. _("Remove") .'</span></button></td>' : '<td role="presentation"></td>';
$tr_add_remove_col .= (count($toutsujet) > 1 ) ? '<td headers="'.$td_headers[$i].'"><button type="submit" name="effacecolonne'.$i.'" class="btn btn-link btn-sm" title="' . _('Remove the column') . ' ' .$radio_title[$i]. '"><span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">'. _("Remove") .'</span></button></td>' : '<td role="presentation"></td>';
}

View File

@ -179,7 +179,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
<div class="col-md-8 col-md-offset-2">';
echo '
<div class="alert alert-info">
<p>'. _("To make a generic poll you need to propose at least two choices between differents subjects.") .'</p>
<p>'. _("To make a generic poll, it's better to propose at least two choices between differents subjects.") .'</p>
<p>'. _("You can add or remove additional choices with the buttons") .' <span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">'. _("Remove") .'</span> <span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add") .'</span></p>';
if($config['user_can_add_img_or_link']){
echo ' <p>'. _("It's possible to propose links or images by using "). '<a href="http://'.$lang.'.wikipedia.org/wiki/Markdown">'. _("the Markdown syntax") .'</a>.</p>';

View File

@ -191,7 +191,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
<div class="col-md-10 col-md-offset-1">
<h3>'. _("Choose the dates of your poll") .'</h3>
<div class="alert alert-info">
<p>'. _("To schedule an event you need to propose at least two choices (two hours for one day or two days).").'</p>
<p>'. _("To schedule an event, it's better to propose at least two choices (two hours for one day or two days).").'</p>
<p>'. _("You can add or remove additionnal days and hours with the buttons") .' <span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">'. _("Remove") .'</span> <span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add") .'</span></p>
<p>'. _("For each selected day, you can choose, or not, meeting hours (e.g.: \"8h\", \"8:30\", \"8h-10h\", \"evening\", etc.)").'</p>
</div>';

View File

@ -188,25 +188,17 @@ $(document).ready(function() {
});
});
// 1 day and 2 hours or 2 days and you can submit
// 1 day filled and you can submit
function SubmitDaysAvalaible() {
var nb_filled_days = 0;
var nb_filled_hours = 0;
$('#selected-days fieldset legend input').each(function() {
if($(this).val()!='') {
nb_filled_days++;
}
});
$('#selected-days .hours').each(function() {
if($(this).val()!='') {
nb_filled_hours++;
}
});
if (nb_filled_days>1) {
$('button[name="choixheures"]').removeClass('disabled');
} else if (nb_filled_hours>1 && nb_filled_days==1) {
if (nb_filled_days>0) {
$('button[name="choixheures"]').removeClass('disabled');
} else {
$('button[name="choixheures"]').addClass('disabled');
@ -218,8 +210,8 @@ $(document).ready(function() {
});
SubmitDaysAvalaible();
// 2 days and you can remove a day or copy hours
if($('#selected-days fieldset').length>1) {
// 1 days and you can remove a day or copy hours
if($('#selected-days fieldset').length>0) {
$('#remove-a-day, #copyhours').removeClass('disabled');
}
@ -256,13 +248,13 @@ $(document).ready(function() {
$('.choice-field:last').remove();
var nb_choices = $('.choice-field').length;
$('#choice'+(nb_choices-1)).focus();
if (nb_choices == 2) {
if (nb_choices == 1) {
$('#remove-a-choice').addClass('disabled');
};
SubmitChoicesAvalaible();
});
// 2 choices filled and you can submit
// 1 choice filled and you can submit
function SubmitChoicesAvalaible() {
var nb_filled_choices = 0;
$('.choice-field input').each(function() {
@ -270,7 +262,7 @@ $(document).ready(function() {
nb_filled_choices++;
}
});
if(nb_filled_choices>1) {
if(nb_filled_choices>0) {
$('button[name="fin_sondage_autre"]').removeClass('disabled');
} else {
$('button[name="fin_sondage_autre"]').addClass('disabled');

Binary file not shown.

View File

@ -455,7 +455,7 @@ msgstr "Umfragedaten (2 von 3)"
msgid "Choose the dates of your poll"
msgstr "Wählen Sie Terminmöglichkeiten für Ihre Umfrage"
msgid "To schedule an event you need to propose at least two choices (two hours for one day or two days)."
msgid "To schedule an event, it's better to propose at least two choices (two hours for one day or two days)."
msgstr "Um eine Umfrage für einen Termin zu erstellen, müssen Sie mindestens zwei Auswahlmöglichkeiten angeben (zwei verschiedene Zeiten an einem Tag oder zwei Tage)."
msgid "You can add or remove additionnal days and hours with the buttons"
@ -495,7 +495,7 @@ msgstr "Alle Uhrzeiten entfernen"
msgid "Poll subjects (2 on 3)"
msgstr "Umfragethemen (2 von 3)"
msgid "To make a generic poll you need to propose at least two choices between differents subjects."
msgid "To make a generic poll, it's better to propose at least two choices between differents subjects."
msgstr "Um eine allgemeine Umfrage zu erstellen, benötigen Sie mindestens zwei Auswahlmöglichkeiten zwischen verschiedenen Themen."
msgid "You can add or remove additional choices with the buttons"

Binary file not shown.

View File

@ -461,8 +461,8 @@ msgstr "Poll dates (2 on 3)"
msgid "Choose the dates of your poll"
msgstr "Choose the dates of your poll"
msgid "To schedule an event you need to propose at least two choices (two hours for one day or two days)."
msgstr "To schedule an event you need to propose at least two choices (two hours for one day or two days)."
msgid "To schedule an event, it's better to propose at least two choices (two hours for one day or two days)."
msgstr "To schedule an event, it's better to propose at least two choices (two hours for one day or two days)."
msgid "You can add or remove additionnal days and hours with the buttons"
msgstr "You can add or remove additionnal days and hours with the buttons"
@ -501,8 +501,8 @@ msgstr "Remove all hours"
msgid "Poll subjects (2 on 3)"
msgstr "Poll subjects (2 on 3)"
msgid "To make a generic poll you need to propose at least two choices between differents subjects."
msgstr "To make a generic poll you need to propose at least two choices between differents subjects."
msgid "To make a generic poll, it's better to propose at least two choices between differents subjects."
msgstr "To make a generic poll, it's better to propose at least two choices between differents subjects."
msgid "You can add or remove additional choices with the buttons"
msgstr "You can add or remove additional choices with the buttons"

Binary file not shown.

View File

@ -461,8 +461,8 @@ msgstr "Choix des dates (2 sur 3)"
msgid "Choose the dates of your poll"
msgstr "Choisissez les dates de votre sondage"
msgid "To schedule an event you need to propose at least two choices (two hours for one day or two days)."
msgstr "Pour créer un sondage spécial dates vous devez proposer au moins deux choix (deux horaires pour une même journée ou deux jours)."
msgid "To schedule an event, it's better to propose at least two choices (two hours for one day or two days)."
msgstr "Pour créer un sondage spécial dates, il est préférable de proposer au moins deux choix (deux horaires pour une même journée ou deux jours)."
msgid "You can add or remove additionnal days and hours with the buttons"
msgstr "Vous pouvez ajouter ou supprimer des jours et horaires supplémentaires avec les boutons"
@ -501,8 +501,8 @@ msgstr "Effacer tous les horaires"
msgid "Poll subjects (2 on 3)"
msgstr "Choix des sujets (2 sur 3)"
msgid "To make a generic poll you need to propose at least two choices between differents subjects."
msgstr "Pour créer un sondage classique, vous devez proposer au moins deux choix différents."
msgid "To make a generic poll, it's better to propose at least two choices between differents subjects."
msgstr "Pour créer un sondage classique, il est préférable de proposer au moins deux choix différents."
msgid "You can add or remove additional choices with the buttons"
msgstr "Vous pouvez ajouter ou supprimer des choix supplémentaires avec les boutons"
@ -580,7 +580,7 @@ msgid "You can fix another removal date for it."
msgstr "Néanmoins vous pouvez décider ci-dessous d'une date plus rapprochée pour la suppression de votre sondage."
msgid "Removal date (optional)"
msgstr "Date de fin (facultative)"
msgstr "Date de suppression (facultative)"
############# Admin #############
msgid "Polls administrator"