Fix #9, #10, bug récap liste des choix, « email adress »

This commit is contained in:
FramaJosephK 2014-10-22 15:42:35 +02:00
parent 43f668c53b
commit 5d9b33d6ab
6 changed files with 23 additions and 24 deletions

View File

@ -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>

View File

@ -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";
}

View File

@ -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();
});

Binary file not shown.

View File

@ -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"

View File

@ -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"));