diff --git a/adminstuds.php b/adminstuds.php index af2cbaffcdaaef343263908d1fec9f89c496620c..9904f78736f9308f81651a62ea279273e6a183ab 100644 --- a/adminstuds.php +++ b/adminstuds.php @@ -742,8 +742,8 @@ echo ' <div class="input-group"> <input type="text" class="form-control" id="newemail" name="nouvelleadresse" size="40" value="'.$email_admin.'" /> <span class="input-group-btn"> - <button type="submit" name="boutonnouvelleadresse" value="1" class="btn btn-success" title="'. _('Save the adress email') .'"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">' . _('Save') . '</span></button> - <button class="btn btn-link btn-cancel" title="'. _('Cancel the adress email edit') .'"><span class="glyphicon glyphicon-remove"></span><span class="sr-only">' . _('Cancel') . '</span></button> + <button type="submit" name="boutonnouvelleadresse" value="1" class="btn btn-success" title="'. _('Save the email address ') .'"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">' . _('Save') . '</span></button> + <button class="btn btn-link btn-cancel" title="'. _('Cancel the email address edit') .'"><span class="glyphicon glyphicon-remove"></span><span class="sr-only">' . _('Cancel') . '</span></button> </span> </div> </div> diff --git a/choix_autre.php b/choix_autre.php index 66e8498b6a7f0fd2380f188e1dfff3f7a9196590..f85412021bc6cdfc94d16a1074a5276043c167e2 100644 --- a/choix_autre.php +++ b/choix_autre.php @@ -119,7 +119,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp } else { // text only - $li_subject_text = stripslashes($toutsujet[$i]); + $li_subject_text = stripslashes($_SESSION['choices'][$i]); $li_subject_html = $li_subject_text; } @@ -188,7 +188,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp <label for="choice'.$i.'" class="col-sm-2 control-label">'. _("Choice") .' '.($i+1).'</label> <div class="col-sm-10 input-group"> <input type="text" class="form-control" name="choices[]" size="40" value="'.$choice_value.'" id="choice'.$i.'" /> - <span class="input-group-addon btn-link md-a-img" title="'. _("Add a link or an image") .'" ><span class="glyphicon glyphicon-picture"></span>Â <span class="glyphicon glyphicon-link"></span></span> + <span class="input-group-addon btn-link md-a-img" title="'. _("Add a link or an image") .' - '. _("Choice") .' '.($i+1).'" ><span class="glyphicon glyphicon-picture"></span>Â <span class="glyphicon glyphicon-link"></span></span> </div> </div>'."\n"; } diff --git a/js/core.js b/js/core.js index 0472981ba038a6abd9197515d85e5ae2c7596e9a..5a01e8f4332b7bcc2afb831b129895131c4612e5 100644 --- a/js/core.js +++ b/js/core.js @@ -284,6 +284,7 @@ $(document).ready(function() { $(document).on('click', '.md-a-img', function() { $('#md-a-imgModal').modal('show'); $('#md-a-imgModal .btn-primary').attr('value',$(this).prev().attr('id')); + $('#md-a-imgModalLabel').text($(this).attr('title')); }); $('#md-a-imgModal .btn-primary').on('click', function() { if($('#md-img').val()!='' && $('#md-a').val()!='') { @@ -297,6 +298,7 @@ $(document).ready(function() { } $('#md-a-imgModal').modal('hide'); $('#md-img').val(''); $('#md-a').val('');$('#md-text').val(''); + SubmitChoicesAvalaible(); }); diff --git a/locale/fr_FR/LC_MESSAGES/Studs.mo b/locale/fr_FR/LC_MESSAGES/Studs.mo index 680e114fca5f185b4b3c1d8f3b822000ec09941d..b7274c3770d1faa475eab51b675cb0908c4bc7df 100644 Binary files a/locale/fr_FR/LC_MESSAGES/Studs.mo and b/locale/fr_FR/LC_MESSAGES/Studs.mo differ diff --git a/locale/fr_FR/LC_MESSAGES/Studs.po b/locale/fr_FR/LC_MESSAGES/Studs.po index 234a3bc9c7af3dffcea5a5a5062baf6052249434..c7eb8de49daf9419f310941574b794d7e2a8ac38 100644 --- a/locale/fr_FR/LC_MESSAGES/Studs.po +++ b/locale/fr_FR/LC_MESSAGES/Studs.po @@ -196,10 +196,10 @@ msgstr "Adresse email" msgid "Edit the email adress" msgstr "Modifier l'adresse email" -msgid "Save the adress email" +msgid "Save the email address " msgstr "Enregistrer l'adresse email" -msgid "Cancel the adress email edit" +msgid "Cancel the email address edit" msgstr "Annuler le changement d'adresse email" msgid "Edit the description" diff --git a/studs.php b/studs.php index f4aa4da0bf35cc75d46c8d2652f794c9e67206fd..c1d34599fd2792204231c1445da6dc548e3da0c0 100644 --- a/studs.php +++ b/studs.php @@ -47,13 +47,21 @@ if(Utils::issetAndNoEmpty('sondage') === true) { $numsondage = $_SESSION["numsondage"]; } -if ($numsondage !== false) { - $dsondage = Utils::get_sondage_from_id($numsondage); - if($dsondage === false) { - $err |= NO_POLL; - } -} else { - $err |= NO_POLL_ID; +$dsondage = ($numsondage != false) ? Utils::get_sondage_from_id($numsondage) : false; +if (!$dsondage || $dsondage->id_sondage == ''){ + Utils::print_header( _("Error!")); + + bandeau_titre(_("Error!")); + + echo ' + <div class="alert alert-warning"> + <h2>' . _("This poll doesn't exist !") . '</h2> + <p>' . _('Back to the homepage of ') . ' <a href="' . Utils::get_server_name() . '"> ' . NOMAPPLICATION . '</a></p> + </div>'."\n"; + + bandeau_pied(); + + die(); } //output a CSV and die() @@ -199,17 +207,6 @@ if($err != 0) { echo '</ul></div>'; - if(Utils::is_error(NO_POLL_ID) || Utils::is_error(NO_POLL)) { - echo ' - <div class="col-md-6 col-md-offset-3"> - <h2>' . _("This poll doesn't exist !") . '</h2> - <p>' . _('Back to the homepage of') . ' <a href="' . Utils::get_server_name() . '"> ' . NOMAPPLICATION . '</a></p> - </div>'."\n"; - - bandeau_pied(); - - die(); - } } else { Utils::print_header(_('Poll').' - '.$dsondage->titre); bandeau_titre(_("Make your polls"));