Merge branch 'issue-9-10' into 'master'
Fix #9, #10, bug récap liste des choix, « email adress » - traduction adresse email - mauvaise variable sur étape 3 choix_autre.php pour la confirmation des choix - title et titre de modal contextualisé pour l'ajout d'images/liens sur choix_autre.php (a11y) - fix issue #9 - fix issue #10 (il y aurait du nettoyage à faire sur le traitement en amont des données) See merge request !7
This commit is contained in:
commit
b1acc59cbf
@ -742,8 +742,8 @@ echo '
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="form-control" id="newemail" name="nouvelleadresse" size="40" value="'.$email_admin.'" />
|
<input type="text" class="form-control" id="newemail" name="nouvelleadresse" size="40" value="'.$email_admin.'" />
|
||||||
<span class="input-group-btn">
|
<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 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 adress email edit') .'"><span class="glyphicon glyphicon-remove"></span><span class="sr-only">' . _('Cancel') . '</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>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -119,7 +119,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
|
|||||||
|
|
||||||
} else { // text only
|
} else { // text only
|
||||||
|
|
||||||
$li_subject_text = stripslashes($toutsujet[$i]);
|
$li_subject_text = stripslashes($_SESSION['choices'][$i]);
|
||||||
$li_subject_html = $li_subject_text;
|
$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>
|
<label for="choice'.$i.'" class="col-sm-2 control-label">'. _("Choice") .' '.($i+1).'</label>
|
||||||
<div class="col-sm-10 input-group">
|
<div class="col-sm-10 input-group">
|
||||||
<input type="text" class="form-control" name="choices[]" size="40" value="'.$choice_value.'" id="choice'.$i.'" />
|
<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>
|
||||||
</div>'."\n";
|
</div>'."\n";
|
||||||
}
|
}
|
||||||
|
@ -284,6 +284,7 @@ $(document).ready(function() {
|
|||||||
$(document).on('click', '.md-a-img', function() {
|
$(document).on('click', '.md-a-img', function() {
|
||||||
$('#md-a-imgModal').modal('show');
|
$('#md-a-imgModal').modal('show');
|
||||||
$('#md-a-imgModal .btn-primary').attr('value',$(this).prev().attr('id'));
|
$('#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() {
|
$('#md-a-imgModal .btn-primary').on('click', function() {
|
||||||
if($('#md-img').val()!='' && $('#md-a').val()!='') {
|
if($('#md-img').val()!='' && $('#md-a').val()!='') {
|
||||||
@ -297,6 +298,7 @@ $(document).ready(function() {
|
|||||||
}
|
}
|
||||||
$('#md-a-imgModal').modal('hide');
|
$('#md-a-imgModal').modal('hide');
|
||||||
$('#md-img').val(''); $('#md-a').val('');$('#md-text').val('');
|
$('#md-img').val(''); $('#md-a').val('');$('#md-text').val('');
|
||||||
|
SubmitChoicesAvalaible();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
Binary file not shown.
@ -196,10 +196,10 @@ msgstr "Adresse email"
|
|||||||
msgid "Edit the email adress"
|
msgid "Edit the email adress"
|
||||||
msgstr "Modifier l'adresse email"
|
msgstr "Modifier l'adresse email"
|
||||||
|
|
||||||
msgid "Save the adress email"
|
msgid "Save the email address "
|
||||||
msgstr "Enregistrer l'adresse email"
|
msgstr "Enregistrer l'adresse email"
|
||||||
|
|
||||||
msgid "Cancel the adress email edit"
|
msgid "Cancel the email address edit"
|
||||||
msgstr "Annuler le changement d'adresse email"
|
msgstr "Annuler le changement d'adresse email"
|
||||||
|
|
||||||
msgid "Edit the description"
|
msgid "Edit the description"
|
||||||
|
33
studs.php
33
studs.php
@ -47,13 +47,21 @@ if(Utils::issetAndNoEmpty('sondage') === true) {
|
|||||||
$numsondage = $_SESSION["numsondage"];
|
$numsondage = $_SESSION["numsondage"];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($numsondage !== false) {
|
$dsondage = ($numsondage != false) ? Utils::get_sondage_from_id($numsondage) : false;
|
||||||
$dsondage = Utils::get_sondage_from_id($numsondage);
|
if (!$dsondage || $dsondage->id_sondage == ''){
|
||||||
if($dsondage === false) {
|
Utils::print_header( _("Error!"));
|
||||||
$err |= NO_POLL;
|
|
||||||
}
|
bandeau_titre(_("Error!"));
|
||||||
} else {
|
|
||||||
$err |= NO_POLL_ID;
|
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()
|
//output a CSV and die()
|
||||||
@ -199,17 +207,6 @@ if($err != 0) {
|
|||||||
|
|
||||||
echo '</ul></div>';
|
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 {
|
} else {
|
||||||
Utils::print_header(_('Poll').' - '.$dsondage->titre);
|
Utils::print_header(_('Poll').' - '.$dsondage->titre);
|
||||||
bandeau_titre(_("Make your polls"));
|
bandeau_titre(_("Make your polls"));
|
||||||
|
Loading…
Reference in New Issue
Block a user