Merge branch 'a11y-i18n' into 'master'

Retouches

- typo « Enregister »
- compilation des .po (suite merge précédent)
- ajout entête de mail pour éviter les réponses #15
- agrandissement du formulaire info-sondage à col-md-8 (comme sur choix_autre/choix_date)

## A11y
- sous-titre en h2 au lieu de p.lead et décalage de niveau dans la hiérarchie
- ajout d'un titre à la partie sondage
- h2 contextualisé sur adminstuds et studs + arrière plan en rouge sur le jumbotron admin
- meilleure ancre textuelle pour les boutons ajouter/supprimer sur choix_date (pour distinguer les horaires des jours)

See merge request !11
This commit is contained in:
JosephK 2014-11-06 15:35:07 +01:00
commit aa185f4d19
15 changed files with 46 additions and 56 deletions

View File

@ -39,7 +39,7 @@ while($dsondage = $sondage->FetchNextObject(false)) {
if (Utils::issetAndNoEmpty('supprimersondage'.$dsondage->id_sondage) === true) {
echo '
<div class="alert alert-warning text-center">
<h2>'. _("Confirm removal of the poll ") .'"'.$dsondage->id_sondage.'</h2>
<h3>'. _("Confirm removal of the poll ") .'"'.$dsondage->id_sondage.'</h3>
<p><button class="btn btn-default" type="submit" value="1" name="annullesuppression">'._("Keep this poll!").'</button>
<button type="submit" name="confirmesuppression'.$dsondage->id_sondage.'" value="1" class="btn btn-danger">'._("Remove this poll!").'</button></p>
</div>';

View File

@ -690,17 +690,17 @@ if ($errors!='') {
} else {
Utils::print_header(_('Poll administration').' - '.$title);
bandeau_titre(_("Make your polls"));
bandeau_titre(_('Poll administration').' - '.$title);
// session_unset();
}
echo '
<form name="formulaire4" action="' . Utils::getUrlSondage($numsondageadmin, true) . '" method="POST">
<div class="jumbotron">
<div class="jumbotron bg-danger">
<div class="row">
<div class="col-md-7" id="title-form">
<h2>'.$title.'<button class="btn btn-link btn-sm btn-edit" title="'. _('Edit the title') .'"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">' . _('Edit') . '</span></button></h2>
<h3>'.$title.'<button class="btn btn-link btn-sm btn-edit" title="'. _('Edit the title') .'"> <span class="glyphicon glyphicon-pencil"></span><span class="sr-only">' . _('Edit') . '</span></button></h3>
<div class="hidden js-title">
<label class="sr-only" for="newtitle">'. _("Title") .'</label>
<div class="input-group">
@ -732,7 +732,7 @@ echo '
<div class="col-md-5">
<div class="form-group" >
<div id="author-form">
<h3 class="control-label">'. _("Initiator of the poll") .'</h3>
<h4 class="control-label">'. _("Initiator of the poll") .'</h4>
<p> '.stripslashes($dsondage->nom_admin).'</p>
</div>
<div id="email-form">
@ -770,7 +770,7 @@ echo '
<input class="form-control" id="admin-link" type="text" readonly="readonly" value="' . Utils::getUrlSondage($numsondageadmin, true) . '" />
</div>
<div class="form-group col-md-2">
<h3 class="control-label">'. _("Expiration's date") .'</h3>
<h4 class="control-label">'. _("Expiration's date") .'</h4>
<p>'.date("d/m/Y",strtotime($dsondage->date_fin)).'</p>
</div>
</div>
@ -964,6 +964,7 @@ echo '
</div>
</div>
<h3>'._('Votes of the poll ').'</h3>
<div id="tableContainer" class="tableContainer">
<table class="results">
<caption class="sr-only">'._('Votes of the poll ').$title.'</caption>

View File

@ -176,6 +176,8 @@ class Utils
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-Type: text/plain; charset=UTF-8\n";
$headers .= "Content-Transfer-Encoding: 8bit";
$headers .= "Auto-Submitted:auto-generated";
$headers .= "Return-Path: <>";
$body = html_entity_decode($body, ENT_QUOTES, 'UTF-8')._("\n--\n\n« La route est longue, mais la voie est libre… »\nFramasoft ne vit que par vos dons (déductibles des impôts).\nMerci d'avance pour votre soutien http://soutenir.framasoft.org.");

View File

@ -23,7 +23,7 @@ include_once __DIR__ . '/app/inc/init.php';
// bandeaux de titre
function bandeau_titre($titre)
{
$img = ( IMAGE_TITRE ) ? '<img src="'. Utils::get_server_name(). IMAGE_TITRE. '" title="'._("Home").' - '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'">' : '';
$img = ( IMAGE_TITRE ) ? '<img src="'. Utils::get_server_name(). IMAGE_TITRE. '" alt="'.NOMAPPLICATION.'">' : '';
echo '
<header role="banner">
<form method="post" action="#">
@ -35,7 +35,7 @@ function bandeau_titre($titre)
</div>
</form>
<h1><a href="'.str_replace('/admin','', Utils::get_server_name()).'" title="'._("Home").' - '.NOMAPPLICATION.'">'.$img.'</a></h1>
<p class="lead"><i>'. $titre .'</i></p>
<h2 class="lead"><i>'. $titre .'</i></h2>
<hr class="trait" />
</header>
<main role="main">';

View File

@ -35,7 +35,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
echo '
<div class="alert alert-danger">
<h2>' . _("You haven't filled the first section of the poll creation.") . ' !</h2>
<h3>' . _("You haven't filled the first section of the poll creation.") . ' !</h3>
<p>' . _("Back to the homepage of ") . ' <a href="' . Utils::get_server_name() . '"> ' . NOMAPPLICATION . '</a></p>
</div>'."\n";
@ -133,7 +133,7 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="well summary">
<h3>'. _("List of your choices").'</h3>
<h4>'. _("List of your choices").'</h4>
'. $summary .'
</div>
<div class="alert alert-info">

View File

@ -36,7 +36,7 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
echo '
<div class="alert alter-danger">
<h2>' . _("You haven't filled the first section of the poll creation.") . ' !</h2>
<h3>' . _("You haven't filled the first section of the poll creation.") . ' !</h3>
<p>' . _("Back to the homepage of ") . ' ' . '<a href="' . Utils::get_server_name() . '">' . NOMAPPLICATION . '</a>.</p>
</div>';
@ -144,9 +144,9 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
<form name="formulaire" action="' . Utils::get_server_name() . 'choix_date.php" method="POST" class="form-horizontal" role="form">
<div class="row" id="selected-days">
<div class="col-md-8 col-md-offset-2">
<h2>'. _("Confirm the creation of your poll") .'</h2>
<h3>'. _("Confirm the creation of your poll") .'</h3>
<div class="well summary">
<h3>'. _("List of your choices").'</h3>
<h4>'. _("List of your choices").'</h4>
'. $summary .'
</div>
<div class="alert alert-info clearfix">
@ -185,7 +185,7 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
<form name="formulaire" action="' . Utils::get_server_name() . 'choix_date.php" method="POST" class="form-horizontal" role="form">
<div class="row" id="selected-days">
<div class="col-md-10 col-md-offset-1">
<h2>'. _("Choose the dates of your poll") .'</h2>
<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>'. _("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>
@ -218,8 +218,8 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
}
echo '
<div class="col-sm-2"><div class="btn-group btn-group-xs" style="margin-top: 5px;">
<button type="button" title="'. _("Remove an hour") .'" class="remove-an-hour btn btn-default"><span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">'. _("Remove") .'</span></button>
<button type="button" title="'. _("Add an hour") .'" class="add-an-hour btn btn-default"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add") .'</span></button>
<button type="button" title="'. _("Remove an hour") .'" class="remove-an-hour btn btn-default"><span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">'. _("Remove an hour") .'</span></button>
<button type="button" title="'. _("Add an hour") .'" class="add-an-hour btn btn-default"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add an hour") .'</span></button>
</div></div>
</div>
</fieldset>';
@ -228,8 +228,8 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
<div class="col-md-4">
<button type="button" id="copyhours" class="btn btn-default disabled" title="'. _("Copy hours of the first day") .'"><span class="glyphicon glyphicon-sort-by-attributes-alt text-info"></span><span class="sr-only">'. _("Copy hours of the first day") .'</span></button>
<div class="btn-group btn-group">
<button type="button" id="remove-a-day" class="btn btn-default disabled" title="'. _("Remove a day") .'"><span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">'. _("Remove") .'</span></button>
<button type="button" id="add-a-day" class="btn btn-default" title="'. _("Add a day") .'"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add") .'</span></button>
<button type="button" id="remove-a-day" class="btn btn-default disabled" title="'. _("Remove a day") .'"><span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">'. _("Remove a day") .'</span></button>
<button type="button" id="add-a-day" class="btn btn-default" title="'. _("Add a day") .'"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add a day") .'</span></button>
</div>
</div>
<div class="col-md-8 text-right">

View File

@ -3,7 +3,6 @@
.text-muted a,
a.text-muted {
color: #767676;
border-color: #767676;
}
.text-muted a:hover,
@ -11,78 +10,61 @@ a.text-muted {
a.text-muted:hover,
a.text-muted:focus {
color: #5e5e5e;
border-color:#5e5e5e;
border-bottom-style:solid;
}
.text-primary,
.text-primary a,
a.text-primary {
color: #6A5687;
border-color: #6A5687;
}
.text-primary a:hover,
.text-primary a:focus,
a.text-primary:hover,
a.text-primary:focus {
color: #583C66;
border-color: #583C66;
border-bottom-style:solid;
}
.text-success,
.text-success a,
a.text-success {
color: #606E38;
border-color: #606E38;
}
.text-success a:hover,
.text-success a:focus,
a.text-success:hover,
a.text-success:focus {
color: #67753C;
border-color: #67753C;
border-bottom-style:solid;
}
.text-info,
.text-info a,
a.text-info {
color: #31748F;
border-color: #31748F;
}
.text-info a:hover,
.text-info a:focus,
a.text-info:hover,
a.text-info:focus {
color: #245569;
border-color: #31748F;
border-bottom-style:solid;
}
.text-warning,
.text-warning a,
a.text-warning {
color: #8A6E3B;
border-color: #8A6E3B;
}
.text-warning a:hover,
.text-warning a:focus,
a.text-warning:hover,
a.text-warning:focus {
color: #66522C;
border-color: #66522C;
border-bottom-style:solid;
}
.text-danger,
.text-danger a,
a.text-danger {
color: #A94E42;
border-color: #A94E42;
}
.text-danger a:hover,
.text-danger a:focus,
a.text-danger:hover,
a.text-danger:focus {
color: #843D34;
border-color: #843D34;
border-bottom-style:solid;
}
/* Background */
@ -92,7 +74,6 @@ a.bg-primary:focus,
a.bg-primary:hover {
color: #fff;
background-color: #6A5687;
border-color:#fff;
}
.bg-success, a.bg-success:hover {
background-color: #EAF0D8;
@ -448,3 +429,8 @@ fieldset[disabled] .btn-link:focus {
background-color: #767676;
}
/* Modal header title */
.modal-header h1,.modal-header h2,.modal-header h3,
.modal-header h4,.modal-header h5,.modal-header h6 {
font-size: 24px;
}

View File

@ -53,7 +53,7 @@ echo '
<hr />
<div class="row">
<div class="col-md-4">
<h2>'. _('What is that?') . '</h2>
<h3>'. _('What is that?') . '</h3>
<p class="text-center"><span class="glyphicon glyphicon-question-sign" style="font-size:50px"></span></p>
<p>'. _('Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required.') .'</p>
<p>'. _('Here is how it works:') . '</p>
@ -66,7 +66,7 @@ echo '
<p>'. _('Do you want to ') . '<a href="' . Utils::getUrlSondage('aqg259dth55iuhwm').'">'. _("view an example?") .'</a></p>
</div>
<div class="col-md-4">
<h2>'. _('The software') .'</h2>
<h3>'. _('The software') .'</h3>
<p class="text-center"><span class="glyphicon glyphicon-cloud" style="font-size:50px"></span></p>
<p>'. _('Framadate was initially based on '). '<a href="https://sourcesup.cru.fr/projects/studs/">Studs</a>'. _(' a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft') .'.</p>
<p>'. _('This software needs javascript and cookies enabled. It is compatible with the following web browsers:') .'</p>
@ -80,7 +80,7 @@ echo '
<p>'. _('It is governed by the ').'<a href="http://www.cecill.info">'. _('CeCILL-B license').'</a>.</p>
</div>
<div class="col-md-4">
<h2>'. _('Cultivate your garden') .'</h2>
<h3>'. _('Cultivate your garden') .'</h3>
<p class="text-center"><span class="glyphicon glyphicon-tree-deciduous" style="font-size:50px"></span></p>
<p>'. _('To participate in the software development, suggest improvements or simply download it, please visit ') .'<a href="https://git.framasoft.org/framasoft/framadate">'._('the development site').'</a>.</p>
<br />

View File

@ -190,13 +190,13 @@ if (!$_SESSION["adresse"] && Utils::issetAndNoEmpty("poursuivre")) {
if (USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) {
$input_name = '<input type="hidden" name="nom" value="'.$_SESSION["nom"].'" />'.stripslashes($_SESSION["nom"]);
} else {
$input_name = '<input id="yourname" type="text" name="nom" class="form-control" '.$errors['name']['aria'].' maxlength="40" value="'.stripslashes($_SESSION["nom"]).'" />';
$input_name = '<input id="yourname" type="text" name="nom" class="form-control" '.$errors['name']['aria'].' value="'.stripslashes($_SESSION["nom"]).'" />';
}
if (USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) {
$input_email = '<input type="hidden" name="adresse" value="'.$_SESSION["adresse"].'">'.$_SESSION["adresse"];
} else {
$input_email = '<input id="email" type="text" name="adresse" class="form-control" '.$errors['email']['aria'].' maxlength="64" value="'.$_SESSION["adresse"].'" />';
$input_email = '<input id="email" type="text" name="adresse" class="form-control" '.$errors['email']['aria'].' value="'.$_SESSION["adresse"].'" />';
}
// Checkbox checked ?
@ -215,7 +215,7 @@ if ($_SESSION["mailsonde"]) {
// Affichage du formulaire
echo '
<div class="row">
<div class="col-md-6 col-md-offset-3" >
<div class="col-md-8 col-md-offset-2" >
<form name="formulaire" id="formulaire" action="' . Utils::get_server_name() . 'infos_sondage.php" method="POST" class="form-horizontal" role="form">
<div class="alert alert-info">
@ -223,29 +223,29 @@ echo '
</div>
<div class="form-group'.$errors['title']['class'].'">
<label for="poll_title" class="col-sm-5 control-label">' . _("Poll title") . ' *</label>
<div class="col-sm-7">
<input id="poll_title" type="text" name="titre" class="form-control" '.$errors['title']['aria'].' maxlength="80" value="'.stripslashes($_SESSION["titre"]).'" />
<label for="poll_title" class="col-sm-4 control-label">' . _("Poll title") . ' *</label>
<div class="col-sm-8">
<input id="poll_title" type="text" name="titre" class="form-control" '.$errors['title']['aria'].' value="'.stripslashes($_SESSION["titre"]).'" />
</div>
</div>
'.$errors['title']['msg'].'
<div class="form-group'.$errors['description']['class'].'">
<label for="poll_comments" class="col-sm-5 control-label">'. _("Description") .'</label>
<div class="col-sm-7">
<label for="poll_comments" class="col-sm-4 control-label">'. _("Description") .'</label>
<div class="col-sm-8">
<textarea id="poll_comments" name="commentaires" class="form-control" '.$errors['description']['aria'].' rows="5">'.stripslashes($_SESSION["commentaires"]).'</textarea>
</div>
</div>
'.$errors['description']['msg'].'
<div class="form-group'.$errors['name']['class'].'">
<label for="yourname" class="col-sm-5 control-label">'. _("Your name") .' *</label>
<div class="col-sm-7">
<label for="yourname" class="col-sm-4 control-label">'. _("Your name") .' *</label>
<div class="col-sm-8">
'.$input_name.'
</div>
</div>
'.$errors['name']['msg'].'
<div class="form-group'.$errors['email']['class'].'">
<label for="email" class="col-sm-5 control-label">'. _("Your email address") .' *</label>
<div class="col-sm-7">
<label for="email" class="col-sm-4 control-label">'. _("Your email address") .' *</label>
<div class="col-sm-8">
'.$input_email.'
</div>
</div>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -28,7 +28,7 @@ msgid "Poll"
msgstr "Sondage"
msgid "Save"
msgstr "Enregister"
msgstr "Enregistrer"
msgid "Cancel"
msgstr "Annuler"

View File

@ -209,7 +209,7 @@ if($err != 0) {
} else {
Utils::print_header(_('Poll').' - '.$dsondage->titre);
bandeau_titre(_("Make your polls"));
bandeau_titre(_('Poll').' - '.$dsondage->titre);
}
$title=stripslashes(str_replace("\\","",$dsondage->titre));
@ -217,7 +217,7 @@ echo '
<div class="jumbotron">
<div class="row">
<div class="col-md-7">
<h2>'.$title.'</h2>
<h3>'.$title.'</h3>
</div>
<div class="col-md-5">
<div class="btn-group pull-right">
@ -229,7 +229,7 @@ echo '
<div class="row">
<div class="col-md-5">
<div class="form-group">
<h3 class="control-label">'. _("Initiator of the poll") .'</h3>
<h4 class="control-label">'. _("Initiator of the poll") .'</h4>
<p class="form-control-static"> '.stripslashes($dsondage->nom_admin).'</p>
</div>
<div class="form-group">
@ -458,6 +458,7 @@ echo'
</div>
</div>
<h3>'._('Votes of the poll ').'</h3>
<div id="tableContainer" class="tableContainer">
<table class="results">
<caption class="sr-only">'._('Votes of the poll ').$title.'</caption>