Nb de colonnes minimum du sondage passé à 1 au lieu de 2
This commit is contained in:
parent
edc7e84bd9
commit
3e1ef601ce
@ -113,7 +113,3 @@ while($dsondage = $sondage->FetchNextObject(false)) {
|
|||||||
echo '</table></form>'."\n";
|
echo '</table></form>'."\n";
|
||||||
|
|
||||||
bandeau_pied(true);
|
bandeau_pied(true);
|
||||||
|
|
||||||
// si on annule la suppression, rafraichissement de la page
|
|
||||||
if (Utils::issetAndNoEmpty('annulesuppression') === true) {
|
|
||||||
}
|
|
||||||
|
@ -880,7 +880,7 @@ if (substr($dsondage->format, 0, 1)=="D") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove col
|
// 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>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
|
|||||||
<div class="col-md-8 col-md-offset-2">';
|
<div class="col-md-8 col-md-offset-2">';
|
||||||
echo '
|
echo '
|
||||||
<div class="alert alert-info">
|
<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>';
|
<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']){
|
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>';
|
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>';
|
||||||
|
@ -191,7 +191,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
|
|||||||
<div class="col-md-10 col-md-offset-1">
|
<div class="col-md-10 col-md-offset-1">
|
||||||
<h3>'. _("Choose the dates of your poll") .'</h3>
|
<h3>'. _("Choose the dates of your poll") .'</h3>
|
||||||
<div class="alert alert-info">
|
<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>'. _("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>
|
<p>'. _("For each selected day, you can choose, or not, meeting hours (e.g.: \"8h\", \"8:30\", \"8h-10h\", \"evening\", etc.)").'</p>
|
||||||
</div>';
|
</div>';
|
||||||
|
22
js/core.js
22
js/core.js
@ -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() {
|
function SubmitDaysAvalaible() {
|
||||||
var nb_filled_days = 0;
|
var nb_filled_days = 0;
|
||||||
var nb_filled_hours = 0;
|
|
||||||
|
|
||||||
$('#selected-days fieldset legend input').each(function() {
|
$('#selected-days fieldset legend input').each(function() {
|
||||||
if($(this).val()!='') {
|
if($(this).val()!='') {
|
||||||
nb_filled_days++;
|
nb_filled_days++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('#selected-days .hours').each(function() {
|
|
||||||
if($(this).val()!='') {
|
|
||||||
nb_filled_hours++;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (nb_filled_days>1) {
|
if (nb_filled_days>0) {
|
||||||
$('button[name="choixheures"]').removeClass('disabled');
|
|
||||||
} else if (nb_filled_hours>1 && nb_filled_days==1) {
|
|
||||||
$('button[name="choixheures"]').removeClass('disabled');
|
$('button[name="choixheures"]').removeClass('disabled');
|
||||||
} else {
|
} else {
|
||||||
$('button[name="choixheures"]').addClass('disabled');
|
$('button[name="choixheures"]').addClass('disabled');
|
||||||
@ -218,8 +210,8 @@ $(document).ready(function() {
|
|||||||
});
|
});
|
||||||
SubmitDaysAvalaible();
|
SubmitDaysAvalaible();
|
||||||
|
|
||||||
// 2 days and you can remove a day or copy hours
|
// 1 days and you can remove a day or copy hours
|
||||||
if($('#selected-days fieldset').length>1) {
|
if($('#selected-days fieldset').length>0) {
|
||||||
$('#remove-a-day, #copyhours').removeClass('disabled');
|
$('#remove-a-day, #copyhours').removeClass('disabled');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -256,13 +248,13 @@ $(document).ready(function() {
|
|||||||
$('.choice-field:last').remove();
|
$('.choice-field:last').remove();
|
||||||
var nb_choices = $('.choice-field').length;
|
var nb_choices = $('.choice-field').length;
|
||||||
$('#choice'+(nb_choices-1)).focus();
|
$('#choice'+(nb_choices-1)).focus();
|
||||||
if (nb_choices == 2) {
|
if (nb_choices == 1) {
|
||||||
$('#remove-a-choice').addClass('disabled');
|
$('#remove-a-choice').addClass('disabled');
|
||||||
};
|
};
|
||||||
SubmitChoicesAvalaible();
|
SubmitChoicesAvalaible();
|
||||||
});
|
});
|
||||||
|
|
||||||
// 2 choices filled and you can submit
|
// 1 choice filled and you can submit
|
||||||
function SubmitChoicesAvalaible() {
|
function SubmitChoicesAvalaible() {
|
||||||
var nb_filled_choices = 0;
|
var nb_filled_choices = 0;
|
||||||
$('.choice-field input').each(function() {
|
$('.choice-field input').each(function() {
|
||||||
@ -270,7 +262,7 @@ $(document).ready(function() {
|
|||||||
nb_filled_choices++;
|
nb_filled_choices++;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if(nb_filled_choices>1) {
|
if(nb_filled_choices>0) {
|
||||||
$('button[name="fin_sondage_autre"]').removeClass('disabled');
|
$('button[name="fin_sondage_autre"]').removeClass('disabled');
|
||||||
} else {
|
} else {
|
||||||
$('button[name="fin_sondage_autre"]').addClass('disabled');
|
$('button[name="fin_sondage_autre"]').addClass('disabled');
|
||||||
|
Binary file not shown.
@ -455,7 +455,7 @@ msgstr "Umfragedaten (2 von 3)"
|
|||||||
msgid "Choose the dates of your poll"
|
msgid "Choose the dates of your poll"
|
||||||
msgstr "Wählen Sie Terminmöglichkeiten für Ihre Umfrage"
|
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)."
|
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"
|
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)"
|
msgid "Poll subjects (2 on 3)"
|
||||||
msgstr "Umfragethemen (2 von 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."
|
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"
|
msgid "You can add or remove additional choices with the buttons"
|
||||||
|
Binary file not shown.
@ -461,8 +461,8 @@ msgstr "Poll dates (2 on 3)"
|
|||||||
msgid "Choose the dates of your poll"
|
msgid "Choose the dates of your poll"
|
||||||
msgstr "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)."
|
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 you need 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"
|
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"
|
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)"
|
msgid "Poll subjects (2 on 3)"
|
||||||
msgstr "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."
|
msgid "To make a generic poll, it's better 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."
|
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"
|
msgid "You can add or remove additional choices with the buttons"
|
||||||
msgstr "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.
@ -461,8 +461,8 @@ msgstr "Choix des dates (2 sur 3)"
|
|||||||
msgid "Choose the dates of your poll"
|
msgid "Choose the dates of your poll"
|
||||||
msgstr "Choisissez les dates de votre sondage"
|
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)."
|
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 vous devez proposer au moins deux choix (deux horaires pour une même journée ou deux jours)."
|
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"
|
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"
|
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)"
|
msgid "Poll subjects (2 on 3)"
|
||||||
msgstr "Choix des sujets (2 sur 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."
|
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, vous devez proposer au moins deux choix différents."
|
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"
|
msgid "You can add or remove additional choices with the buttons"
|
||||||
msgstr "Vous pouvez ajouter ou supprimer des choix supplémentaires avec les boutons"
|
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."
|
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)"
|
msgid "Removal date (optional)"
|
||||||
msgstr "Date de fin (facultative)"
|
msgstr "Date de suppression (facultative)"
|
||||||
|
|
||||||
############# Admin #############
|
############# Admin #############
|
||||||
msgid "Polls administrator"
|
msgid "Polls administrator"
|
||||||
|
Loading…
Reference in New Issue
Block a user