Merge branch 'accueil-footer' into 'master'
The big one ## Fonctionnalités - images et liens sur sondage classique (en markdown) #4 - adminstuds champs pour modifier la config (A/A+/D/D+) - option pour geler les votes (A-/D-) - boutons pour supprimer tous les commentaires et tous les votes - détection de la langue du navigateur #1 - date de peremption optionnelle sur choix_date (peut aller au delà de 6 mois) ## Fix - export csv propre #5 - bug dans l'ajout/suppression horaires/jours/sujets - suppression de la limite au nombre de caractères #6 - amélioration du code pour afficher les meilleurs choix (1 boucle for en moins une ligne de tableau en moins) ## Ergonomie - largeur de colone fixe (text-overflow) - rappel des choix à l'étape 3 - bouton « Précédent » dans le formulaire - bouton de scroll horizontal pour les tableaux trop larges (à améliorer) - formulaire de vote placé en haut et toujours visible si on scroll - mémorisation de l'utilisation du datepicker (pour qu'il s'affiche automatiquement onfocus ou lorsqu'on ajoute une nouvelle date) - blocage des dates du datepicker lorsqu'elle ont déjà été choisies (+ couleur pour savoir où on en est) ## A11y - aria-describeby sur choix_date - texte alternatif sur les icônes fonts - légende oui/non/si nécessaire ## Contenu / mise en page - suppression de contact.php et apropos.php - bloc de texte en page d'accueil (reprend apropos + i18n) - suppression du footer pour le remplacer par le framafooter - charte frama (trait, ombre, couleur) - suppression des mails pour alerter d'un changement dans l'interface admin (titre, email, description, etc) ; il n'y a plus qu'un seul mail envoyé durant la session qui informe d'un changement. - ajout de la signature soutenir aux mails - images de la page d'accueil refaites See merge request !4
This commit is contained in:
commit
f9e354746f
@ -60,7 +60,9 @@ while($dsondage = $sondage->FetchNextObject(false)) {
|
||||
$sondage=$connect->Execute("select * from sondage WHERE date_fin > DATE_SUB(now(), INTERVAL 3 MONTH) ORDER BY date_fin ASC");
|
||||
$nbsondages=$sondage->RecordCount();
|
||||
|
||||
echo '<p>' . $nbsondages. ' ' . _("polls in the database at this time") .'</p>'."\n";
|
||||
$btn_logs = (is_readable('logs_studs.txt')) ? '<a role="button" class="btn btn-default btn-xs pull-right" href="'.str_replace('/admin','', Utils::get_server_name()).'admin/logs_studs.txt">'. _("Logs") .'</a>' : '';
|
||||
|
||||
echo '<p>' . $nbsondages. ' ' . _("polls in the database at this time") . $btn_logs .'</p>'."\n";
|
||||
|
||||
// tableau qui affiche tous les sondages de la base
|
||||
echo '<table class="table table-bordered">
|
||||
@ -101,9 +103,9 @@ while($dsondage = $sondage->FetchNextObject(false)) {
|
||||
}
|
||||
echo '
|
||||
<td>'.$nbuser.'</td>
|
||||
<td><a href="' . Utils::getUrlSondage($dsondage->id_sondage) . '" class="btn btn-link" title="'. _("See the poll") .'"><span class="glyphicon glyphicon-eye-open"></span></a></td>
|
||||
<td><a href="' . Utils::getUrlSondage($dsondage->id_sondage_admin, true) . '" class="btn btn-link" title="'. _("Change the poll") .'"><span class="glyphicon glyphicon-pencil"></span></a></td>
|
||||
<td><button type="submit" name="supprimersondage'.$dsondage->id_sondage.'" value="'. _("Remove the poll") .'" class="btn btn-link" title="'. _("Remove the poll") .'"><span class="glyphicon glyphicon-trash text-danger"></span></td>
|
||||
<td><a href="' . Utils::getUrlSondage($dsondage->id_sondage) . '" class="btn btn-link" title="'. _("See the poll") .'"><span class="glyphicon glyphicon-eye-open"></span><span class="sr-only">' . _("See the poll") . '</span></a></td>
|
||||
<td><a href="' . Utils::getUrlSondage($dsondage->id_sondage_admin, true) . '" class="btn btn-link" title="'. _("Change the poll") .'"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">' . _("Change the poll") . '</span></a></td>
|
||||
<td><button type="submit" name="supprimersondage'.$dsondage->id_sondage.'" value="'. _("Remove the poll") .'" class="btn btn-link" title="'. _("Remove the poll") .'"><span class="glyphicon glyphicon-trash text-danger"></span><span class="sr-only">' . _("Remove the poll") . '</span></td>
|
||||
</tr>'."\n";
|
||||
$i++;
|
||||
}
|
||||
|
316
adminstuds.php
316
adminstuds.php
@ -76,26 +76,36 @@ if (!$sondage || $sondage->RecordCount() != 1){
|
||||
$dsujet=$sujets->FetchObject(false);
|
||||
$dsondage=$sondage->FetchObject(false);
|
||||
|
||||
// Send email (only once during the session) to alert admin of the change he made
|
||||
$email_admin = $dsondage->mail_admin;
|
||||
function send_mail_admin() {
|
||||
global $email_admin;
|
||||
global $numsondageadmin;
|
||||
|
||||
if(!isset($_SESSION["mail_admin_sent"])) {
|
||||
Utils::sendEmail( $email_admin,
|
||||
_("[ADMINISTRATOR] New settings for your poll") . ' ' . stripslashes( $dsondage->titre ),
|
||||
_("You have changed the settings of your poll. \nYou can modify this poll with this link") .
|
||||
" :\n\n" . Utils::getUrlSondage($numsondageadmin, true) . "\n\n" .
|
||||
_("Thanks for your confidence.") . "\n" . NOMAPPLICATION
|
||||
);
|
||||
$_SESSION["mail_admin_sent"]=true;
|
||||
}
|
||||
}
|
||||
|
||||
//si la valeur du nouveau titre est valide et que le bouton est activé
|
||||
$adresseadmin = $dsondage->mail_admin;
|
||||
|
||||
if (isset($_POST["boutonnouveautitre"])) {
|
||||
if (Utils::issetAndNoEmpty('nouveautitre') === false) {
|
||||
$err |= TITLE_EMPTY;
|
||||
} else {
|
||||
//modification de la base SQL avec le nouveau titre
|
||||
//Update SQL database with new title
|
||||
$nouveautitre = htmlentities(html_entity_decode($_POST['nouveautitre'], ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8');
|
||||
$sql = 'UPDATE sondage SET titre = '.$connect->Param('nouveautitre').' WHERE id_sondage = '.$connect->Param('numsondage');
|
||||
$sql = $connect->Prepare($sql);
|
||||
|
||||
//envoi du mail pour prevenir l'admin de sondage
|
||||
//Email sent to the admin
|
||||
if ($connect->Execute($sql, array($nouveautitre, $numsondage))) {
|
||||
Utils::sendEmail( $adresseadmin,
|
||||
_("[ADMINISTRATOR] New title for your poll") . ' ' . NOMAPPLICATION,
|
||||
_("You have changed the title of your poll. \nYou can modify this poll with this link") .
|
||||
" :\n\n" . Utils::getUrlSondage($numsondageadmin, true) . "\n\n" .
|
||||
_("Thanks for your confidence.") . "\n" . NOMAPPLICATION );
|
||||
send_mail_admin();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -107,17 +117,13 @@ if (isset($_POST["boutonnouveauxcommentaires"])) {
|
||||
} else {
|
||||
$commentaires = htmlentities(html_entity_decode($_POST['nouveauxcommentaires'], ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8');
|
||||
|
||||
//modification de la base SQL avec les nouveaux commentaires
|
||||
//Update SQL database with new description
|
||||
$sql = 'UPDATE sondage SET commentaires = '.$connect->Param('commentaires').' WHERE id_sondage = '.$connect->Param('numsondage');
|
||||
$sql = $connect->Prepare($sql);
|
||||
|
||||
//Email sent to the admin
|
||||
if ($connect->Execute($sql, array($commentaires, $numsondage))) {
|
||||
//envoi du mail pour prevenir l'admin de sondage
|
||||
Utils::sendEmail( $adresseadmin,
|
||||
_("[ADMINISTRATOR] New description of your poll") . ' ' . NOMAPPLICATION,
|
||||
_("You have changed the description of your poll. \nYou can modify this poll with this link") .
|
||||
" :\n\n" . Utils::getUrlSondage($numsondageadmin, true) . " \n\n" .
|
||||
_("Thanks for your confidence.") . "\n" . NOMAPPLICATION );
|
||||
send_mail_admin();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -129,21 +135,38 @@ if (isset($_POST["boutonnouvelleadresse"])) {
|
||||
} else {
|
||||
$nouvelleadresse = htmlentities(html_entity_decode($_POST['nouvelleadresse'], ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8');
|
||||
|
||||
//modification de la base SQL avec la nouvelle adresse
|
||||
//Update SQL database with new email
|
||||
$sql = 'UPDATE sondage SET mail_admin = '.$connect->Param('nouvelleadresse').' WHERE id_sondage = '.$connect->Param('numsondage');
|
||||
$sql = $connect->Prepare($sql);
|
||||
|
||||
//Email sent to the admin
|
||||
if ($connect->Execute($sql, array($nouvelleadresse, $numsondage))) {
|
||||
//envoi du mail pour prevenir l'admin de sondage
|
||||
Utils::sendEmail( $_POST['nouvelleadresse'],
|
||||
_("[ADMINISTRATOR] New email address for your poll") . ' ' . NOMAPPLICATION,
|
||||
_("You have changed your email address in your poll. \nYou can modify this poll with this link") .
|
||||
" :\n\n" . Utils::getUrlSondage($numsondageadmin, true) . "\n\n" .
|
||||
_("Thanks for your confidence.") . "\n" . NOMAPPLICATION );
|
||||
send_mail_admin();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//New poll rules
|
||||
if (isset($_POST["btn_poll_rules"])) {
|
||||
echo '<!-- '; print_r($_POST); echo ' -->';
|
||||
if($_POST['poll_rules'] == '+') {
|
||||
$new_poll_rules = substr($dsondage->format, 0, 1).'+';
|
||||
} elseif($_POST['poll_rules'] == '-') {
|
||||
$new_poll_rules = substr($dsondage->format, 0, 1).'-';
|
||||
} else {
|
||||
$new_poll_rules = substr($dsondage->format, 0, 1);
|
||||
}
|
||||
|
||||
//Update SQL database with new rules
|
||||
$sql = 'UPDATE sondage SET format = '.$connect->Param('new_poll_rules').' WHERE id_sondage = '.$connect->Param('numsondage');
|
||||
$sql = $connect->Prepare($sql);
|
||||
|
||||
//Email sent to the admin
|
||||
if ($connect->Execute($sql, array($new_poll_rules, $numsondage))) {
|
||||
send_mail_admin();
|
||||
}
|
||||
}
|
||||
|
||||
// reload
|
||||
$dsujet=$sujets->FetchObject(false);
|
||||
$dsondage=$sondage->FetchObject(false);
|
||||
@ -161,7 +184,7 @@ if (isset($_POST["ajoutsujet"])) {
|
||||
<form name="formulaire" class="form-horizontal" action="' . Utils::getUrlSondage($numsondageadmin, true) . '" method="POST">
|
||||
<h2>' . _("Column's adding") . '</h2>'."\n";
|
||||
|
||||
if ($dsondage->format=="A"||$dsondage->format=="A+"){
|
||||
if (substr($dsondage->format, 0, 1)=="A"){
|
||||
echo '
|
||||
<div class="form-group">
|
||||
<label for="nouvellecolonne" class="col-md-6">' . _("Add a column") .' :</label>
|
||||
@ -224,6 +247,20 @@ if (isset($_POST["suppressionsondage"])) {
|
||||
die();
|
||||
}
|
||||
|
||||
// Remove all the comments
|
||||
if (isset($_POST["removecomments"])) {
|
||||
$sql = 'DELETE FROM comments WHERE id_sondage='.$connect->Param('numsondage');
|
||||
$sql = $connect->Prepare($sql);
|
||||
$cleaning = $connect->Execute($sql, array($numsondage));
|
||||
}
|
||||
|
||||
// Remove all the votes
|
||||
if (isset($_POST["removevotes"])) {
|
||||
$sql = 'DELETE FROM user_studs WHERE id_sondage='.$connect->Param('numsondage');
|
||||
$sql = $connect->Prepare($sql);
|
||||
$cleaning = $connect->Execute($sql, array($numsondage));
|
||||
}
|
||||
|
||||
//action si bouton confirmation de suppression est activé
|
||||
if (isset($_POST["confirmesuppression"])) {
|
||||
$nbuser=$user_studs->RecordCount();
|
||||
@ -233,13 +270,8 @@ if (isset($_POST["confirmesuppression"])) {
|
||||
// on ecrit dans le fichier de logs la suppression du sondage
|
||||
error_log($date . " SUPPRESSION: $dsondage->id_sondage\t$dsondage->format\t$dsondage->nom_admin\t$dsondage->mail_admin\n", 3, 'admin/logs_studs.txt');
|
||||
|
||||
//envoi du mail a l'administrateur du sondage
|
||||
Utils::sendEmail( $adresseadmin,
|
||||
_("[ADMINISTRATOR] Removing of your poll") . ' ' . NOMAPPLICATION,
|
||||
_("You have removed your poll. \nYou can make new polls with this link") .
|
||||
" :\n\n" . Utils::get_server_name() . "index.php \n\n" .
|
||||
_("Thanks for your confidence.") . "\n" . NOMAPPLICATION );
|
||||
|
||||
// Email sent
|
||||
send_mail_admin();
|
||||
//affichage de l'ecran de confirmation de suppression de sondage
|
||||
Utils::print_header(_("Your poll has been removed!"));
|
||||
|
||||
@ -347,7 +379,7 @@ if (isset($_POST["boutonp"])) {
|
||||
|
||||
|
||||
//action quand on ajoute une colonne au format AUTRE
|
||||
if (isset($_POST["ajoutercolonne"]) && Utils::issetAndNoEmpty('nouvellecolonne') && ($dsondage->format == "A" || $dsondage->format == "A+")) {
|
||||
if (isset($_POST["ajoutercolonne"]) && Utils::issetAndNoEmpty('nouvellecolonne') && (substr($dsondage->format, 0, 1) == "A" )) {
|
||||
$nouveauxsujets=$dsujet->sujet;
|
||||
|
||||
//on rajoute la valeur a la fin de tous les sujets deja entrés
|
||||
@ -359,16 +391,13 @@ if (isset($_POST["ajoutercolonne"]) && Utils::issetAndNoEmpty('nouvellecolonne')
|
||||
$sql = 'UPDATE sujet_studs SET sujet = '.$connect->Param('nouveauxsujets').' WHERE id_sondage = '.$connect->Param('numsondage');
|
||||
$sql = $connect->Prepare($sql);
|
||||
if ($connect->Execute($sql, array($nouveauxsujets, $numsondage))) {
|
||||
//envoi d'un mail pour prévenir l'administrateur du changement
|
||||
Utils::sendEmail( "$adresseadmin", "" . _("[ADMINISTRATOR] New column for your poll").NOMAPPLICATION, "" .
|
||||
_("You have added a new column in your poll. \nYou can inform the voters of this change with this link") .
|
||||
" : \n\n" . Utils::getUrlSondage($numsondage) . " \n\n " . _("Thanks for your confidence.") . "\n".NOMAPPLICATION );
|
||||
send_mail_admin();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//action quand on ajoute une colonne au format DATE
|
||||
if (isset($_POST["ajoutercolonne"]) && ($dsondage->format == "D" || $dsondage->format == "D+")) {
|
||||
if (isset($_POST["ajoutercolonne"]) && (substr($dsondage->format, 0, 1) == "D")) {
|
||||
$nouveauxsujets=$dsujet->sujet;
|
||||
|
||||
if (isset($_POST["newdate"]) && $_POST["newdate"] != "vide") {
|
||||
@ -446,13 +475,8 @@ if (isset($_POST["ajoutercolonne"]) && ($dsondage->format == "D" || $dsondage->f
|
||||
}
|
||||
}
|
||||
|
||||
//envoi d'un mail pour prévenir l'administrateur du changement
|
||||
$adresseadmin = $dsondage->mail_admin;
|
||||
|
||||
Utils::sendEmail( $adresseadmin,
|
||||
_("[ADMINISTRATOR] New column for your poll"),
|
||||
_("You have added a new column in your poll. \nYou can inform the voters of this change with this link").
|
||||
" : \n\n" . Utils::getUrlSondage($numsondage) . " \n\n " . _("Thanks for your confidence.") . "\n".NOMAPPLICATION );
|
||||
//Email sent to the admin
|
||||
send_mail_admin();
|
||||
|
||||
} else {
|
||||
$erreur_ajout_date="yes";
|
||||
@ -644,6 +668,20 @@ $title = (isset($_POST["boutonnouveautitre"]) && Utils::issetAndNoEmpty('nouveau
|
||||
$description = (isset($_POST["nouveauxcommentaires"])) ? stripslashes(htmlentities(html_entity_decode($_POST['nouveauxcommentaires'], ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8')) : stripslashes( $dsondage->commentaires );
|
||||
$email_admin = (isset($_POST["boutonnouvelleadresse"]) && Utils::issetAndNoEmpty('nouvelleadresse')) ? htmlentities(html_entity_decode($_POST['nouvelleadresse'], ENT_QUOTES, 'UTF-8'), ENT_QUOTES, 'UTF-8') : stripslashes( $dsondage->mail_admin );
|
||||
|
||||
//Poll format (locked A-/D-, open A/D, editable A+/D+)
|
||||
$poll_rules = (isset($_POST["poll_rules"]) && Utils::issetAndNoEmpty('btn_poll_rules')) ? $_POST["poll_rules"] : substr($dsondage->format, 1, 1);
|
||||
$poll_rules_opt1 = '';$poll_rules_opt2 = '';$poll_rules_opt3 = '';
|
||||
if($poll_rules == '+') {
|
||||
$poll_rules_text = '<span class="glyphicon glyphicon-edit"></span> '. _("Votes are editable");
|
||||
$poll_rules_opt3 = 'selected';
|
||||
} elseif($poll_rules == '-') {
|
||||
$poll_rules_text = '<span class="glyphicon glyphicon-lock"></span> '. _("Votes and comments are locked");
|
||||
$poll_rules_opt1 = 'selected';
|
||||
} else {
|
||||
$poll_rules_text = '<span class="glyphicon glyphicon-check"></span> '. _("Votes and comments are open");
|
||||
$poll_rules_opt2 = 'selected';
|
||||
}
|
||||
|
||||
if ($errors!='') {
|
||||
Utils::print_header(_("Error!"));
|
||||
bandeau_titre(_("Error!"));
|
||||
@ -668,8 +706,8 @@ echo '
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" id="newtitle" name="nouveautitre" size="40" value="'.$title.'" />
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-success" name="boutonnouveautitre" value="1" title="'. _('Save the new title') .'"><span class="glyphicon glyphicon-ok"></span></button>
|
||||
<button class="btn btn-link btn-cancel" title="'. _('Cancel the title edit') .'"><span class="glyphicon glyphicon-remove"></span></button>
|
||||
<button type="submit" class="btn btn-success" name="boutonnouveautitre" value="1" title="'. _('Save the new title') .'"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">' . _('Save') . '</span></button>
|
||||
<button class="btn btn-link btn-cancel" title="'. _('Cancel the title edit') .'"><span class="glyphicon glyphicon-remove"></span><span class="sr-only">' . _('Cancel') . '</span></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -678,7 +716,15 @@ echo '
|
||||
<div class="btn-group pull-right">
|
||||
<button onclick="javascript:print(); return false;" class="btn btn-default"><span class="glyphicon glyphicon-print"></span> ' . _('Print') . '</button>
|
||||
<button onclick="window.location.href=\'' . Utils::get_server_name() . 'exportcsv.php?numsondage=' . $numsondage . '\';return false;" class="btn btn-default"><span class="glyphicon glyphicon-download-alt"></span> ' . _('Export to CSV') . '</button>
|
||||
<button type="submit" id="suppressionsondage" name="suppressionsondage" value="" class="btn btn-danger" title="'. _("Remove the poll") .'"><span class="glyphicon glyphicon-trash"></span></button>
|
||||
<button type="button" class="btn btn-danger dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-trash"></span> <span class="sr-only">' . _("Remove") . '</span> <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><button class="btn btn-link" type="submit" name="removevotes">' . _('Remove all the votes') . '</button></li>
|
||||
<li><button class="btn btn-link" type="submit" name="removecomments">' . _('Remove all the comments') . '</button></li>
|
||||
<li class="divider" role="presentation"></li>
|
||||
<li><button class="btn btn-link" type="submit" id="suppressionsondage" name="suppressionsondage" value="" >'. _("Remove the poll") .'</button></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -696,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></button>
|
||||
<button class="btn btn-link btn-cancel" title="'. _('Cancel the adress email edit') .'"><span class="glyphicon glyphicon-remove"></span></button>
|
||||
<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>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@ -724,10 +770,31 @@ 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">
|
||||
<label>'. _("Expiration's date") .'</label>
|
||||
<h3 class="control-label">'. _("Expiration's date") .'</h3>
|
||||
<p>'.date("d/m/Y",strtotime($dsondage->date_fin)).'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-md-offset-7" >
|
||||
<div id="poll-rules-form">
|
||||
<p class="pull-right">'.$poll_rules_text.'<button class="btn btn-link btn-sm btn-edit" title="'. _('Edit the poll rules') .'"><span class="glyphicon glyphicon-pencil"></span><span class="sr-only">' . _('Edit') . '</span></button></p>
|
||||
<div class="hidden js-poll-rules">
|
||||
<label class="sr-only" for="newrules">'. _("Poll rules") .'</label>
|
||||
<div class="input-group">
|
||||
<select class="form-control" id="newrules" name="poll_rules">
|
||||
<option value="-" '.$poll_rules_opt1.'>'. _("Votes and comments are locked") .'</option>
|
||||
<option value="0" '.$poll_rules_opt2.'>'. _("Votes and comments are open") .'</option>
|
||||
<option value="+" '.$poll_rules_opt3.'>'. _("Votes are editable") .'</option>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" name="btn_poll_rules" value="1" class="btn btn-success" title="'. _('Save the new rules') .'"><span class="glyphicon glyphicon-ok"></span><span class="sr-only">' . _('Save') . '</span></button>
|
||||
<button class="btn btn-link btn-cancel" title="'. _('Cancel the rules edit') .'"><span class="glyphicon glyphicon-remove"></span><span class="sr-only">' . _('Cancel') . '</span></button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>'."\n"; // .jumbotron
|
||||
|
||||
@ -751,7 +818,7 @@ $td_headers = array(); // for a11y, headers="M1 D4 H5" on each td
|
||||
$radio_title = array(); // date for
|
||||
|
||||
// Dates poll
|
||||
if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
if (substr($dsondage->format, 0, 1)=="D") {
|
||||
|
||||
$tr_months = '<tr><th role="presentation"></th>';
|
||||
$tr_days = '<tr><th role="presentation"></th>';
|
||||
@ -797,7 +864,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
$hour = substr($current, strpos($current, '@')-count($current)+2);
|
||||
|
||||
if ($hour != "") {
|
||||
$tr_hours .= '<th class="bg-info'.$rbd.'" id="H'.$i.'">'.$hour.'</th>';
|
||||
$tr_hours .= '<th class="bg-info'.$rbd.'" id="H'.$i.'" title="'.$hour.'">'.$hour.'</th>';
|
||||
$radio_title[$i] .= ' - '.$hour;
|
||||
$td_headers[$i] .= ' H'.$i;
|
||||
} else {
|
||||
@ -808,7 +875,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
}
|
||||
|
||||
// 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></button></td>' : '<td role="presentation"></td>';
|
||||
$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>';
|
||||
|
||||
}
|
||||
|
||||
@ -819,7 +886,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
$tr_hours .= '<th></th></tr>';
|
||||
|
||||
// Add col
|
||||
$tr_add_remove_col .= '<td><button type="submit" name="ajoutsujet" class="btn btn-link btn-sm" title="'. _('Add a column') . '"><span class="glyphicon glyphicon-plus text-success"></span></button></td></tr>';
|
||||
$tr_add_remove_col .= '<td><button type="submit" name="ajoutsujet" class="btn btn-link btn-sm" title="'. _('Add a column') . '"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add a column") .'</span></button></td></tr>';
|
||||
|
||||
$thead = "\n".$tr_add_remove_col."\n".$tr_months."\n".$tr_days."\n".$tr_hours."\n";
|
||||
|
||||
@ -834,18 +901,42 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
$td_headers[$i]='';$radio_title[$i]=''; // init before concatenate
|
||||
|
||||
// Subjects
|
||||
$tr_subjects .= '<th class="bg-info" id="S'.preg_replace("/[^a-zA-Z0-9]_+/", "", stripslashes($toutsujet[$i])).'">'.stripslashes($toutsujet[$i]).'</th>';
|
||||
preg_match_all('/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/',$toutsujet[$i],$md_a_img); // Markdown [![alt](src)](href)
|
||||
preg_match_all('/!\[(.*?)\]\((.*?)\)/',$toutsujet[$i],$md_img); // Markdown ![alt](src)
|
||||
preg_match_all('/\[(.*?)\]\((.*?)\)/',$toutsujet[$i],$md_a); // Markdown [text](href)
|
||||
if (isset($md_a_img[2][0]) && $md_a_img[2][0]!='' && isset($md_a_img[3][0]) && $md_a_img[3][0]!='') { // [![alt](src)](href)
|
||||
|
||||
$th_subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0]!='') ? stripslashes($md_a_img[1][0]) : _("Choice") .' '.($i+1);
|
||||
$th_subject_html = '<a href="'.$md_a_img[3][0].'"><img src="'.$md_a_img[2][0].'" class="img-responsive" alt="'.$th_subject_text.'" /></a>';
|
||||
|
||||
} elseif (isset($md_img[2][0]) && $md_img[2][0]!='') { // ![alt](src)
|
||||
|
||||
$th_subject_text = (isset($md_img[1][0]) && $md_img[1][0]!='') ? stripslashes($md_img[1][0]) : _("Choice") .' '.($i+1);
|
||||
$th_subject_html = '<img src="'.$md_img[2][0].'" class="img-responsive" alt="'.$th_subject_text.'" />';
|
||||
|
||||
} elseif (isset($md_a[2][0]) && $md_a[2][0]!='') { // [text](href)
|
||||
|
||||
$th_subject_text = (isset($md_a[1][0]) && $md_a[1][0]!='') ? stripslashes($md_a[1][0]) : _("Choice") .' '.($i+1);
|
||||
$th_subject_html = '<a href="'.$md_a[2][0].'">'.$th_subject_text.'</a>';
|
||||
|
||||
} else { // text only
|
||||
|
||||
$th_subject_text = stripslashes($toutsujet[$i]);
|
||||
$th_subject_html = $th_subject_text;
|
||||
|
||||
}
|
||||
$tr_subjects .= '<th class="bg-info" id="S'.$i.'" title="'.$th_subject_text.'">'.$th_subject_html.'</th>';
|
||||
|
||||
$border[$i] = false;
|
||||
$td_headers[$i] .= stripslashes($toutsujet[$i]);
|
||||
$radio_title[$i] .= stripslashes($toutsujet[$i]);
|
||||
$td_headers[$i] .= 'S'.$i;
|
||||
$radio_title[$i] .= $th_subject_text;
|
||||
|
||||
// Remove col
|
||||
$tr_add_remove_col .= '<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></button></td>';
|
||||
$tr_add_remove_col .= '<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>';
|
||||
}
|
||||
|
||||
// Add col
|
||||
$tr_add_remove_col .= '<td><button type="submit" name="ajoutsujet" class="btn btn-link btn-sm" title="'. _('Add a column') . '"><span class="glyphicon glyphicon-plus text-success"></span></button></td></tr>';
|
||||
$tr_add_remove_col .= '<td><button type="submit" name="ajoutsujet" class="btn btn-link btn-sm" title="'. _('Add a column') . '"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add a column") .'</span></button></td></tr>';
|
||||
|
||||
$thead = $tr_add_remove_col.$tr_subjects.'<th></th></tr>';
|
||||
}
|
||||
@ -859,10 +950,23 @@ echo '
|
||||
' . _(' remove a column or a line with ') . '<span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">' . _('Remove') . '</span>
|
||||
' . _('and add a new column with '). '<span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _('Add a column') . '</span></p>
|
||||
<p>' . _('Finally, you can change the informations of this poll like the title, the comments or your email address.') . '</p>
|
||||
<p><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</span></p>
|
||||
</div>
|
||||
|
||||
<div class="hidden row scroll-buttons" aria-hidden="true">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-sm btn-link scroll-left" title="' . _('Scroll to the left') . '">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
</button>
|
||||
<button class="btn btn-sm btn-link scroll-right" title="' . _('Scroll to the right') . '">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tableContainer" class="tableContainer">
|
||||
<table class="results">
|
||||
<caption>'._('Votes of the poll ').$title.'</caption>
|
||||
<caption class="sr-only">'._('Votes of the poll ').$title.'</caption>
|
||||
<thead>'. $thead . '</thead>
|
||||
<tbody>';
|
||||
|
||||
@ -953,8 +1057,15 @@ while ($data = $user_studs->FetchNextObject(false)) {
|
||||
|
||||
//a la fin de chaque ligne se trouve les boutons modifier
|
||||
if (!$testligneamodifier=="true") {
|
||||
echo '<td><button type="submit" class="btn btn-link btn-sm" name="modifierligne'.$compteur.'" title="'. _('Edit the line:') .' '.stripslashes($nombase).'">
|
||||
<span class="glyphicon glyphicon-pencil"></span></button><button type="submit" name="effaceligne'.$compteur.'" title="'. _('Remove the line:') .' '.stripslashes($nombase).'" class="btn btn-link btn-sm"><span class="glyphicon glyphicon-remove text-danger"></span></button></td>'."\n";
|
||||
echo '
|
||||
<td>
|
||||
<button type="submit" class="btn btn-link btn-sm" name="modifierligne'.$compteur.'" title="'. _('Edit the line:') .' '.stripslashes($nombase).'">
|
||||
<span class="glyphicon glyphicon-pencil"></span><span class="sr-only">' . _('Edit') . '</span>
|
||||
</button>
|
||||
<button type="submit" name="effaceligne'.$compteur.'" title="'. _('Remove the line:') .' '.stripslashes($nombase).'" class="btn btn-link btn-sm">
|
||||
<span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">' . _('Remove') . '</span>
|
||||
</button>
|
||||
</td>'."\n";
|
||||
}
|
||||
|
||||
//demande de confirmation pour modification de ligne
|
||||
@ -1015,16 +1126,22 @@ if (!$testligneamodifier=="true") {
|
||||
|
||||
// Addition and Best choice
|
||||
//affichage de la ligne contenant les sommes de chaque colonne
|
||||
$tr_addition = '<tr><td>'. _("Addition") .'</td>';
|
||||
$tr_bestchoice = '<tr><td></td>';
|
||||
$meilleurecolonne = 0;
|
||||
|
||||
$tr_addition = '<tr id="addition"><td>'. _("Addition") .'</td>';
|
||||
$meilleurecolonne = max($somme);
|
||||
$compteursujet = 0;
|
||||
$meilleursujet = '<ul style="list-style:none">';
|
||||
for ($i = 0; $i < $nbcolonnes; $i++) {
|
||||
if (isset($somme[$i]) && $somme[$i] > 0 ) {
|
||||
if (isset($somme[$i]) && $somme[$i] > $meilleurecolonne){
|
||||
$meilleurecolonne = $somme[$i];
|
||||
}
|
||||
if (in_array($i, array_keys($somme, max($somme)))){
|
||||
|
||||
$tr_addition .= '<td><span class="glyphicon glyphicon-star text-warning"></span><span>'.$somme[$i].'</span></td>';
|
||||
|
||||
$meilleursujet.= '<li><b>'.$radio_title[$i].'</b></li>';
|
||||
$compteursujet++;
|
||||
|
||||
} else {
|
||||
$tr_addition .= '<td>'.$somme[$i].'</td>';
|
||||
}
|
||||
} else {
|
||||
$tr_addition .= '<td></td>';
|
||||
}
|
||||
@ -1034,67 +1151,49 @@ $tr_addition .= '<td></td></tr>';
|
||||
//recuperation des valeurs des sujets et adaptation pour affichage
|
||||
$toutsujet = explode(",", $dsujet->sujet);
|
||||
|
||||
$compteursujet = 0;
|
||||
$meilleursujet = '<ul style="list-style:none">';
|
||||
for ($i = 0; $i < $nbcolonnes; $i++) {
|
||||
|
||||
if (isset($somme[$i]) && $somme[$i] > 0 && $somme[$i] == $meilleurecolonne){
|
||||
$tr_bestchoice .= '<td><span class="glyphicon glyphicon-star text-warning"></span></td>';
|
||||
|
||||
if ($dsondage->format == "D" || $dsondage->format == "D+") {
|
||||
$meilleursujetexport = $toutsujet[$i];
|
||||
|
||||
if (strpos($toutsujet[$i], '@') !== false) {
|
||||
$toutsujetdate = explode("@", $toutsujet[$i]);
|
||||
$meilleursujet .= '<li><b>'.strftime(_("%A, den %e. %B %Y"),$toutsujetdate[0]). ' - ' . $toutsujetdate[1].'</b></li>';
|
||||
} else {
|
||||
$meilleursujet .= '<li><b>'.strftime(_("%A, den %e. %B %Y"),$toutsujet[$i]).'</b></li>';
|
||||
}
|
||||
} else {
|
||||
$meilleursujet.= '<li><b>'.$toutsujet[$i].'</b></li>';
|
||||
}
|
||||
$compteursujet++;
|
||||
|
||||
} else {
|
||||
$tr_bestchoice .= '<td></td>';
|
||||
}
|
||||
}
|
||||
$tr_bestchoice .= '<td></td></tr>';
|
||||
|
||||
$meilleursujet = str_replace("°", "'", $meilleursujet).'</ul>';
|
||||
$vote_str = ($meilleurecolonne > 1) ? $vote_str = _('votes') : _('vote');
|
||||
|
||||
// Print Addition and Best choice
|
||||
echo $tr_addition."\n".$tr_bestchoice.'
|
||||
echo $tr_addition.'
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-sm-4 col-sm-offset-4"><p>'."\n";
|
||||
</div>
|
||||
<div class="row">'."\n";
|
||||
|
||||
if ($compteursujet == 1) {
|
||||
echo '<span class="glyphicon glyphicon-star text-warning"></span> ' . _("The best choice at this time is:") . '</p>' . $meilleursujet . '<p>' . _("with") . ' <b>' . $meilleurecolonne . '</b> ' . $vote_str . ".\n";
|
||||
echo '
|
||||
<div class="col-sm-6 col-sm-offset-3 alert alert-success">
|
||||
<p><span class="glyphicon glyphicon-star text-warning"></span> ' . _("The best choice at this time is:") . '</p>
|
||||
' . $meilleursujet . '
|
||||
<p>' . _("with") . ' <b>' . $meilleurecolonne . '</b> ' . $vote_str . '.</p>
|
||||
</div>'."\n";
|
||||
} elseif ($compteursujet > 1) {
|
||||
echo '<span class="glyphicon glyphicon-star text-warning"></span> ' . _("The bests choices at this time are:") . '</p>' . $meilleursujet . '<p>' . _("with") . ' <b>' . $meilleurecolonne . '</b> ' . $vote_str . ".\n";
|
||||
echo '
|
||||
<div class="col-sm-6 col-sm-offset-3 alert alert-success">
|
||||
<p><span class="glyphicon glyphicon-star text-warning"></span> ' . _("The bests choices at this time are:") . '</p>
|
||||
' . $meilleursujet . '
|
||||
<p>' . _("with") . ' <b>' . $meilleurecolonne . '</b> ' . $vote_str . '.</p>
|
||||
</div>'."\n";
|
||||
}
|
||||
|
||||
echo '
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<form name="formulaire4" action="#bas" method="POST">'."\n";
|
||||
<form name="formulaire4" action="#" method="POST">'."\n";
|
||||
// Commments
|
||||
$sql = 'SELECT * FROM comments WHERE id_sondage='.$connect->Param('numsondage').' ORDER BY id_comment';
|
||||
$sql = $connect->Prepare($sql);
|
||||
$comment_user = $connect->Execute($sql, array($numsondage));
|
||||
|
||||
if ($comment_user->RecordCount() != 0) {
|
||||
echo '<div class="row"><h3>' . _("Comments of polled people") . '</h3>'."\n";
|
||||
echo '<div><h3>' . _("Comments of polled people") . '</h3>'."\n";
|
||||
|
||||
$i = 0;
|
||||
while ( $dcomment=$comment_user->FetchNextObject(false)) {
|
||||
echo '
|
||||
<div class="comment">
|
||||
<button type="submit" name="suppressioncomment'.$i.'" class="btn btn-link" title="' . _('Remove the comment') . '"><span class="glyphicon glyphicon-remove text-danger"></span></button>
|
||||
<button type="submit" name="suppressioncomment'.$i.'" class="btn btn-link" title="' . _('Remove the comment') . '"><span class="glyphicon glyphicon-remove text-danger"></span><span class="sr-only">' . _('Remove') . '</span></button>
|
||||
<b>'.stripslashes($dcomment->usercomment). ' :</b>
|
||||
<span class="comment">' . stripslashes(nl2br($dcomment->comment)) . '</span>
|
||||
</div>';
|
||||
@ -1103,7 +1202,7 @@ if ($comment_user->RecordCount() != 0) {
|
||||
echo '</div>';
|
||||
}
|
||||
echo '
|
||||
<div class="row hidden-print alert alert-info">
|
||||
<div class="hidden-print alert alert-info">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<fieldset id="add-comment"><legend>' . _("Add a comment in the poll") . '</legend>
|
||||
<div class="form-group">
|
||||
@ -1116,9 +1215,8 @@ echo '
|
||||
<p class="text-center"><input type="submit" name="ajoutcomment" value="'. _("Send the comment") .'" class="btn btn-success"></p>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<a id="bas"></a>';
|
||||
</form>';
|
||||
|
||||
bandeau_pied();
|
||||
|
@ -90,6 +90,7 @@ class Utils
|
||||
<link rel="stylesheet" href="' . self::get_server_name() . 'css/bootstrap-accessibility.css">
|
||||
<link rel="stylesheet" href="' . self::get_server_name() . 'css/datepicker3.css">
|
||||
<link rel="stylesheet" href="' . self::get_server_name() . 'css/style.css">
|
||||
<link rel="stylesheet" href="' . self::get_server_name() . 'css/frama.css">
|
||||
<link rel="stylesheet" href="' . self::get_server_name() . 'css/print.css" media="print">
|
||||
<script type="text/javascript" src="' . self::get_server_name() . 'js/jquery-1.11.1.min.js"></script>
|
||||
<script type="text/javascript" src="' . self::get_server_name() . 'js/bootstrap.min.js"></script>
|
||||
@ -104,7 +105,7 @@ class Utils
|
||||
echo '
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">';
|
||||
<div class="container ombre">';
|
||||
|
||||
}
|
||||
|
||||
@ -161,7 +162,7 @@ class Utils
|
||||
$replyTo = $headers;
|
||||
$headers = ''; // on reinitialise $headers
|
||||
} else {
|
||||
$replyTo = ADRESSEEMAILREPONSEAUTO;
|
||||
$replyTo = ADRESSEMAILREPONSEAUTO;
|
||||
}
|
||||
|
||||
$from = sprintf( "From: %s%s <%s>\n", $encoded_app, $folding, ADRESSEMAILADMIN);
|
||||
@ -176,7 +177,7 @@ class Utils
|
||||
$headers .= "Content-Type: text/plain; charset=UTF-8\n";
|
||||
$headers .= "Content-Transfer-Encoding: 8bit";
|
||||
|
||||
$body = html_entity_decode($body, ENT_QUOTES, 'UTF-8');
|
||||
$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.");
|
||||
|
||||
mail($to, $subject, $body, $headers, $param);
|
||||
}
|
||||
|
@ -23,7 +23,15 @@ if (isset($_POST['lang']) && is_string($_POST['lang']) && in_array($_POST['lang'
|
||||
} elseif ( isset($_COOKIE['lang']) && is_string($_COOKIE['lang']) && in_array($_COOKIE['lang'], array_keys($ALLOWED_LANGUAGES)) ) {
|
||||
$mlocale = $_COOKIE['lang'] ;
|
||||
} else {
|
||||
|
||||
$mlocale = LANGUE;
|
||||
// Replace config language by browser language if possible
|
||||
foreach ($ALLOWED_LANGUAGES as $k => $v ) {
|
||||
if (substr($k,0,2)==substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2)) {
|
||||
$mlocale = $k;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$locale = $mlocale . '.utf8';
|
||||
|
279
apropos.php
279
apropos.php
@ -1,279 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This software is governed by the CeCILL-B license. If a copy of this license
|
||||
* is not distributed with this file, you can obtain one at
|
||||
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
|
||||
*
|
||||
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
|
||||
* Authors of Framadate/OpenSondate: Framasoft (https://github.com/framasoft)
|
||||
*
|
||||
* =============================
|
||||
*
|
||||
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
|
||||
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
|
||||
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
|
||||
*
|
||||
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
||||
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
||||
*/
|
||||
namespace Framadate;
|
||||
|
||||
session_start();
|
||||
|
||||
include_once __DIR__ . '/app/inc/init.php';
|
||||
|
||||
if (file_exists('bandeaux_local.php')) {
|
||||
include_once('bandeaux_local.php');
|
||||
} else {
|
||||
include_once('bandeaux.php');
|
||||
}
|
||||
|
||||
//affichage de la page
|
||||
Utils::print_header( _("About") );
|
||||
bandeau_titre(_("About"));
|
||||
|
||||
echo <<<mentions
|
||||
<ul>
|
||||
<li><a href="#faq">Questions fréquentes</a></li>
|
||||
<ul>
|
||||
<li><a href="#framadate">Qu'est-ce que Framadate
|
||||
?</a></li>
|
||||
<li><a href="#studs">Quelles différences entre
|
||||
Framadate et STUdS ?</a></li>
|
||||
<li><a href="#doodle">Quelles différences entre
|
||||
Framadate et Doodle ?</a></li>
|
||||
<li><a href="#longevite">Mon sondage
|
||||
restera-t-il longtemps en ligne ?</a></li>
|
||||
</ul>
|
||||
<li><a href="#mentions">Mentions légales</a></li>
|
||||
<li><a href="#credits">Crédits</a></li>
|
||||
<li><a href="#licence">Licence</a></li>
|
||||
</ul>
|
||||
<hr style="width: 100%; height: 2px;">
|
||||
<h1><a name="faq"></a>Questions fréquentes</h1>
|
||||
<h3><a name="framadate"></a>Qu'est-ce que
|
||||
Framadate ?</h3>
|
||||
Framadate est un service en ligne permettant de planifier un
|
||||
rendez-vous rapidement et simplement. Aucune inscription préalable
|
||||
n'est nécessaire.<br />
|
||||
Framadate est un service du<a href="http://framasoft.org">
|
||||
réseau Framasoft</a>, mis en place par<a
|
||||
href="http://fr.wikipedia.org/wiki/Framasoft"> l'association
|
||||
Framasoft</a>.<br />
|
||||
<h3><a name="studs"></a>Quelles différences
|
||||
entre Framadate et STUdS ! ?</h3>
|
||||
Framadate est un service basé sur le logiciel libre <a
|
||||
href="https://github.com/leblanc-simon/OpenSondage">OpenSondage</a>.
|
||||
OpenSondage est lui-même basé sur le logiciel <a
|
||||
href="http://studs.u-strasbg.fr">STUdS !</a> développé
|
||||
par l'Université de Strasbourg. <br />
|
||||
Après avoir testé STUdS, nous avons décidé d'apporter de nombreuses
|
||||
modifications, notamment ergonomiques, au code source existant.
|
||||
L'ensemble de ces modifications ne pouvaient entrer dans le cadre
|
||||
d'utilisation d'un logiciel déjà en production dans une université et
|
||||
aurait été (fort logiquement) rejetté de la branche principale de
|
||||
développement. C'est pourquoi nous avons préferer "<a
|
||||
href="http://fr.wikipedia.org/wiki/Fork_%28d%C3%A9veloppement_logiciel%29">forker</a>"
|
||||
STUdS pour créer OpenSondage.<br />
|
||||
<h3><a name="doodle"></a>Quelles différences
|
||||
entre Framadate et <a href="http://doodle.com">Doodle</a>
|
||||
?</h3>
|
||||
Aujourd'hui, le danger pour le logiciel libre
|
||||
ne provient plus de Microsoft ou d'Adobe et de leurs logiciels qu'on
|
||||
installe sans avoir le code source, mais des applications web "dans les
|
||||
nuages" proposés comme services par des entreprises.<br />
|
||||
<br />
|
||||
Cela pour au moins 4 raisons :<br />
|
||||
1- <span style="font-weight: bold;">sécurité</span>
|
||||
: aucune garantie ne peut vous être apportée quand au fait les données
|
||||
soient correctement sauvegardées et protégées, ni que le<br />
|
||||
code source "officiel" soit réellement celui que vous utilisez en ligne.<br />
|
||||
2- <span style="font-weight: bold;">fiabilité/perennité</span>
|
||||
: le service peut tomber en panne, et rien ne garanti que la
|
||||
société Doodle sera toujours là demain et maintiendra le site<br />
|
||||
3- <span style="font-weight: bold;">propriété des données</span>
|
||||
: beaucoup d'entreprises s'autoproclament co-détentrices de vos
|
||||
contenus "clouds" (ex: Facebook impose une clause de partage des droits
|
||||
sur vos contenus, vos données, vos photos)<br />
|
||||
4-<span style="font-weight: bold;"> vie privée</span>
|
||||
: une entreprise - comme Doodle - doit gagner de l'argent (et il n'y a
|
||||
aucun mal à cela). Mais si elle est en difficulté financière, elle peut
|
||||
décider de changer ses conditions d'utilisation et vendre vos données à
|
||||
des tiers (alors que Framasoft, asso loi 1901 d'intérêt général, n'aura
|
||||
jamais d'intérêt à le faire).<br />
|
||||
<br />
|
||||
A cela s'ajoute le problème, plus éthique, de la publicité.<br />
|
||||
<br />
|
||||
Les problèmes 1 et 2 concernent aussi Framadate.org : rien ne garanti
|
||||
la sécurité et la fiabilité du service (d'autant plus que les
|
||||
administrateurs systèmes de Framasoft sont bénévoles).<br />
|
||||
<br />
|
||||
Par contre :<br />
|
||||
- les problemes 3 et 4 ne sont pas d'actualité avec Framadate, exploité
|
||||
par une association loi 1901<br />
|
||||
- et surtout, Framadate fait partie d'un projet plus global
|
||||
(Framatools) qui vise justement à sensibiliser le grand public à la
|
||||
problématique du "cloud". Cela peut sembler paradoxal, mais bien que
|
||||
proposant le service Framadate.org, nous allons surtout encourager les
|
||||
organisations à installer leur propre instance du logiciel afin de
|
||||
maitriser totalement leurs données.<br />
|
||||
<br />
|
||||
Bref, oui Framadate est inspiré de Doodle.com, et oui Doodle est un
|
||||
excellent service. Mais Doodle reste une "boite noire" pour
|
||||
l'utilisateur final qui va sur doodle.com. Framadate.org essaie de
|
||||
répondre, modestement, à cette problématique en montrant que des
|
||||
alternatives libres existent et qu'on peut les installer "chez soi".<br />
|
||||
<h3><a name="longevite"></a>Mon sondage
|
||||
restera-t-il longtemps en ligne ?</h3>
|
||||
Le service Framadate est proposée gratuitement par l'association
|
||||
Framasoft.<br />
|
||||
Framasoft
|
||||
s'engage à maintenir le service "aussi longtemps que possible", mais ne
|
||||
peut fournir aucune garantie de date. Si cela ne vous convient pas,
|
||||
nous vous
|
||||
encourageons sincèrement à installer vous-même Framadate et à maintenir
|
||||
vous-même votre propre service.
|
||||
<hr style="width: 100%; height: 2px;">
|
||||
<h1><a name="mentions"></a>Mentions légales<br />
|
||||
</h1>
|
||||
<h2>Éditeur et Responsable de la publication</h2>
|
||||
<p>Editeur : Association Framasoft (cf "Hébergement")</p>
|
||||
<p>Responsable de la publication : Christophe Masutti</p>
|
||||
<p>Vous pouvez rentrer en contact avec l'Editeur et le
|
||||
Responsable de la publication en passant par la page "<a
|
||||
href="http://contact.framasoft.org">contact</a>".</p>
|
||||
<p>Les propos tenus sur ce site ne représentent que et uniquement
|
||||
l’opinion de leur auteur, et n’engagent pas l'association Framasoft,
|
||||
les sociétés, entreprises ou collectifs auxquels il contribue ou dont
|
||||
il peut être associé ou employé.</p>
|
||||
<h2>Hébergement</h2>
|
||||
<p>Ce site est hébergé par Framasoft, 10 bis rue Jangot 69007 Lyon, France.
|
||||
Cet hébergeur possède à ce jour les éléments d’identification
|
||||
personnelle concernant l'Éditeur (voir <a
|
||||
href="http://www.framasoft.net/article4736.html">http://www.framasoft.net/article4736.html</a>).</p>
|
||||
<h2>Données personnelles</h2>
|
||||
<p>Les données personnelles collectées par Framadate sont
|
||||
uniquement destinées à un usage interne. En aucun cas ces données ne
|
||||
seront cédées ou vendues à des tiers.
|
||||
Conformément à l’article 39 de la loi du 6 janvier 1978 relative à
|
||||
l’informatique, aux fichiers et aux libertés, vous avez un droit
|
||||
d’accès, de modification et d’opposition sur vos données personnelles
|
||||
enregistrées par le blog.
|
||||
Dans ce cas, utilisez le formulaire de contact.</p>
|
||||
<h2>Conditions de modération/suppression de sondages</h2>
|
||||
<p>Les sondages de Framadate bénéficient d'une URL aléatoire,
|
||||
mais publique. Si vous souhaitez supprimer un sondage, utilisez
|
||||
l'adresse d'aministration fournie à la création. Vous pouvez
|
||||
exceptionnellement demander la suppression d'un sondage en utilisant la
|
||||
page de contact.</p>
|
||||
<h2>Notification des contenus litigieux</h2>
|
||||
<p>Conformément à l’article 6 I 5° LCEN, la connaissance des
|
||||
contenus litigieux est présumée acquise par L’Éditeur lorsqu’il lui est
|
||||
notifié, par lettre recommandée avec accusé de réception adressée au
|
||||
siège social de L’Éditeur, la totalité des éléments suivants (i) la
|
||||
date de la notification ; (ii) si le notifiant est une
|
||||
personne physique : ses nom, prénoms, profession, domicile,
|
||||
nationalité, date et lieu de naissance ; si le notifiant est
|
||||
une personne morale : sa forme, sa dénomination, son siège
|
||||
social et l’organe qui la représente légalement ; (iii) les
|
||||
nom et domicile du destinataire ou, s’il s’agit d’une personne morale,
|
||||
sa dénomination et son siège social ; (iv) la description des
|
||||
faits litigieux et leur localisation précise ; (v) les motifs
|
||||
pour lesquels le contenu doit être retiré, comprenant la mention des
|
||||
dispositions légales et des justifications de faits ; (vi) la
|
||||
copie de la correspondance adressée à l’auteur ou à l’éditeur des
|
||||
informations ou activités litigieuses demandant leur interruption, leur
|
||||
retrait ou leur modification, ou la justification de ce que l’auteur ou
|
||||
l’éditeur n’a pu être contacté.</p>
|
||||
<p>A défaut d’envoi de la totalité de ces éléments, la
|
||||
notification ne sera pas prise en compte par L’Éditeur et ce dernier ne
|
||||
pourra en conséquence être présumé informé d’un contenu litigieux.</p>
|
||||
<p>L’Éditeur se réserve le droit d’engager des poursuites à
|
||||
l’encontre de toute personne ayant usé abusivement du droit réservé par
|
||||
l’article 6 I 4° LCEN. L’Éditeur vous rappelle que toute personne qui
|
||||
aurait présenté un contenu ou une activité comme étant illicite dans le
|
||||
but d’en obtenir le retrait ou d’en faire cesser la diffusion alors
|
||||
qu’elle a connaissance du caractère inexact de cette information, est
|
||||
susceptible d’encourir une peine d’un an d’emprisonnement et de 15.000
|
||||
€uros d’amende.</p>
|
||||
<h2>Licences, droits de reproduction</h2>
|
||||
<p>L'application Framadate, basé sur le logiciel OpenSondage,
|
||||
lui-même basé sur STUdS, est publiée sous licence libre <a
|
||||
href="http://www.cecill.info/licences.fr.html">CeCILL-B</a>.
|
||||
Les contenus (sondages) sont publiés sous licence Creative Commons
|
||||
BY-SA. Cela signifie que si l'adresse de votre sondage est connue d'un
|
||||
individu, vous autorisez cette personne à utiliser, partager, modifier
|
||||
votre sondage. Si vous souhaitez des sondages 100% privés et avec votre
|
||||
propre licence, installez votre propre logiciel de sondage et
|
||||
n'utilisez pas Framadate.org.</p>
|
||||
<hr style="width: 100%; height: 2px;">
|
||||
<h2><a name="credits"></a>Crédits</h2>
|
||||
<b>Application d'origine</b><br />
|
||||
<br />
|
||||
L'application Framadate est une instance du logiciel <b><a
|
||||
href="http://studs.u-strasbg.fr">STUdS !</a></b>
|
||||
développé à l'Université de Strasbourg depuis 2008.<br />
|
||||
<br />
|
||||
Pour les besoins de Framadate, STUdS a fait l'objet d'un fork par
|
||||
l'équipe Framasoft. Les sources sont disponibles sur le Github <a
|
||||
href="https://github.com/leblanc-simon/OpenSondage">OpenSondage</a>.<br />
|
||||
<br />
|
||||
<b>Technologies utilisées</b><br />
|
||||
<br />
|
||||
- <a href="http://www.php.net/">PHP</a><br />
|
||||
- <a href="http://www.postgresql.org/">MySQL</a><br />
|
||||
- <a href="http://www.apache.org/">Apache</a><br />
|
||||
- <a href="http://subversion.tigris.org/">Subversion</a><br />
|
||||
- <a href="http://www.kigkonsult.se/iCalcreator/">iCalcreator</a><br />
|
||||
- <a href="http://www.fpdf.org/">FPDF</a><br />
|
||||
- Icônes : <a href="http://deleket.deviantart.com/">Deleket</a>,
|
||||
<a href="http://pixel-mixer.com">PixelMixer</a> et <a
|
||||
href="http://dryicons.com">DryIcons</a><br />
|
||||
<br />
|
||||
<b>Compatibilités des navigateurs</b><br />
|
||||
<br />
|
||||
- <a href="http://www.mozilla.com/firefox/">Firefox</a><br />
|
||||
- <a href="http://www.opera.com/">Opéra</a><br />
|
||||
- <a href="http://www.konqueror.org/">Konqueror</a><br />
|
||||
- <a href="http://www.jikos.cz/%7Emikulas/links/">Links</a><br />
|
||||
- <a href="http://www.apple.com/fr/safari/">Safari</a><br />
|
||||
- <a href="http://www.mozilla.com/firefox/">IE</a><br />
|
||||
<br />
|
||||
<b>Validations des pages</b><br />
|
||||
<br />
|
||||
- Toutes les pages disposent de la validation HTML 4.01 Strict du W3C. <br />
|
||||
- La CSS dispose de la validation CSS 2.1 du W3C.
|
||||
<p><img src="http://www.w3.org/Icons/valid-html401-blue"
|
||||
alt="Valid HTML 4.01 Strict" height="31" width="88"><img
|
||||
style="border: 0pt none ; width: 88px; height: 31px;"
|
||||
src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
|
||||
alt="CSS Valide !">
|
||||
</p>
|
||||
<b>Propositions améliorations de Framadate</b><br />
|
||||
<br />
|
||||
Si quelque chose venait à vous manquer, vous pouvez nous en faire part
|
||||
via le <a href="http://contact.framasoft.org">formulaire en ligne</a>.
|
||||
<br />
|
||||
Les dernières améliorations de Framadate sont visibles dans le fichier <a
|
||||
href="CHANGELOG">CHANGELOG</a>.<br />
|
||||
<br />
|
||||
<b>Remerciements</b><br />
|
||||
<br />
|
||||
<b><a href="http://studs.u-strasbg.fr">STUdS !</a></b> :
|
||||
Pour leurs contributions techniques ou ergonomiques : Guy, Christophe,
|
||||
Julien, Pierre, Romaric, Matthieu, Catherine, Christine, Olivier,
|
||||
Emmanuel et Florence <br />
|
||||
<a style="font-weight: bold;"
|
||||
href="https://github.com/leblanc-simon/OpenSondage">Framadate</a>
|
||||
: Simon Leblanc (développement principal), Pierre-Yves Gosset
|
||||
(développement, graphisme), la communauté Framasoft.<br />
|
||||
<br />
|
||||
<h2><b><a name="licence"></a>Licence</b></h2>
|
||||
Framadate est placé, comme <b><a
|
||||
href="http://studs.u-strasbg.fr">STUdS !</a>,</b>
|
||||
sous la licence logicielle libre <a
|
||||
href="http://www.cecill.info/licences.fr.html">CeCILL-B</a>.<br />
|
||||
<br />
|
||||
mentions;
|
||||
|
||||
bandeau_pied();
|
26
bandeaux.php
26
bandeaux.php
@ -26,8 +26,8 @@ function bandeau_titre($titre)
|
||||
$img = ( IMAGE_TITRE ) ? '<img src="'. Utils::get_server_name(). IMAGE_TITRE. '" title="'._("Home").' - '.NOMAPPLICATION.'" alt="'.NOMAPPLICATION.'">' : '';
|
||||
echo '
|
||||
<header role="banner">
|
||||
<form method="post" action="">
|
||||
<div class="input-group input-group-sm pull-right col-md-2">
|
||||
<form method="post" action="#">
|
||||
<div class="input-group input-group-sm pull-right col-md-2 col-xs-4">
|
||||
<select name="lang" class="form-control" title="'. _("Select the language") .'" >' . liste_lang() . '</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="submit" class="btn btn-default btn-sm" title="'. _("Change the language") .'">OK</button>
|
||||
@ -36,8 +36,9 @@ function bandeau_titre($titre)
|
||||
</form>
|
||||
<h1><a href="'.str_replace('/admin','', Utils::get_server_name()).'" title="'._("Home").' - '.NOMAPPLICATION.'">'.$img.'</a></h1>
|
||||
<p class="lead"><i>'. $titre .'</i></p>
|
||||
<hr class="trait" />
|
||||
</header>
|
||||
<main>';
|
||||
<main role="main">';
|
||||
}
|
||||
|
||||
function liste_lang()
|
||||
@ -61,25 +62,6 @@ function bandeau_pied($admin=false)
|
||||
{
|
||||
echo '
|
||||
</main>
|
||||
<footer>
|
||||
<hr />
|
||||
<ul class="list-inline">';
|
||||
if($admin) {
|
||||
echo '
|
||||
<li><a class="btn btn-default btn-xs" href="'.str_replace('/admin','', Utils::get_server_name()).'">'. _("Home") .'</a></li>';
|
||||
if (is_readable('logs_studs.txt')) {
|
||||
echo '
|
||||
<li><a role="button" class="btn btn-default btn-xs" href="'.str_replace('/admin','', Utils::get_server_name()).'admin/logs_studs.txt">'. _("Logs") .'</a></li>';
|
||||
}
|
||||
} else {
|
||||
echo '
|
||||
<li><a class="btn btn-default btn-xs" href="'. Utils::get_server_name().'">'. _("Home") .'</a></li>
|
||||
<li><a class="btn btn-default btn-xs" href="http://contact.framasoft.org">'. _("Contact") .'</a></li>
|
||||
<li><a class="btn btn-default btn-xs" href="'. Utils::get_server_name().'apropos.php">'. _("About") .'</a></li>';
|
||||
}
|
||||
echo '
|
||||
</ul>
|
||||
</footer>
|
||||
</div> <!-- .container -->
|
||||
</body>
|
||||
</html>'."\n";
|
||||
|
102
choix_autre.php
102
choix_autre.php
@ -64,8 +64,8 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
|
||||
$registredate = explode("/",$_POST["champdatefin"]);
|
||||
if (is_array($registredate) == true && count($registredate) == 3) {
|
||||
$time = mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]);
|
||||
if ($time > time() + 250000) {
|
||||
$_SESSION["champdatefin"]=mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]);
|
||||
if ($time > time() + (24*60*60)) {
|
||||
$_SESSION["champdatefin"]=$time;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -93,12 +93,51 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
|
||||
Utils::print_header ( _("Removal date and confirmation (3 on 3)") );
|
||||
bandeau_titre(_("Removal date and confirmation (3 on 3)"));
|
||||
|
||||
$removal_date=strftime(_("%A, den %e. %B %Y"), time()+15552000);
|
||||
|
||||
// Sumary
|
||||
$summary = '<ol>';
|
||||
for ($i=0;$i<count($_SESSION['choices']);$i++) {
|
||||
|
||||
preg_match_all('/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/',$_SESSION['choices'][$i],$md_a_img); // Markdown [![alt](src)](href)
|
||||
preg_match_all('/!\[(.*?)\]\((.*?)\)/',$_SESSION['choices'][$i],$md_img); // Markdown ![alt](src)
|
||||
preg_match_all('/\[(.*?)\]\((.*?)\)/',$_SESSION['choices'][$i],$md_a); // Markdown [text](href)
|
||||
if (isset($md_a_img[2][0]) && $md_a_img[2][0]!='' && isset($md_a_img[3][0]) && $md_a_img[3][0]!='') { // [![alt](src)](href)
|
||||
|
||||
$li_subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0]!='') ? stripslashes($md_a_img[1][0]) : _("Choice") .' '.($i+1);
|
||||
$li_subject_html = '<a href="'.$md_a_img[3][0].'"><img src="'.$md_a_img[2][0].'" class="img-responsive" alt="'.$li_subject_text.'" /></a>';
|
||||
|
||||
} elseif (isset($md_img[2][0]) && $md_img[2][0]!='') { // ![alt](src)
|
||||
|
||||
$li_subject_text = (isset($md_img[1][0]) && $md_img[1][0]!='') ? stripslashes($md_img[1][0]) : _("Choice") .' '.($i+1);
|
||||
$li_subject_html = '<img src="'.$md_img[2][0].'" class="img-responsive" alt="'.$li_subject_text.'" />';
|
||||
|
||||
} elseif (isset($md_a[2][0]) && $md_a[2][0]!='') { // [text](href)
|
||||
|
||||
$li_subject_text = (isset($md_a[1][0]) && $md_a[1][0]!='') ? stripslashes($md_a[1][0]) : _("Choice") .' '.($i+1);
|
||||
$li_subject_html = '<a href="'.$md_a[2][0].'">'.$li_subject_text.'</a>';
|
||||
|
||||
} else { // text only
|
||||
|
||||
$li_subject_text = stripslashes($toutsujet[$i]);
|
||||
$li_subject_html = $li_subject_text;
|
||||
|
||||
}
|
||||
|
||||
$summary .= '<li>'.$li_subject_html.'</li>'."\n";
|
||||
}
|
||||
$summary .= '</ol>';
|
||||
|
||||
echo '
|
||||
<form name="formulaire" action="' . Utils::get_server_name() . 'choix_autre.php" method="POST" class="form-horizontal" role="form">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<div class="col-md-8 col-md-offset-2">
|
||||
<div class="well summary">
|
||||
<h3>'. _("List of your choices").'</h3>
|
||||
'. $summary .'
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<p>' . _("Your poll will be automatically removed after 6 months.") . '<br />' . _("You can fix another removal date for it.") .'</p>
|
||||
<p>' . _("Your poll will be automatically removed after 6 months:") . ' <strong>'.$removal_date.'</strong>.<br />' . _("You can fix another removal date for it.") .'</p>
|
||||
<div class="form-group">
|
||||
<label for="champdatefin" class="col-sm-5 control-label">'. _("Removal date (optional)") .'</label>
|
||||
<div class="col-sm-6">
|
||||
@ -114,7 +153,10 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
|
||||
<p>'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."). '</p>
|
||||
<p>' . _("Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.") .'</p>
|
||||
</div>
|
||||
<p class="text-right"><button name="confirmecreation" value="confirmecreation" type="submit" class="btn btn-success">'. _('Create the poll') . '</button></p>
|
||||
<p class="text-right">
|
||||
<button class="btn btn-default" onclick="javascript:window.history.back();" title="'. _('Back to step 2') . '">'. _('Back') . '</button>
|
||||
<button name="confirmecreation" value="confirmecreation" type="submit" class="btn btn-success">'. _('Create the poll') . '</button>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</form>'."\n";
|
||||
@ -129,11 +171,12 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
|
||||
echo '
|
||||
<form name="formulaire" action="' . Utils::get_server_name() . 'choix_autre.php" method="POST" class="form-horizontal" role="form">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">';
|
||||
<div class="col-md-8 col-md-offset-2">';
|
||||
echo '
|
||||
<div class="alert alert-info">
|
||||
<p>'. _("To make a generic poll you need 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="glyphicon glyphicon-plus text-success"></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>
|
||||
<p>'. _("It's possible to propose links or images by using "). '<a href="http://'.$lang.'.wikipedia.org/wiki/Markdown">'. _("the Markdown syntax") .'</a>.</p>
|
||||
</div>'."\n";
|
||||
|
||||
// Fields choices : 5 by default
|
||||
@ -143,21 +186,52 @@ if (Utils::issetAndNoEmpty('titre', $_SESSION) === false || Utils::issetAndNoEmp
|
||||
echo '
|
||||
<div class="form-group choice-field">
|
||||
<label for="choice'.$i.'" class="col-sm-2 control-label">'. _("Choice") .' '.($i+1).'</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="choices[]" size="40" maxlength="40" value="'.$choice_value.'" id="choice'.$i.'" />
|
||||
<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>
|
||||
</div>
|
||||
</div>'."\n";
|
||||
}
|
||||
|
||||
echo '
|
||||
<div class="col-md-6">
|
||||
<div class="col-md-4">
|
||||
<div class="btn-group btn-group">
|
||||
<button type="button" id="remove-a-choice" class="btn btn-default" title="'. _("Remove a choice") .'"><span class="glyphicon glyphicon-minus text-info"></span></button>
|
||||
<button type="button" id="add-a-choice" class="btn btn-default" title="'. _("Add a choice") .'"><span class="glyphicon glyphicon-plus text-success"></span></button>
|
||||
<button type="button" id="remove-a-choice" class="btn btn-default" title="'. _("Remove a choice") .'"><span class="glyphicon glyphicon-minus text-info"></span><span class="sr-only">'. _("Remove") .'</span></button>
|
||||
<button type="button" id="add-a-choice" class="btn btn-default" title="'. _("Add a choice") .'"><span class="glyphicon glyphicon-plus text-success"></span><span class="sr-only">'. _("Add") .'</span></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<button name="fin_sondage_autre" value="'._('Next').'" type="submit" class="btn btn-success disabled">'. _('Next') . '</button>
|
||||
<div class="col-md-8 text-right">
|
||||
<a class="btn btn-default" href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=autre" title="'. _('Back to step 1') . '">'. _('Back') . '</a>
|
||||
<button name="fin_sondage_autre" value="'._('Next').'" type="submit" class="btn btn-success disabled" title="'. _('Go to step 3') . '">'. _('Next') . '</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal fade" id="md-a-imgModal" tabindex="-1" role="dialog" aria-labelledby="md-a-imgModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">'. _('Close') . '</span></button>
|
||||
<h4 class="modal-title" id="md-a-imgModalLabel">'. _("Add a link or an image") .'</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="alert alert-info">'. _("These fields are optional. You can add a link, an image or both.") .'</p>
|
||||
<div class="form-group">
|
||||
<label for="md-img"><span class="glyphicon glyphicon-picture"></span> '. _('URL of the image') . '</label>
|
||||
<input id="md-img" type="text" placeholder="http://…" class="form-control" size="40" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="md-a"><span class="glyphicon glyphicon-link"></span> '. _('Link') . '</label>
|
||||
<input id="md-a" type="text" placeholder="http://…" class="form-control" size="40" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="md-text">'. _('Alternative text') . '</label>
|
||||
<input id="md-text" type="text" class="form-control" size="40" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">'. _('Cancel') . '</button>
|
||||
<button type="button" class="btn btn-primary">'. _('Add') . '</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -75,6 +75,19 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
|
||||
|
||||
$_SESSION["toutchoix"]=substr($choixdate,1);
|
||||
|
||||
// Expiration date → 6 months after last day if not filled or in bad format
|
||||
$_SESSION["champdatefin"]=end($temp_results)+15552000;
|
||||
|
||||
if (Utils::issetAndNoEmpty('champdatefin')) {
|
||||
$registredate = explode("/",$_POST["champdatefin"]);
|
||||
if (is_array($registredate) == true && count($registredate) == 3) {
|
||||
$time = mktime(0,0,0,$registredate[1],$registredate[0],$registredate[2]);
|
||||
if ($time > time() + (24*60*60)) {
|
||||
$_SESSION["champdatefin"]=$time;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ajouter_sondage();
|
||||
|
||||
} else {
|
||||
@ -111,22 +124,50 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
|
||||
|
||||
$temp_array = array_unique($_SESSION["totalchoixjour"]);
|
||||
sort($temp_array);
|
||||
$removal_date=strftime(_("%A, den %e. %B %Y"), end($temp_array)+2592000);
|
||||
$removal_date=strftime(_("%A, den %e. %B %Y"), end($temp_array)+15552000);
|
||||
|
||||
// Sumary
|
||||
$summary = '<ul>';
|
||||
for ($i=0;$i<count($_SESSION["totalchoixjour"]);$i++) {
|
||||
$summary .= '<li>'.strftime(_("%A, den %e. %B %Y"), $_SESSION["totalchoixjour"][$i]);
|
||||
for ($j=0;$j<count($_SESSION['horaires'.$i]);$j++) {
|
||||
if (isset($_SESSION['horaires'.$i][$j])) {
|
||||
$summary .= ($j==0) ? ' : ' : ', ';
|
||||
$summary .= $_SESSION['horaires'.$i][$j];
|
||||
}
|
||||
}
|
||||
$summary .= '</li>'."\n";
|
||||
}
|
||||
$summary .= '</ul>';
|
||||
|
||||
echo '
|
||||
<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>
|
||||
<div class="alert alert-info">
|
||||
<p>'. _("Your poll will expire automatically 2 days after the last date of your poll.") .'</p>
|
||||
<p>'. _("Removal date:") .' <b> '.$removal_date.'</b></p>
|
||||
<div class="well summary">
|
||||
<h3>'. _("List of your choices").'</h3>
|
||||
'. $summary .'
|
||||
</div>
|
||||
<div class="alert alert-info clearfix">
|
||||
<p>' . _("Your poll will be automatically removed 6 months after the last date of your poll:") . ' <strong>'.$removal_date.'</strong>.<br />' . _("You can fix another removal date for it.") .'</p>
|
||||
<div class="form-group">
|
||||
<label for="champdatefin" class="col-sm-5 control-label">'. _("Removal date (optional)") .'</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group date">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
|
||||
<input type="text" class="form-control" id="champdatefin" data-date-format="'. _("dd/mm/yyyy") .'" aria-describedby="dateformat" name="champdatefin" value="" size="10" maxlength="10" placeholder="'. _("dd/mm/yyyy") .'" />
|
||||
</div>
|
||||
</div>
|
||||
<span id="dateformat" class="sr-only">'. _("(dd/mm/yyyy)") .'</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alert alert-warning">
|
||||
<p>'. _("Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."). '</p>
|
||||
<p>' . _("Then, you will receive quickly two emails: one contening the link of your poll for sending it to the voters, the other contening the link to the administration page of your poll.") .'</p>
|
||||
</div>
|
||||
<p class="text-right">
|
||||
<button class="btn btn-default" onclick="javascript:window.history.back();" title="'. _('Back to step 2') . '">'. _('Back') . '</button>
|
||||
<button name="confirmation" value="confirmation" type="submit" class="btn btn-success">'. _('Create the poll') . '</button>
|
||||
</p>
|
||||
</div>
|
||||
@ -143,16 +184,16 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
|
||||
echo '
|
||||
<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">
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<h2>'. _("Choose the dates of your poll") .'</h2>
|
||||
<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="glyphicon glyphicon-plus text-success"></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>
|
||||
</div>';
|
||||
|
||||
// Fields days : 1 by default
|
||||
$nb_days = (isset($_SESSION["totalchoixjour"])) ? count($_SESSION["totalchoixjour"]) : 1;
|
||||
// Fields days : 3 by default
|
||||
$nb_days = (isset($_SESSION["totalchoixjour"])) ? count($_SESSION["totalchoixjour"]) : 3;
|
||||
for ($i=0;$i<$nb_days;$i++) {
|
||||
$day_value = isset($_SESSION["totalchoixjour"][$i]) ? strftime( "%d/%m/%Y", $_SESSION["totalchoixjour"][$i]) : '';
|
||||
echo '
|
||||
@ -161,8 +202,9 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
|
||||
<legend>
|
||||
<div class="input-group date col-xs-7">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-calendar text-info"></i></span>
|
||||
<input type="text" class="form-control" id="day'.$i.'" title="'. _("Day") .' '. ($i+1) .'" data-date-format="'. _("dd/mm/yyyy") .'" name="days[]" value="'.$day_value.'" size="10" maxlength="10" placeholder="'. _("dd/mm/yyyy") .'" />
|
||||
<input type="text" class="form-control" id="day'.$i.'" title="'. _("Day") .' '. ($i+1) .'" data-date-format="'. _("dd/mm/yyyy") .'" aria-describedby="dateformat'.$i.'" name="days[]" value="'.$day_value.'" size="10" maxlength="10" placeholder="'. _("dd/mm/yyyy") .'" />
|
||||
</div>
|
||||
<span id="dateformat'.$i.'" class="sr-only">'. _("(dd/mm/yyyy)") .'</span>
|
||||
</legend>'."\n";
|
||||
|
||||
// Fields hours : 3 by default
|
||||
@ -171,26 +213,26 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
|
||||
echo '
|
||||
<div class="col-sm-2">
|
||||
<label for="d'.$i.'-h'.$j.'" class="sr-only control-label">'. _("Time") .' '. ($j+1) .'</label>
|
||||
<input type="text" class="form-control hours" title="'.$day_value.' - '. _("Time") .' '. ($j+1) .'" placeholder="'. _("Time") .' '. ($j+1) .'" maxlength="11" id="d'.$i.'-h'.$j.'" name="horaires'.$i.'[]" value="'.$hour_value.'" />
|
||||
<input type="text" class="form-control hours" title="'.$day_value.' - '. _("Time") .' '. ($j+1) .'" placeholder="'. _("Time") .' '. ($j+1) .'" id="d'.$i.'-h'.$j.'" name="horaires'.$i.'[]" value="'.$hour_value.'" />
|
||||
</div>'."\n";
|
||||
}
|
||||
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></button>
|
||||
<button type="button" title="'. _("Add an hour") .'" class="add-an-hour btn btn-default"><span class="glyphicon glyphicon-plus text-success"></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") .'</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>
|
||||
</div></div>
|
||||
</div>
|
||||
</fieldset>';
|
||||
}
|
||||
echo '
|
||||
<div class="col-md-6">
|
||||
<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></button>
|
||||
<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></button>
|
||||
<button type="button" id="add-a-day" class="btn btn-default" title="'. _("Add a day") .'"><span class="glyphicon glyphicon-plus text-success"></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") .'</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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 text-right">
|
||||
<div class="col-md-8 text-right">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="glyphicon glyphicon-remove text-danger"></span> '. _("Remove") . ' <span class="caret"></span>
|
||||
@ -200,7 +242,8 @@ if (!Utils::issetAndNoEmpty('nom', $_SESSION) && !Utils::issetAndNoEmpty('adress
|
||||
<li><a id="resethours" href="javascript:void(0)">'. _("Remove all hours") .'</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button name="choixheures" value="'. _("Next") .'" type="submit" class="btn btn-success disabled">'. _('Next') . '</button>
|
||||
<a class="btn btn-default" href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=date" title="'. _('Back to step 1') . '">'. _('Back') . '</a>
|
||||
<button name="choixheures" value="'. _("Next") .'" type="submit" class="btn btn-success disabled" title="'. _('Go to step 3') . '">'. _("Next") .'</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
144
contacts.php
144
contacts.php
@ -1,144 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* This software is governed by the CeCILL-B license. If a copy of this license
|
||||
* is not distributed with this file, you can obtain one at
|
||||
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.txt
|
||||
*
|
||||
* Authors of STUdS (initial project): Guilhem BORGHESI (borghesi@unistra.fr) and Raphaël DROZ
|
||||
* Authors of Framadate/OpenSondate: Framasoft (https://github.com/framasoft)
|
||||
*
|
||||
* =============================
|
||||
*
|
||||
* Ce logiciel est régi par la licence CeCILL-B. Si une copie de cette licence
|
||||
* ne se trouve pas avec ce fichier vous pouvez l'obtenir sur
|
||||
* http://www.cecill.info/licences/Licence_CeCILL-B_V1-fr.txt
|
||||
*
|
||||
* Auteurs de STUdS (projet initial) : Guilhem BORGHESI (borghesi@unistra.fr) et Raphaël DROZ
|
||||
* Auteurs de Framadate/OpenSondage : Framasoft (https://github.com/framasoft)
|
||||
*/
|
||||
namespace Framadate;
|
||||
|
||||
include_once __DIR__ . '/app/inc/init.php';
|
||||
|
||||
session_start();
|
||||
|
||||
if (file_exists('bandeaux_local.php')) {
|
||||
include_once('bandeaux_local.php');
|
||||
} else {
|
||||
include_once('bandeaux.php');
|
||||
}
|
||||
|
||||
// action du bouton annuler
|
||||
if ((isset($_POST['envoiquestion'])) &&
|
||||
isset($_POST['nom']) && !empty($_POST['nom']) &&
|
||||
isset($_POST['adresse_mail']) && !empty($_POST['adresse_mail']) && Utils::isValidEmail($_POST['adresse_mail']) &&
|
||||
isset($_POST['question']) && !empty($_POST['question'])) {
|
||||
$message=str_replace("\\","",$_POST["question"]);
|
||||
$headers = 'Reply-To: '.$_POST['adresse_mail'];
|
||||
|
||||
Utils::sendEmail( ADRESSEMAILADMIN, "" . _("[CONTACT] You have sent a question ") . "".NOMAPPLICATION, "" . _("You have a question from a user ") . " ".NOMAPPLICATION."\n\n" . _("User") . " : ".$_POST["nom"]."\n\n" . _("User's email address") . " : $_POST[adresse_mail]\n\n" . _("Message") . " :".$message,$headers );
|
||||
Utils::sendEmail( "$_POST[adresse_mail]", "" . _("[COPY] Someone has sent a question ") . "".NOMAPPLICATION, "" . _("Here is a copy of your question") . " :\n\n".$message." \n\n" . _("We're going to answer your question shortly.") . "\n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION );
|
||||
|
||||
//affichage de la page de confirmation d'envoi
|
||||
Utils::print_header(_("Make your polls"));
|
||||
bandeau_titre(_("Make your polls"));
|
||||
|
||||
echo '
|
||||
<div class="alert alert-success">
|
||||
<h2>' . _("Your message has been sent!") . '</h2>
|
||||
<p>' . _("Back to the homepage of ") . ' <a href="' . Utils::get_server_name() . '"> ' . NOMAPPLICATION . '</a>.</p>
|
||||
</div>'."\n";
|
||||
bandeau_pied();
|
||||
session_unset();
|
||||
|
||||
} else {
|
||||
$post_var = array('question', 'nom', 'adresse_mail', );
|
||||
foreach ($post_var as $var) {
|
||||
if (isset($_POST[$var]) && !empty($_POST[$var])) {
|
||||
$_SESSION[$var] = $_POST[$var];
|
||||
} else {
|
||||
$_SESSION[$var] = null;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Préparation des messages d'erreur
|
||||
*/
|
||||
|
||||
$errors = array(
|
||||
'name' => array (
|
||||
'msg' => '',
|
||||
'aria' => '',
|
||||
'class' => ''
|
||||
),
|
||||
'email' => array (
|
||||
'msg' => '',
|
||||
'aria' => '',
|
||||
'class' => ''
|
||||
),
|
||||
'question' => array (
|
||||
'msg' => '',
|
||||
'aria' => '',
|
||||
'class' => ''
|
||||
),
|
||||
'state' => false
|
||||
);
|
||||
|
||||
if (isset($_POST['envoiquestion']) && $_SESSION["nom"]=="") {
|
||||
$errors['name']['aria'] = 'aria-describeby="#poll_name_error" '; $errors['name']['class'] = ' has-error';
|
||||
$errors['name']['msg'] = '<div class="alert alert-danger" ><p id="contact_name_error">'. _("Enter a name") .'</p></div>';
|
||||
$errors['state'] = true;
|
||||
}
|
||||
|
||||
if (isset($_POST['envoiquestion']) && ($_SESSION["adresse_mail"] =="" || !Utils::isValidEmail($_SESSION["adresse_mail"]))) {
|
||||
$errors['email']['aria'] = 'aria-describeby="#poll_email_error" '; $errors['email']['class'] = ' has-error';
|
||||
$errors['email']['msg'] = '<div class="alert alert-danger" ><p id="contact_email_error">'. _("The address is not correct!") .'</p></div>';
|
||||
$errors['state'] = true;
|
||||
}
|
||||
if (isset($_POST['envoiquestion']) && $_SESSION["question"]=="") {
|
||||
$errors['question']['aria'] = 'aria-describeby="#poll_question_error" '; $errors['question']['class'] = ' has-error';
|
||||
$errors['question']['msg'] = '<div class="alert alert-danger" ><p id="contact_question_error">'. _("You must ask a question!") .'</p></div>';
|
||||
$errors['state'] = true;
|
||||
}
|
||||
|
||||
//affichage de la page
|
||||
if($errors['state']) {
|
||||
Utils::print_header( _("Error!").' - '._("Contact us") );
|
||||
} else {
|
||||
Utils::print_header( _("Contact us") );
|
||||
}
|
||||
bandeau_titre(_("Contact us"));
|
||||
|
||||
echo '
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<form name=formulaire action="' . Utils::get_server_name() . 'contacts.php" method="POST" class="form-horizontal" role="form">
|
||||
<p>' . _("If you have questions, you can send a message here.") . '</p>
|
||||
<div class="form-group'.$errors['name']['class'].'">
|
||||
<label for="name" class="col-sm-5 control-label">' . _("Your name") .'</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" maxlength="64" id="name" name="nom" class="form-control" '.$errors['name']['aria'].' value="'.$_SESSION["nom"].'" />
|
||||
</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">
|
||||
<input type="text" maxlength="64" id="email" name="adresse_mail" class="form-control" '.$errors['email']['aria'].' value="'.$_SESSION["adresse_mail"].'" />
|
||||
</div>
|
||||
</div>
|
||||
'.$errors['email']['msg'].'
|
||||
<div class="form-group'.$errors['question']['class'].'">
|
||||
<label for="question" class="col-sm-5 control-label">' . _("Question") . '</label>
|
||||
<div class="col-sm-7">
|
||||
<textarea name="question" id="question" rows="7" class="form-control" '.$errors['question']['aria'].'>'.$_SESSION["question"].'</textarea>
|
||||
</div>
|
||||
</div>
|
||||
'.$errors['question']['msg'].'
|
||||
<p class="text-right"><button type="submit" name="envoiquestion" value="'._("Send your question").'" class="btn btn-success">'._("Send your question").'</button></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>'."\n";
|
||||
|
||||
bandeau_pied();
|
||||
}
|
@ -45,27 +45,7 @@ function ajouter_sondage()
|
||||
$sondage=random(16);
|
||||
$sondage_admin=$sondage.random(8);
|
||||
|
||||
if ($_SESSION["formatsondage"]=="A"||$_SESSION["formatsondage"]=="A+") {
|
||||
//extraction de la date de fin choisie
|
||||
if ($_SESSION["champdatefin"]) {
|
||||
if ($_SESSION["champdatefin"]>time()+250000) {
|
||||
$date_fin=$_SESSION["champdatefin"];
|
||||
}
|
||||
} else {
|
||||
$date_fin=time()+15552000;
|
||||
}
|
||||
}
|
||||
|
||||
if ($_SESSION["formatsondage"]=="D"||$_SESSION["formatsondage"]=="D+") {
|
||||
//Calcul de la date de fin du sondage
|
||||
$temp_array = array_unique($_SESSION["totalchoixjour"]);
|
||||
sort($temp_array);
|
||||
$date_fin= end($temp_array)+2592000;
|
||||
}
|
||||
|
||||
if (is_numeric($date_fin) === false) {
|
||||
$date_fin = time()+15552000;
|
||||
}
|
||||
$date_fin = ($_SESSION["champdatefin"]) ? $_SESSION["champdatefin"] : $date_fin=time()+15552000;
|
||||
|
||||
$sql = 'INSERT INTO sondage
|
||||
(id_sondage, commentaires, mail_admin, nom_admin, titre, id_sondage_admin, date_fin, format, mailsonde)
|
||||
@ -90,10 +70,10 @@ function ajouter_sondage()
|
||||
$message = _("This is the message you have to send to the people you want to poll. \nNow, you have to send this message to everyone you want to poll.");
|
||||
$message .= "\n\n";
|
||||
$message .= stripslashes(html_entity_decode($_SESSION["nom"],ENT_QUOTES,"UTF-8"))." " . _("hast just created a poll called") . " : \"".stripslashes(htmlspecialchars_decode($_SESSION["titre"],ENT_QUOTES))."\".\n";
|
||||
$message .= _("Thanks for filling the poll at the link above") . " :\n\n%s\n\n" . _("Thanks for your confidence.") . ",\n".NOMAPPLICATION;
|
||||
$message .= _("Thanks for filling the poll at the link above") . " :\n\n%s\n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION;
|
||||
|
||||
$message_admin = _("This message should NOT be sended to the polled people. It is private for the poll's creator.\n\nYou can now modify it at the link above");
|
||||
$message_admin .= " :\n\n"."%s \n\n" . _("Thanks for your confidence.") . ",\n".NOMAPPLICATION;
|
||||
$message_admin .= " :\n\n"."%s \n\n" . _("Thanks for your confidence.") . "\n".NOMAPPLICATION;
|
||||
|
||||
$message = sprintf($message, Utils::getUrlSondage($sondage));
|
||||
$message_admin = sprintf($message_admin, Utils::getUrlSondage($sondage_admin, true));
|
||||
|
64
css/bootstrap-accessibility.css
vendored
64
css/bootstrap-accessibility.css
vendored
@ -1,64 +0,0 @@
|
||||
.btn:focus {
|
||||
outline: dotted 2px black;
|
||||
}
|
||||
|
||||
div.active:focus {
|
||||
outline: dotted 1px black;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
outline: dotted 1px black;
|
||||
}
|
||||
|
||||
.close:hover, .close:focus {
|
||||
outline: dotted 1px black;
|
||||
}
|
||||
|
||||
.nav > li > a:hover, .nav > li > a:focus {
|
||||
outline: dotted 1px black;
|
||||
}
|
||||
|
||||
.carousel-inner > .item {
|
||||
position: absolute;
|
||||
top: -999999em;
|
||||
display: block;
|
||||
-webkit-transition: 0.6s ease-in-out left;
|
||||
-moz-transition: 0.6s ease-in-out left;
|
||||
-o-transition: 0.6s ease-in-out left;
|
||||
transition: 0.6s ease-in-out left;
|
||||
}
|
||||
.carousel-inner > .active {
|
||||
top: 0;
|
||||
}
|
||||
.carousel-inner > .active,
|
||||
.carousel-inner > .next,
|
||||
.carousel-inner > .prev {
|
||||
position: relative;
|
||||
}
|
||||
.carousel-inner > .next,
|
||||
.carousel-inner > .prev {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.alert-success {
|
||||
color: #2d4821;
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
color: #214c62;
|
||||
}
|
||||
|
||||
.alert-warning {
|
||||
color: #6c4a00;
|
||||
background-color: #f9f1c6;
|
||||
}
|
||||
|
||||
.alert-danger {
|
||||
color: #d2322d;
|
||||
}
|
||||
|
||||
.alert-danger:hover {
|
||||
color: #a82824;
|
||||
}
|
@ -127,9 +127,10 @@
|
||||
.datepicker table tr td.today:hover,
|
||||
.datepicker table tr td.today.disabled,
|
||||
.datepicker table tr td.today.disabled:hover {
|
||||
color: #000000;
|
||||
background-color: #ffdb99;
|
||||
border-color: #ffb733;
|
||||
font-weight:bold;
|
||||
/*color: #000000;
|
||||
/*background-color: #ffdb99;
|
||||
border-color: #ffb733;*/*/
|
||||
}
|
||||
.datepicker table tr td.today:hover,
|
||||
.datepicker table tr td.today:hover:hover,
|
||||
@ -151,9 +152,9 @@
|
||||
.open .dropdown-toggle.datepicker table tr td.today:hover,
|
||||
.open .dropdown-toggle.datepicker table tr td.today.disabled,
|
||||
.open .dropdown-toggle.datepicker table tr td.today.disabled:hover {
|
||||
color: #000000;
|
||||
/*color: #000000;
|
||||
background-color: #ffcd70;
|
||||
border-color: #f59e00;
|
||||
border-color: #f59e00;*/
|
||||
}
|
||||
.datepicker table tr td.today:active,
|
||||
.datepicker table tr td.today:hover:active,
|
||||
@ -229,8 +230,8 @@ fieldset[disabled] .datepicker table tr td.today.active,
|
||||
fieldset[disabled] .datepicker table tr td.today:hover.active,
|
||||
fieldset[disabled] .datepicker table tr td.today.disabled.active,
|
||||
fieldset[disabled] .datepicker table tr td.today.disabled:hover.active {
|
||||
background-color: #ffdb99;
|
||||
border-color: #ffb733;
|
||||
/*background-color: #ffdb99;
|
||||
border-color: #ffb733;*/
|
||||
}
|
||||
.datepicker table tr td.today:hover:hover {
|
||||
color: #000;
|
||||
@ -250,8 +251,8 @@ fieldset[disabled] .datepicker table tr td.today.disabled:hover.active {
|
||||
.datepicker table tr td.range.today.disabled,
|
||||
.datepicker table tr td.range.today.disabled:hover {
|
||||
color: #000000;
|
||||
background-color: #f7ca77;
|
||||
border-color: #f1a417;
|
||||
/*background-color: #f7ca77;
|
||||
border-color: #f1a417;*/
|
||||
border-radius: 0;
|
||||
}
|
||||
.datepicker table tr td.range.today:hover,
|
||||
@ -274,9 +275,9 @@ fieldset[disabled] .datepicker table tr td.today.disabled:hover.active {
|
||||
.open .dropdown-toggle.datepicker table tr td.range.today:hover,
|
||||
.open .dropdown-toggle.datepicker table tr td.range.today.disabled,
|
||||
.open .dropdown-toggle.datepicker table tr td.range.today.disabled:hover {
|
||||
color: #000000;
|
||||
/*color: #000000;
|
||||
background-color: #f4bb51;
|
||||
border-color: #bf800c;
|
||||
border-color: #bf800c;*/
|
||||
}
|
||||
.datepicker table tr td.range.today:active,
|
||||
.datepicker table tr td.range.today:hover:active,
|
||||
@ -352,16 +353,16 @@ fieldset[disabled] .datepicker table tr td.range.today.active,
|
||||
fieldset[disabled] .datepicker table tr td.range.today:hover.active,
|
||||
fieldset[disabled] .datepicker table tr td.range.today.disabled.active,
|
||||
fieldset[disabled] .datepicker table tr td.range.today.disabled:hover.active {
|
||||
background-color: #f7ca77;
|
||||
border-color: #f1a417;
|
||||
/*background-color: #f7ca77;
|
||||
border-color: #f1a417;*/
|
||||
}
|
||||
.datepicker table tr td.selected,
|
||||
.datepicker table tr td.selected:hover,
|
||||
.datepicker table tr td.selected.disabled,
|
||||
.datepicker table tr td.selected.disabled:hover {
|
||||
color: #ffffff;
|
||||
background-color: #999999;
|
||||
border-color: #555555;
|
||||
background-color: #9D74B5;
|
||||
border-color: #8E65A6;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datepicker table tr td.selected:hover,
|
||||
@ -385,8 +386,8 @@ fieldset[disabled] .datepicker table tr td.range.today.disabled:hover.active {
|
||||
.open .dropdown-toggle.datepicker table tr td.selected.disabled,
|
||||
.open .dropdown-toggle.datepicker table tr td.selected.disabled:hover {
|
||||
color: #ffffff;
|
||||
background-color: #858585;
|
||||
border-color: #373737;
|
||||
background-color: #9D74B5;
|
||||
border-color: #8E65A6;
|
||||
}
|
||||
.datepicker table tr td.selected:active,
|
||||
.datepicker table tr td.selected:hover:active,
|
||||
@ -462,16 +463,16 @@ fieldset[disabled] .datepicker table tr td.selected.active,
|
||||
fieldset[disabled] .datepicker table tr td.selected:hover.active,
|
||||
fieldset[disabled] .datepicker table tr td.selected.disabled.active,
|
||||
fieldset[disabled] .datepicker table tr td.selected.disabled:hover.active {
|
||||
background-color: #999999;
|
||||
border-color: #555555;
|
||||
background-color: #9D74B5;
|
||||
border-color: #8E65A6;
|
||||
}
|
||||
.datepicker table tr td.active,
|
||||
.datepicker table tr td.active:hover,
|
||||
.datepicker table tr td.active.disabled,
|
||||
.datepicker table tr td.active.disabled:hover {
|
||||
color: #ffffff;
|
||||
background-color: #428bca;
|
||||
border-color: #357ebd;
|
||||
background-color: #6A5687;
|
||||
border-color: #5C4978;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datepicker table tr td.active:hover,
|
||||
@ -495,8 +496,8 @@ fieldset[disabled] .datepicker table tr td.selected.disabled:hover.active {
|
||||
.open .dropdown-toggle.datepicker table tr td.active.disabled,
|
||||
.open .dropdown-toggle.datepicker table tr td.active.disabled:hover {
|
||||
color: #ffffff;
|
||||
background-color: #3276b1;
|
||||
border-color: #285e8e;
|
||||
background-color: #6A5687;
|
||||
border-color: #5C4978;
|
||||
}
|
||||
.datepicker table tr td.active:active,
|
||||
.datepicker table tr td.active:hover:active,
|
||||
@ -572,8 +573,8 @@ fieldset[disabled] .datepicker table tr td.active.active,
|
||||
fieldset[disabled] .datepicker table tr td.active:hover.active,
|
||||
fieldset[disabled] .datepicker table tr td.active.disabled.active,
|
||||
fieldset[disabled] .datepicker table tr td.active.disabled:hover.active {
|
||||
background-color: #428bca;
|
||||
border-color: #357ebd;
|
||||
background-color: #6A5687;
|
||||
border-color: #5C4978;
|
||||
}
|
||||
.datepicker table tr td span {
|
||||
display: block;
|
||||
@ -599,8 +600,8 @@ fieldset[disabled] .datepicker table tr td.active.disabled:hover.active {
|
||||
.datepicker table tr td span.active.disabled,
|
||||
.datepicker table tr td span.active.disabled:hover {
|
||||
color: #ffffff;
|
||||
background-color: #428bca;
|
||||
border-color: #357ebd;
|
||||
background-color: #6A5687;
|
||||
border-color: #5C4978;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.datepicker table tr td span.active:hover,
|
||||
@ -624,8 +625,8 @@ fieldset[disabled] .datepicker table tr td.active.disabled:hover.active {
|
||||
.open .dropdown-toggle.datepicker table tr td span.active.disabled,
|
||||
.open .dropdown-toggle.datepicker table tr td span.active.disabled:hover {
|
||||
color: #ffffff;
|
||||
background-color: #3276b1;
|
||||
border-color: #285e8e;
|
||||
background-color: #6A5687;
|
||||
border-color: #5C4978;
|
||||
}
|
||||
.datepicker table tr td span.active:active,
|
||||
.datepicker table tr td span.active:hover:active,
|
||||
@ -701,8 +702,8 @@ fieldset[disabled] .datepicker table tr td span.active.active,
|
||||
fieldset[disabled] .datepicker table tr td span.active:hover.active,
|
||||
fieldset[disabled] .datepicker table tr td span.active.disabled.active,
|
||||
fieldset[disabled] .datepicker table tr td span.active.disabled:hover.active {
|
||||
background-color: #428bca;
|
||||
border-color: #357ebd;
|
||||
background-color: #6A5687;
|
||||
border-color: #5C4978;
|
||||
}
|
||||
.datepicker table tr td span.old,
|
||||
.datepicker table tr td span.new {
|
||||
|
450
css/frama.css
Normal file
450
css/frama.css
Normal file
@ -0,0 +1,450 @@
|
||||
/* Text */
|
||||
.text-muted,
|
||||
.text-muted a,
|
||||
a.text-muted {
|
||||
color: #767676;
|
||||
border-color: #767676;
|
||||
}
|
||||
|
||||
.text-muted a:hover,
|
||||
.text-muted a:focus,
|
||||
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 */
|
||||
.bg-primary,
|
||||
.bg-primary a,
|
||||
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;
|
||||
}
|
||||
.bg-info, a.bg-info:hover {
|
||||
background-color: #D9EFF7;
|
||||
}
|
||||
.bg-warning, a.bg-warning:hover {
|
||||
background-color: #FCF3E3;
|
||||
}
|
||||
.bg-danger,a.bg-danger:hover {
|
||||
background-color: #F2E7E5;
|
||||
}
|
||||
|
||||
/* Alerts */
|
||||
.alert-success a:not(.btn), .alert-info a:not(.btn),
|
||||
.alert-warning a:not(.btn), .alert-danger a:not(.btn) {
|
||||
text-decoration:none;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: dotted;
|
||||
}
|
||||
.alert-success a:not(.btn):hover, .alert-info a:not(.btn):hover,
|
||||
.alert-warning a:not(.btn):hover, .alert-danger a:not(.btn):hover {
|
||||
text-decoration:none;
|
||||
border-bottom-style: solid;
|
||||
}
|
||||
.alert-success a:not(.btn),
|
||||
.alert-success a:not(.btn):hover,
|
||||
.alert-success {
|
||||
color: #4A542C;
|
||||
background:#EAF0D8;
|
||||
border-color: #4A542C;
|
||||
}
|
||||
.alert-info a:not(.btn),
|
||||
.alert-info a:not(.btn):hover,
|
||||
.alert-info {
|
||||
color: #245569;
|
||||
background-color: #D9EFF7;
|
||||
border-color: #245569;
|
||||
}
|
||||
.alert-warning a:not(.btn),
|
||||
.alert-warning a:not(.btn):hover,
|
||||
.alert-warning {
|
||||
color: #66522C;
|
||||
background-color: #FCF3E3;
|
||||
border-color: #66522C;
|
||||
}
|
||||
.alert-danger a:not(.btn),
|
||||
.alert-danger a:not(.btn):hover,
|
||||
.alert-danger {
|
||||
color: #843D34;
|
||||
background-color: #F2E7E5;
|
||||
border-color: #843D34;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn-default {
|
||||
color: #333;
|
||||
background-color: #fff;
|
||||
border-color: #ccc;
|
||||
}
|
||||
.btn-default:hover,
|
||||
.btn-default:focus,
|
||||
.btn-default:active,
|
||||
.btn-default.active,
|
||||
.open > .dropdown-toggle.btn-default {
|
||||
color: #333;
|
||||
background-color: #e6e6e6;
|
||||
border-color: #adadad;
|
||||
}
|
||||
|
||||
.btn-default.disabled,
|
||||
.btn-default[disabled],
|
||||
fieldset[disabled] .btn-default,
|
||||
.btn-default.disabled:hover,
|
||||
.btn-default[disabled]:hover,
|
||||
fieldset[disabled] .btn-default:hover,
|
||||
.btn-default.disabled:focus,
|
||||
.btn-default[disabled]:focus,
|
||||
fieldset[disabled] .btn-default:focus,
|
||||
.btn-default.disabled:active,
|
||||
.btn-default[disabled]:active,
|
||||
fieldset[disabled] .btn-default:active,
|
||||
.btn-default.disabled.active,
|
||||
.btn-default[disabled].active,
|
||||
fieldset[disabled] .btn-default.active {
|
||||
background-color: #fff;
|
||||
border-color: #ccc;
|
||||
}
|
||||
|
||||
.btn-default .badge {
|
||||
color: #fff;
|
||||
background-color: #767676;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #6A5687;
|
||||
border-color: #5C4978;
|
||||
}
|
||||
.btn-primary:hover,
|
||||
.btn-primary:focus,
|
||||
.btn-primary:active,
|
||||
.btn-primary.active,
|
||||
.open > .dropdown-toggle.btn-primary {
|
||||
color: #fff;
|
||||
background-color: #5E4A7A;
|
||||
border-color: #513F69;
|
||||
}
|
||||
.btn-primary.disabled,
|
||||
.btn-primary[disabled],
|
||||
fieldset[disabled] .btn-primary,
|
||||
.btn-primary.disabled:hover,
|
||||
.btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary:hover,
|
||||
.btn-primary.disabled:focus,
|
||||
.btn-primary[disabled]:focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
.btn-primary.disabled:active,
|
||||
.btn-primary[disabled]:active,
|
||||
fieldset[disabled] .btn-primary:active,
|
||||
.btn-primary.disabled.active,
|
||||
.btn-primary[disabled].active,
|
||||
fieldset[disabled] .btn-primary.active {
|
||||
background-color: #6A5687;
|
||||
border-color: #5C4978;
|
||||
}
|
||||
.btn-primary .badge {
|
||||
color: #6A5687;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
color: #fff;
|
||||
background-color: #849551;
|
||||
border-color: #748544;
|
||||
}
|
||||
.btn-success:hover,
|
||||
.btn-success:focus,
|
||||
.btn-success:active,
|
||||
.btn-success.active,
|
||||
.open > .dropdown-toggle.btn-success {
|
||||
color: #fff;
|
||||
background-color: #768745;
|
||||
border-color: #67753C;
|
||||
}
|
||||
.btn-success.disabled,
|
||||
.btn-success[disabled],
|
||||
fieldset[disabled] .btn-success,
|
||||
.btn-success.disabled:hover,
|
||||
.btn-success[disabled]:hover,
|
||||
fieldset[disabled] .btn-success:hover,
|
||||
.btn-success.disabled:focus,
|
||||
.btn-success[disabled]:focus,
|
||||
fieldset[disabled] .btn-success:focus,
|
||||
.btn-success.disabled:active,
|
||||
.btn-success[disabled]:active,
|
||||
fieldset[disabled] .btn-success:active,
|
||||
.btn-success.disabled.active,
|
||||
.btn-success[disabled].active,
|
||||
fieldset[disabled] .btn-success.active {
|
||||
background-color: #849551;
|
||||
border-color: #748544;
|
||||
}
|
||||
.btn-success .badge {
|
||||
color: #849551;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
color: #fff;
|
||||
background-color: #366F86;
|
||||
border-color: #2C6278;
|
||||
}
|
||||
.btn-info:hover,
|
||||
.btn-info:focus,
|
||||
.btn-info:active,
|
||||
.btn-info.active,
|
||||
.open > .dropdown-toggle.btn-info {
|
||||
color: #fff;
|
||||
background-color: #2D647A;
|
||||
border-color: #275669;
|
||||
}
|
||||
.btn-info.disabled,
|
||||
.btn-info[disabled],
|
||||
fieldset[disabled] .btn-info,
|
||||
.btn-info.disabled:hover,
|
||||
.btn-info[disabled]:hover,
|
||||
fieldset[disabled] .btn-info:hover,
|
||||
.btn-info.disabled:focus,
|
||||
.btn-info[disabled]:focus,
|
||||
fieldset[disabled] .btn-info:focus,
|
||||
.btn-info.disabled:active,
|
||||
.btn-info[disabled]:active,
|
||||
fieldset[disabled] .btn-info:active,
|
||||
.btn-info.disabled.active,
|
||||
.btn-info[disabled].active,
|
||||
fieldset[disabled] .btn-info.active {
|
||||
background-color: #366F86;
|
||||
border-color: #2C6278;
|
||||
}
|
||||
.btn-info .badge {
|
||||
color: #366F86;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
color: #fff;
|
||||
background-color: #DBA306;
|
||||
border-color: #CC9600;
|
||||
}
|
||||
.btn-warning:hover,
|
||||
.btn-warning:focus,
|
||||
.btn-warning:active,
|
||||
.btn-warning.active,
|
||||
.open > .dropdown-toggle.btn-warning {
|
||||
color: #fff;
|
||||
background-color: #CF9800;
|
||||
border-color: #BD8A00;
|
||||
}
|
||||
.btn-warning.disabled,
|
||||
.btn-warning[disabled],
|
||||
fieldset[disabled] .btn-warning,
|
||||
.btn-warning.disabled:hover,
|
||||
.btn-warning[disabled]:hover,
|
||||
fieldset[disabled] .btn-warning:hover,
|
||||
.btn-warning.disabled:focus,
|
||||
.btn-warning[disabled]:focus,
|
||||
fieldset[disabled] .btn-warning:focus,
|
||||
.btn-warning.disabled:active,
|
||||
.btn-warning[disabled]:active,
|
||||
fieldset[disabled] .btn-warning:active,
|
||||
.btn-warning.disabled.active,
|
||||
.btn-warning[disabled].active,
|
||||
fieldset[disabled] .btn-warning.active {
|
||||
background-color: #DBA306;
|
||||
border-color: #CC9600;
|
||||
}
|
||||
.btn-warning .badge {
|
||||
color: #DBA306;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
color: #fff;
|
||||
background-color: #CC2D18;
|
||||
border-color: #BD2511;
|
||||
}
|
||||
.btn-danger:hover,
|
||||
.btn-danger:focus,
|
||||
.btn-danger:active,
|
||||
.btn-danger.active,
|
||||
.open > .dropdown-toggle.btn-danger {
|
||||
color: #fff;
|
||||
background-color: #BF2511;
|
||||
border-color: #AD220F;
|
||||
}
|
||||
.btn-danger.disabled,
|
||||
.btn-danger[disabled],
|
||||
fieldset[disabled] .btn-danger,
|
||||
.btn-danger.disabled:hover,
|
||||
.btn-danger[disabled]:hover,
|
||||
fieldset[disabled] .btn-danger:hover,
|
||||
.btn-danger.disabled:focus,
|
||||
.btn-danger[disabled]:focus,
|
||||
fieldset[disabled] .btn-danger:focus,
|
||||
.btn-danger.disabled:active,
|
||||
.btn-danger[disabled]:active,
|
||||
fieldset[disabled] .btn-danger:active,
|
||||
.btn-danger.disabled.active,
|
||||
.btn-danger[disabled].active,
|
||||
fieldset[disabled] .btn-danger.active {
|
||||
background-color: #CC2D18;
|
||||
border-color: #BD2511;
|
||||
}
|
||||
.btn-danger .badge {
|
||||
color: #CC2D18;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.btn-orange {
|
||||
color: #fff;
|
||||
background-color: #D2703A;
|
||||
border-color: #C26430;
|
||||
}
|
||||
.btn-orange:hover,
|
||||
.btn-orange:focus,
|
||||
.btn-orange:active,
|
||||
.btn-orange.active,
|
||||
.open > .dropdown-toggle.btn-orange {
|
||||
color: #fff;
|
||||
background-color: #C46531;
|
||||
border-color: #B35C2D;
|
||||
}
|
||||
.btn-orange.disabled,
|
||||
.btn-orange[disabled],
|
||||
fieldset[disabled] .btn-orange,
|
||||
.btn-orange.disabled:hover,
|
||||
.btn-orange[disabled]:hover,
|
||||
fieldset[disabled] .btn-orange:hover,
|
||||
.btn-orange.disabled:focus,
|
||||
.btn-orange[disabled]:focus,
|
||||
fieldset[disabled] .btn-orange:focus,
|
||||
.btn-orange.disabled:active,
|
||||
.btn-orange[disabled]:active,
|
||||
fieldset[disabled] .btn-orange:active,
|
||||
.btn-orange.disabled.active,
|
||||
.btn-orange[disabled].active,
|
||||
fieldset[disabled] .btn-orange.active {
|
||||
background-color: #D2703A;
|
||||
border-color: #C26430;
|
||||
}
|
||||
.btn-orange .badge {
|
||||
color: #D2703A;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
font-weight: normal;
|
||||
color: #366F86;
|
||||
cursor: pointer;
|
||||
border-radius: 0;
|
||||
}
|
||||
.btn-link,
|
||||
.btn-link:active,
|
||||
.btn-link[disabled],
|
||||
fieldset[disabled] .btn-link {
|
||||
background-color: transparent;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
.btn-link,
|
||||
.btn-link:hover,
|
||||
.btn-link:focus,
|
||||
.btn-link:active {
|
||||
border-color: transparent;
|
||||
}
|
||||
.btn-link:hover,
|
||||
.btn-link:focus {
|
||||
color: #134C63;
|
||||
text-decoration: underline;
|
||||
background-color: transparent;
|
||||
}
|
||||
.btn-link[disabled]:hover,
|
||||
fieldset[disabled] .btn-link:hover,
|
||||
.btn-link[disabled]:focus,
|
||||
fieldset[disabled] .btn-link:focus {
|
||||
color: #767676;
|
||||
text-decoration: none;
|
||||
}
|
||||
.btn-link .badge {
|
||||
color: #fff;
|
||||
background-color: #767676;
|
||||
}
|
||||
|
147
css/style.css
147
css/style.css
@ -15,77 +15,25 @@
|
||||
* Auteurs d'OpenSondage : Framasoft (https://github.com/framasoft)
|
||||
*/
|
||||
|
||||
/* Calendrier dans choix_date.php */
|
||||
div.calendrier table {
|
||||
border:2px solid #ccf;
|
||||
background-color: #CCF;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
body {
|
||||
font-family: "DejaVu Sans", Verdana, Geneva, sans-serif;
|
||||
color:#333;
|
||||
background:#eee;
|
||||
}
|
||||
|
||||
div.calendrier td {
|
||||
height: 40px;
|
||||
.trait { /* hr */
|
||||
background-color: #EEE;
|
||||
height: 11px;
|
||||
margin:15px 0px;
|
||||
border:none;
|
||||
}
|
||||
|
||||
div.calendrier td.libre:hover,
|
||||
div.calendrier td.choisi:hover {
|
||||
opacity: 0.8;
|
||||
.ombre {
|
||||
background-color: #FFF;
|
||||
box-shadow: -4px 6px 9px rgba(50, 50, 50, 0.5);
|
||||
margin:30px auto;
|
||||
}
|
||||
|
||||
/*entête calendrier */
|
||||
.choix_date_mois {
|
||||
font-weight: bold;
|
||||
font-size: larger;
|
||||
}
|
||||
|
||||
/*jour de la semaine dans calendrier*/
|
||||
div.calendrier td.joursemaine {
|
||||
width:14%;
|
||||
text-align: center;
|
||||
border: 2px;
|
||||
background-color: white;
|
||||
height: 40px;
|
||||
}
|
||||
/*jour avant le premier jour du mois dans calendrier*/
|
||||
div.calendrier td.avant {
|
||||
text-align: center;
|
||||
border: 2px;
|
||||
font-family:arial;
|
||||
font-size:13px;
|
||||
background-color: #EEEEEE;
|
||||
}
|
||||
/*jour libre dans calendrier*/
|
||||
div.calendrier td.libre {
|
||||
text-align: center;
|
||||
border: 2px;
|
||||
background-color: #66FF99;
|
||||
}
|
||||
/*jour deja selectionné dans calendrier*/
|
||||
div.calendrier td.choisi {
|
||||
text-align: center;
|
||||
border: 2px;
|
||||
background-color: #54ADF7;
|
||||
}
|
||||
|
||||
.bouton {
|
||||
border:0px;
|
||||
padding: 12px 30px 6px;
|
||||
margin:0px;
|
||||
cursor:pointer;
|
||||
font-family:arial;
|
||||
font-size:13px;
|
||||
}
|
||||
/*les boutons pour choisir un jour non selectionné*/
|
||||
.ON {
|
||||
background-color: #66FF99;
|
||||
}
|
||||
|
||||
/*les boutons pour deselectionner un jour deja choisi*/
|
||||
.OFF {
|
||||
background-color: #54ADF7;
|
||||
}
|
||||
/* </calendrier> */
|
||||
|
||||
/* Commentaires */
|
||||
div.comment{
|
||||
margin-top: 10px;
|
||||
@ -108,12 +56,24 @@ main, header, footer, .container .jumbotron {
|
||||
padding:24px 30px;
|
||||
}
|
||||
|
||||
/* Effet sur les images en page d'accueil */
|
||||
.opacity {
|
||||
opacity: 0.6;
|
||||
.summary h3 {
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
.opacity:hover {
|
||||
.summary {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
.summary img {
|
||||
max-width:100px;
|
||||
}
|
||||
|
||||
/* Effet sur les images en page d'accueil */
|
||||
.opacity img {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.opacity:hover img {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
@ -146,6 +106,7 @@ h3.control-label {
|
||||
font-weight: 700;
|
||||
font-size: 14px;
|
||||
line-height: 1.42857;
|
||||
margin-top:0;
|
||||
}
|
||||
|
||||
caption {
|
||||
@ -156,7 +117,8 @@ caption {
|
||||
/* adminstuds.php */
|
||||
#title-form h2 .btn-edit,
|
||||
#email-form .btn-edit,
|
||||
#description-form .btn-edit {
|
||||
#description-form .btn-edit,
|
||||
#poll-rules-form .btn-edit {
|
||||
position:absolute;
|
||||
left:-2000px;
|
||||
}
|
||||
@ -166,7 +128,9 @@ caption {
|
||||
#email-form .btn-edit:focus,
|
||||
#email-form:hover .btn-edit,
|
||||
#description-form .btn-edit:focus,
|
||||
#description-form:hover .btn-edit {
|
||||
#description-form:hover .btn-edit,
|
||||
#poll-rules-form .btn-edit:focus,
|
||||
#poll-rules-form:hover .btn-edit {
|
||||
position:relative !important;
|
||||
left:0;
|
||||
padding: 0px 10px;
|
||||
@ -180,10 +144,18 @@ caption {
|
||||
margin-bottom:0;
|
||||
}
|
||||
|
||||
#poll-rules-form p,
|
||||
.jumbotron p.well {
|
||||
font-size:16px;
|
||||
}
|
||||
.jumbotron p {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Tableau du sondage */
|
||||
#tableContainer {
|
||||
overflow-x:auto;
|
||||
margin:0 auto;
|
||||
margin:20px auto;
|
||||
}
|
||||
|
||||
table.results {
|
||||
@ -210,8 +182,12 @@ table.results tbody td {
|
||||
table.results thead th {
|
||||
text-align:center;
|
||||
border:2px solid white;
|
||||
padding:1px 5px;
|
||||
padding:5px;
|
||||
min-width:40px;
|
||||
font-size:12px;
|
||||
max-width:100px;
|
||||
overflow:hidden;
|
||||
text-overflow:ellipsis;
|
||||
}
|
||||
|
||||
table.results thead .btn {
|
||||
@ -308,23 +284,23 @@ table.results .btn-link.btn-sm {
|
||||
}
|
||||
|
||||
.yes input[type="radio"]:checked + label { /* =.btn-success.active */
|
||||
color: #FFF;
|
||||
background-color: #449D44;
|
||||
border-color: #398439;
|
||||
color: #fff;
|
||||
background-color: #768745;
|
||||
border-color: #67753C;
|
||||
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.125) inset;
|
||||
}
|
||||
|
||||
.ifneedbe input[type="radio"]:checked + label { /* =.btn-warning.active */
|
||||
color: #FFF;
|
||||
background-color: #EC971F;
|
||||
border-color: #D58512;
|
||||
color: #fff;
|
||||
background-color: #CF9800;
|
||||
border-color: #BD8A00;
|
||||
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.125) inset;
|
||||
}
|
||||
|
||||
.no input[type="radio"]:checked + label { /* =.btn-danger.active */
|
||||
color: #FFF;
|
||||
background-color: #C9302C;
|
||||
border-color: #AC2925;
|
||||
color: #fff;
|
||||
background-color: #BF2511;
|
||||
border-color: #AD220F;
|
||||
box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.125) inset;
|
||||
}
|
||||
|
||||
@ -354,4 +330,11 @@ table.results .btn-link.btn-sm {
|
||||
border:none;
|
||||
background:transparent;
|
||||
}
|
||||
/* choix_autre.php */
|
||||
.md-a-img {
|
||||
text-decoration:none !important;
|
||||
}
|
||||
|
||||
#md-a-imgModal .form-group {
|
||||
margin:10px 0px;
|
||||
}
|
||||
|
@ -34,27 +34,40 @@ $nbcolonnes=substr_count($dsondage->sujet,',')+1;
|
||||
$toutsujet=explode(",",$dsondage->sujet);
|
||||
|
||||
//affichage des sujets du sondage
|
||||
$input =";";
|
||||
$input =",";
|
||||
foreach ($toutsujet as $value) {
|
||||
if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
if (strpos($dsondage->sujet,'@') !== false) {
|
||||
$days=explode("@",$value);
|
||||
$input.= date("j/n/Y",$days[0]).';';
|
||||
$input.= '"'.date("j/n/Y",$days[0]).'",';
|
||||
} else {
|
||||
$input.= date("j/n/Y",$values).';';
|
||||
$input.= '"'.date("j/n/Y",$values).'",';
|
||||
}
|
||||
} else {
|
||||
$input.= $value.';';
|
||||
|
||||
preg_match_all('/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/',$value,$md_a_img); // Markdown [![alt](src)](href)
|
||||
preg_match_all('/!\[(.*?)\]\((.*?)\)/',$value,$md_img); // Markdown ![alt](src)
|
||||
preg_match_all('/\[(.*?)\]\((.*?)\)/',$value,$md_a); // Markdown [text](href)
|
||||
if (isset($md_a_img[2][0]) && $md_a_img[2][0]!='' && isset($md_a_img[3][0]) && $md_a_img[3][0]!='') { // [![alt](src)](href)
|
||||
$subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0]!='') ? stripslashes($md_a_img[1][0]) : _("Choice") .' '.($i+1);
|
||||
} elseif (isset($md_img[2][0]) && $md_img[2][0]!='') { // ![alt](src)
|
||||
$subject_text = (isset($md_img[1][0]) && $md_img[1][0]!='') ? stripslashes($md_img[1][0]) : _("Choice") .' '.($i+1);
|
||||
} elseif (isset($md_a[2][0]) && $md_a[2][0]!='') { // [text](href)
|
||||
$subject_text = (isset($md_a[1][0]) && $md_a[1][0]!='') ? stripslashes($md_a[1][0]) : _("Choice") .' '.($i+1);
|
||||
} else { // text only
|
||||
$subject_text = stripslashes($value);
|
||||
}
|
||||
$input.= '"'.html_entity_decode($subject_text).'",';
|
||||
}
|
||||
}
|
||||
|
||||
$input.="\r\n";
|
||||
|
||||
if (strpos($dsondage->sujet,'@') !== false) {
|
||||
$input.=";";
|
||||
$input.=",";
|
||||
foreach ($toutsujet as $value) {
|
||||
$heures=explode("@",$value);
|
||||
$input.= $heures[1].';';
|
||||
$input.= '"'.$heures[1].'",';
|
||||
}
|
||||
|
||||
$input.="\r\n";
|
||||
@ -63,15 +76,15 @@ if (strpos($dsondage->sujet,'@') !== false) {
|
||||
while ( $data=$user_studs->FetchNextObject(false)) {
|
||||
// Le nom de l'utilisateur
|
||||
$nombase=html_entity_decode(str_replace("°","'",$data->nom));
|
||||
$input.=$nombase.';';
|
||||
$input.= '"'.$nombase.'",';
|
||||
//affichage des resultats
|
||||
$ensemblereponses=$data->reponses;
|
||||
for ($k=0;$k<$nbcolonnes;$k++) {
|
||||
$car=substr($ensemblereponses,$k,1);
|
||||
switch ($car) {
|
||||
case "1": $input .= _('Yes').';'; $somme[$k]++; break;
|
||||
case "2": $input .= _('Ifneedbe').';'; break;
|
||||
default: $input .= _('No').';'; break;
|
||||
case "1": $input .= '"'._('Yes').'",'; $somme[$k]++; break;
|
||||
case "2": $input .= '"'._('Ifneedbe').'",'; break;
|
||||
default: $input .= '"'._('No').'",'; break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,6 +99,6 @@ header( 'Content-Length: '.$filesize );
|
||||
header( 'Content-Disposition: attachment; filename="'.$filename.'"' );
|
||||
header( 'Cache-Control: max-age=10' );
|
||||
|
||||
echo $input;
|
||||
echo str_replace('"','""',$input);
|
||||
|
||||
die();
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 23 KiB |
BIN
images/date.png
BIN
images/date.png
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.5 KiB |
61
index.php
61
index.php
@ -32,26 +32,61 @@ session_start();
|
||||
|
||||
// affichage de la page
|
||||
Utils::print_header( _("Home") );
|
||||
bandeau_titre(_("Organiser des rendez-vous simplement, librement."));
|
||||
bandeau_titre(_("Make your polls"));
|
||||
echo '
|
||||
<div class="row text-center">
|
||||
<div class="col-md-6">
|
||||
<p><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=date" role="button">
|
||||
<img class="opacity" src="'.Utils::get_server_name().'images/date.png" alt="" />
|
||||
<br /><span class="btn btn-warning btn-lg"><span class="glyphicon glyphicon-calendar"></span>
|
||||
<div class="row">
|
||||
<div class="col-md-6 text-center">
|
||||
<p><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=date" class="opacity" role="button">
|
||||
<img class="img-responsive center-block" src="'.Utils::get_server_name().'images/date.png" alt="" />
|
||||
<br /><span class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-calendar"></span>
|
||||
'. _('Schedule an event') . '</span>
|
||||
</a></p>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=autre" role="button">
|
||||
<img alt="" class="opacity" src="'.Utils::get_server_name().'images/classic.png" />
|
||||
<br /><span class="btn btn-primary btn-lg"><span class="glyphicon glyphicon-stats"></span>
|
||||
'. _('Make a poll') . '</span>
|
||||
<div class="col-md-6 text-center">
|
||||
<p><a href="'.Utils::get_server_name().'infos_sondage.php?choix_sondage=autre" class="opacity" role="button">
|
||||
<img alt="" class="img-responsive center-block" src="'.Utils::get_server_name().'images/classic.png" />
|
||||
<br /><span class="btn btn-info btn-lg"><span class="glyphicon glyphicon-stats"></span>
|
||||
'. _('Make a classic poll') . '</span>
|
||||
</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row text-center">
|
||||
<p>'. _("or") .' <a href="' . Utils::getUrlSondage('aqg259dth55iuhwm').'">'. _("view an example") .'</a></p>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<h2>'. _('What is that?') . '</h2>
|
||||
<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>
|
||||
<ol>
|
||||
<li>'. _('Make a poll') . '</li>
|
||||
<li>'. _('Define dates or subjects to choose') . '</li>
|
||||
<li>'. _('Send the poll link to your friends or colleagues') . '</li>
|
||||
<li>'. _('Discuss and make a decision') . '</li>
|
||||
</ol>
|
||||
<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>
|
||||
<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>
|
||||
<ul>
|
||||
<li>Microsoft Internet Explorer 9+</li>
|
||||
<li>Google Chrome 19+</li>
|
||||
<li>Firefox 12+</li>
|
||||
<li>Safari 5+</li>
|
||||
<li>Opera 11+</li>
|
||||
</ul>
|
||||
<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>
|
||||
<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 />
|
||||
<p>'. _('If you want to install the software for your own use and thus increase your independence, we help you on:') .'</p>
|
||||
<p class="text-center"><a href="http://framacloud.org/cultiver-son-jardin/installation-de-framadate/" class="btn btn-success"><span class="glyphicon glyphicon-tree-deciduous"></span> framacloud.org</a></p>
|
||||
</div>
|
||||
</div>'."\n";
|
||||
|
||||
bandeau_pied();
|
||||
|
@ -154,31 +154,31 @@ $errors = array(
|
||||
);
|
||||
|
||||
if (!$_SESSION["titre"] && Utils::issetAndNoEmpty("poursuivre") ) {
|
||||
$errors['title']['aria'] = 'aria-describeby="#poll_title_error" '; $errors['title']['class'] = ' has-error';
|
||||
$errors['title']['aria'] = 'aria-describeby="poll_title_error" '; $errors['title']['class'] = ' has-error';
|
||||
$errors['title']['msg'] = '<div class="alert alert-danger" ><p id="poll_title_error">' . _("Enter a title") . '</p></div>';
|
||||
} elseif ($erreur_injection_titre) {
|
||||
$errors['title']['aria'] = 'aria-describeby="#poll_title_error" '; $errors['title']['class'] = ' has-error';
|
||||
$errors['title']['aria'] = 'aria-describeby="poll_title_error" '; $errors['title']['class'] = ' has-error';
|
||||
$errors['title']['inject'] = '<div class="alert alert-danger"><p id="poll_title_error">' . _("Characters < > and \" are not permitted") . '</p></div>';
|
||||
}
|
||||
|
||||
if ($erreur_injection_commentaires) {
|
||||
$errors['description']['aria'] = 'aria-describeby="#poll_comment_error" '; $errors['description']['class'] = ' has-error';
|
||||
$errors['description']['aria'] = 'aria-describeby="poll_comment_error" '; $errors['description']['class'] = ' has-error';
|
||||
$errors['description']['msg'] = '<div class="alert alert-danger"><p id="poll_comment_error">' . _("Characters < > and \" are not permitted") . '</p></div>';
|
||||
}
|
||||
|
||||
if (!$_SESSION["nom"] && Utils::issetAndNoEmpty("poursuivre")) {
|
||||
$errors['name']['aria'] = 'aria-describeby="#poll_name_error" '; $errors['name']['class'] = ' has-error';
|
||||
$errors['name']['aria'] = 'aria-describeby="poll_name_error" '; $errors['name']['class'] = ' has-error';
|
||||
$errors['name']['msg'] = '<div class="alert alert-danger"><p id="poll_name_error">' . _("Enter a name") . '</p></div>';
|
||||
} elseif ($erreur_injection_nom) {
|
||||
$errors['name']['aria'] = 'aria-describeby="#poll_name_error" '; $errors['name']['class'] = ' has-error';
|
||||
$errors['name']['aria'] = 'aria-describeby="poll_name_error" '; $errors['name']['class'] = ' has-error';
|
||||
$errors['name']['msg'] = '<div class="alert alert-danger"><p id="poll_name_error">' . _("Characters < > and \" are not permitted") . '</p></div>';
|
||||
}
|
||||
|
||||
if (!$_SESSION["adresse"] && Utils::issetAndNoEmpty("poursuivre")) {
|
||||
$errors['email']['aria'] = 'aria-describeby="#poll_name_error" '; $errors['email']['class'] = ' has-error';
|
||||
$errors['email']['aria'] = 'aria-describeby="poll_name_error" '; $errors['email']['class'] = ' has-error';
|
||||
$errors['email']['msg'] = '<div class="alert alert-danger"><p id="poll_email_error">' . _("Enter an email address") . '</p></div>';
|
||||
} elseif ($erreur_adresse && Utils::issetAndNoEmpty("poursuivre")) {
|
||||
$errors['email']['aria'] = 'aria-describeby="#poll_email_error" '; $errors['email']['class'] = ' has-error';
|
||||
$errors['email']['aria'] = 'aria-describeby="poll_email_error" '; $errors['email']['class'] = ' has-error';
|
||||
$errors['email']['msg'] = '<div class="alert alert-danger"><p id="poll_email_error">' . _("The address is not correct! (You should enter a valid email address in order to receive the link to your poll)") . '</p></div>';
|
||||
}
|
||||
|
||||
@ -272,7 +272,7 @@ echo '
|
||||
|
||||
<p class="text-right">
|
||||
<input type="hidden" name="choix_sondage" value="'. $choix_sondage .'"/>
|
||||
<button name="poursuivre" value="'. $choix_sondage .'" type="submit" class="btn btn-success">'. _('Next') . '</button>
|
||||
<button name="poursuivre" value="'. $choix_sondage .'" type="submit" class="btn btn-success" title="'. _('Go to step 2') . '">'. _('Next') . '</button>
|
||||
</p>
|
||||
|
||||
<script type="text/javascript"> document.formulaire.titre.focus(); </script>
|
||||
|
406
js/bootstrap-accessibility.js
vendored
406
js/bootstrap-accessibility.js
vendored
@ -1,406 +0,0 @@
|
||||
/* ========================================================================
|
||||
* Extends Bootstrap v3.1.1
|
||||
|
||||
* Copyright (c) <2014> eBay Software Foundation
|
||||
|
||||
* All rights reserved.
|
||||
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of eBay or any of its subsidiaries or affiliates nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* ======================================================================== */
|
||||
|
||||
(function($) {
|
||||
"use strict";
|
||||
|
||||
var uniqueId = function(prefix) {
|
||||
return (prefix || 'ui-id') + '-' + Math.floor((Math.random()*1000)+1)
|
||||
}
|
||||
|
||||
// Alert Extension
|
||||
// ===============================
|
||||
|
||||
$('.alert').attr('role', 'alert')
|
||||
$('.close').removeAttr('aria-hidden').wrapInner('<span aria-hidden="true"></span>').append('<span class="sr-only">Close</span>')
|
||||
|
||||
// TOOLTIP Extension
|
||||
// ===============================
|
||||
|
||||
var showTooltip = $.fn.tooltip.Constructor.prototype.show
|
||||
, hideTooltip = $.fn.tooltip.Constructor.prototype.hide
|
||||
|
||||
$.fn.tooltip.Constructor.prototype.show = function () {
|
||||
showTooltip.apply(this, arguments)
|
||||
var $tip = this.tip()
|
||||
, tooltipID = $tip.attr('id') || uniqueId('ui-tooltip')
|
||||
$tip.attr({'role':'tooltip','id' : tooltipID})
|
||||
this.$element.attr('aria-describedby', tooltipID)
|
||||
}
|
||||
|
||||
$.fn.tooltip.Constructor.prototype.hide = function () {
|
||||
hideTooltip.apply(this, arguments)
|
||||
removeMultiValAttributes(this.$element, 'aria-describedby', this.tip().attr('id'))
|
||||
return this
|
||||
}
|
||||
|
||||
// Popover Extension
|
||||
// ===============================
|
||||
var showPopover = $.fn.popover.Constructor.prototype.setContent
|
||||
, hideTPopover = $.fn.popover.Constructor.prototype.hide
|
||||
|
||||
$.fn.popover.Constructor.prototype.setContent = function(){
|
||||
showPopover.apply(this, arguments)
|
||||
var $tip = this.tip()
|
||||
, tooltipID = $tip.attr('id') || uniqueId('ui-tooltip')
|
||||
$tip.attr({'role':'alert','id' : tooltipID})
|
||||
this.$element.attr('aria-describedby', tooltipID)
|
||||
this.$element.focus()
|
||||
}
|
||||
$.fn.popover.Constructor.prototype.hide = function(){
|
||||
hideTooltip.apply(this, arguments)
|
||||
removeMultiValAttributes(this.$element, 'aria-describedby', this.tip().attr('id'))
|
||||
}
|
||||
|
||||
//Modal Extension
|
||||
$('.modal-dialog').attr( {'role' : 'document'})
|
||||
var modalhide = $.fn.modal.Constructor.prototype.hide
|
||||
$.fn.modal.Constructor.prototype.hide = function(){
|
||||
var modalOpener = this.$element.parent().find('[data-target="#' + this.$element.attr('id') + '"]')
|
||||
modalhide.apply(this, arguments)
|
||||
modalOpener.focus()
|
||||
}
|
||||
|
||||
// DROPDOWN Extension
|
||||
// ===============================
|
||||
|
||||
var toggle = '[data-toggle=dropdown]'
|
||||
, $par
|
||||
, firstItem
|
||||
, focusDelay = 200
|
||||
, menus = $(toggle).parent().find('ul').attr('role','menu')
|
||||
, lis = menus.find('li').attr('role','presentation')
|
||||
|
||||
lis.find('a').attr({'role':'menuitem', 'tabIndex':'-1'})
|
||||
$(toggle).attr({ 'aria-haspopup':'true', 'aria-expanded': 'false'})
|
||||
|
||||
$(toggle).parent().on('shown.bs.dropdown',function(e){
|
||||
$par = $(this)
|
||||
var $toggle = $par.find(toggle)
|
||||
$toggle.attr('aria-expanded','true')
|
||||
|
||||
setTimeout(function(){
|
||||
firstItem = $('.dropdown-menu [role=menuitem]:visible', $par)[0]
|
||||
try{ firstItem.focus()} catch(ex) {}
|
||||
}, focusDelay)
|
||||
})
|
||||
|
||||
$(toggle).parent().on('hidden.bs.dropdown',function(e){
|
||||
$par = $(this)
|
||||
var $toggle = $par.find(toggle)
|
||||
$toggle.attr('aria-expanded','false')
|
||||
})
|
||||
|
||||
//Adding Space Key Behaviour, opens on spacebar
|
||||
$.fn.dropdown.Constructor.prototype.keydown = function (e) {
|
||||
var $par
|
||||
, firstItem
|
||||
if (!/(32)/.test(e.keyCode)) return
|
||||
$par = $(this).parent()
|
||||
$(this).trigger ("click")
|
||||
e.preventDefault() && e.stopPropagation()
|
||||
}
|
||||
|
||||
$(document)
|
||||
.on('focusout.dropdown.data-api', '.dropdown-menu', function(e){
|
||||
var $this = $(this)
|
||||
, that = this
|
||||
setTimeout(function() {
|
||||
if(!$.contains(that, document.activeElement)){
|
||||
$this.parent().removeClass('open')
|
||||
$this.parent().find('[data-toggle=dropdown]').attr('aria-expanded','false')
|
||||
}
|
||||
}, 150)
|
||||
})
|
||||
.on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , $.fn.dropdown.Constructor.prototype.keydown)
|
||||
|
||||
|
||||
// Tab Extension
|
||||
// ===============================
|
||||
|
||||
var $tablist = $('.nav-tabs')
|
||||
, $lis = $tablist.children('li')
|
||||
, $tabs = $tablist.find('[data-toggle="tab"], [data-toggle="pill"]')
|
||||
|
||||
$tablist.attr('role', 'tablist')
|
||||
$lis.attr('role', 'presentation')
|
||||
$tabs.attr('role', 'tab')
|
||||
|
||||
$tabs.each(function( index ) {
|
||||
var tabpanel = $($(this).attr('href'))
|
||||
, tab = $(this)
|
||||
, tabid = tab.attr('id') || uniqueId('ui-tab')
|
||||
|
||||
tab.attr('id', tabid)
|
||||
|
||||
if(tab.parent().hasClass('active')){
|
||||
tab.attr( { 'tabIndex' : '0', 'aria-selected' : 'true', 'aria-controls': tab.attr('href').substr(1) } )
|
||||
tabpanel.attr({ 'role' : 'tabpanel', 'tabIndex' : '0', 'aria-hidden' : 'false', 'aria-labelledby':tabid })
|
||||
}else{
|
||||
tab.attr( { 'tabIndex' : '-1', 'aria-selected' : 'false', 'aria-controls': tab.attr('href').substr(1) } )
|
||||
tabpanel.attr( { 'role' : 'tabpanel', 'tabIndex' : '-1', 'aria-hidden' : 'true', 'aria-labelledby':tabid } )
|
||||
}
|
||||
})
|
||||
|
||||
$.fn.tab.Constructor.prototype.keydown = function (e) {
|
||||
var $this = $(this)
|
||||
, $items
|
||||
, $ul = $this.closest('ul[role=tablist] ')
|
||||
, index
|
||||
, k = e.which || e.keyCode
|
||||
|
||||
$this = $(this)
|
||||
if (!/(37|38|39|40)/.test(k)) return
|
||||
|
||||
$items = $ul.find('[role=tab]:visible')
|
||||
index = $items.index($items.filter(':focus'))
|
||||
|
||||
if (k == 38 || k == 37) index-- // up & left
|
||||
if (k == 39 || k == 40) index++ // down & right
|
||||
|
||||
|
||||
if(index < 0) index = $items.length -1
|
||||
if(index == $items.length) index = 0
|
||||
|
||||
var nextTab = $items.eq(index)
|
||||
if(nextTab.attr('role') ==='tab'){
|
||||
|
||||
nextTab.tab('show') //Comment this line for dynamically loaded tabPabels, to save Ajax requests on arrow key navigation
|
||||
.focus()
|
||||
}
|
||||
// nextTab.focus()
|
||||
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
}
|
||||
|
||||
$(document).on('keydown.tab.data-api','[data-toggle="tab"], [data-toggle="pill"]' , $.fn.tab.Constructor.prototype.keydown)
|
||||
|
||||
var tabactivate = $.fn.tab.Constructor.prototype.activate;
|
||||
$.fn.tab.Constructor.prototype.activate = function (element, container, callback) {
|
||||
var $active = container.find('> .active')
|
||||
$active.find('[data-toggle=tab]').attr({ 'tabIndex' : '-1','aria-selected' : false })
|
||||
$active.filter('.tab-pane').attr({ 'aria-hidden' : true,'tabIndex' : '-1' })
|
||||
|
||||
tabactivate.apply(this, arguments)
|
||||
|
||||
element.addClass('active')
|
||||
element.find('[data-toggle=tab]').attr({ 'tabIndex' : '0','aria-selected' : true })
|
||||
element.filter('.tab-pane').attr({ 'aria-hidden' : false,'tabIndex' : '0' })
|
||||
}
|
||||
|
||||
|
||||
// Collapse Extension
|
||||
// ===============================
|
||||
|
||||
var $colltabs = $('[data-toggle="collapse"]')
|
||||
$colltabs.attr({ 'role':'tab', 'aria-selected':'false', 'aria-expanded':'false' })
|
||||
$colltabs.each(function( index ) {
|
||||
var colltab = $(this)
|
||||
, collpanel = (colltab.attr('data-target')) ? $(colltab.attr('data-target')) : $(colltab.attr('href'))
|
||||
, parent = colltab.attr('data-parent')
|
||||
, collparent = parent && $(parent)
|
||||
, collid = colltab.attr('id') || uniqueId('ui-collapse')
|
||||
|
||||
$(collparent).find('div:not(.collapse,.panel-body), h4').attr('role','presentation')
|
||||
|
||||
colltab.attr('id', collid)
|
||||
if(collparent){
|
||||
collparent.attr({ 'role' : 'tablist', 'aria-multiselectable' : 'true' })
|
||||
if(collpanel.hasClass('in')){
|
||||
colltab.attr({ 'aria-controls': colltab.attr('href').substr(1), 'aria-selected':'true', 'aria-expanded':'true', 'tabindex':'0' })
|
||||
collpanel.attr({ 'role':'tabpanel', 'tabindex':'0', 'aria-labelledby':collid, 'aria-hidden':'false' })
|
||||
}else{
|
||||
colltab.attr({'aria-controls' : colltab.attr('href').substr(1), 'tabindex':'-1' })
|
||||
collpanel.attr({ 'role':'tabpanel', 'tabindex':'-1', 'aria-labelledby':collid, 'aria-hidden':'true' })
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
var collToggle = $.fn.collapse.Constructor.prototype.toggle
|
||||
$.fn.collapse.Constructor.prototype.toggle = function(){
|
||||
var prevTab = this.$parent && this.$parent.find('[aria-expanded="true"]') , href
|
||||
|
||||
if(prevTab){
|
||||
var prevPanel = prevTab.attr('data-target') || (href = prevTab.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')
|
||||
, $prevPanel = $(prevPanel)
|
||||
, $curPanel = this.$element
|
||||
, par = this.$parent
|
||||
, curTab
|
||||
|
||||
if (this.$parent) curTab = this.$parent.find('[data-toggle=collapse][href="#' + this.$element.attr('id') + '"]')
|
||||
|
||||
collToggle.apply(this, arguments)
|
||||
|
||||
if ($.support.transition) {
|
||||
this.$element.one($.support.transition.end, function(){
|
||||
|
||||
prevTab.attr({ 'aria-selected':'false','aria-expanded':'false', 'tabIndex':'-1' })
|
||||
$prevPanel.attr({ 'aria-hidden' : 'true','tabIndex' : '-1'})
|
||||
|
||||
curTab.attr({ 'aria-selected':'true','aria-expanded':'true', 'tabIndex':'0' })
|
||||
|
||||
if($curPanel.hasClass('in')){
|
||||
$curPanel.attr({ 'aria-hidden' : 'false','tabIndex' : '0' })
|
||||
}else{
|
||||
curTab.attr({ 'aria-selected':'false','aria-expanded':'false'})
|
||||
$curPanel.attr({ 'aria-hidden' : 'true','tabIndex' : '-1' })
|
||||
}
|
||||
})
|
||||
}
|
||||
}else{
|
||||
collToggle.apply(this, arguments)
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.collapse.Constructor.prototype.keydown = function (e) {
|
||||
var $this = $(this)
|
||||
, $items
|
||||
, $tablist = $this.closest('div[role=tablist] ')
|
||||
, index
|
||||
, k = e.which || e.keyCode
|
||||
|
||||
$this = $(this)
|
||||
if (!/(32|37|38|39|40)/.test(k)) return
|
||||
if(k==32) $this.click()
|
||||
|
||||
$items = $tablist.find('[role=tab]')
|
||||
index = $items.index($items.filter(':focus'))
|
||||
|
||||
if (k == 38 || k == 37) index-- // up & left
|
||||
if (k == 39 || k == 40) index++ // down & right
|
||||
if(index < 0) index = $items.length -1
|
||||
if(index == $items.length) index = 0
|
||||
|
||||
$items.eq(index).focus()
|
||||
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
|
||||
}
|
||||
|
||||
$(document).on('keydown.collapse.data-api','[data-toggle="collapse"]' , $.fn.collapse.Constructor.prototype.keydown)
|
||||
|
||||
// Carousel Extension
|
||||
// ===============================
|
||||
|
||||
$('.carousel').each(function (index) {
|
||||
var $this = $(this)
|
||||
, prev = $this.find('[data-slide="prev"]')
|
||||
, next = $this.find('[data-slide="next"]')
|
||||
, $options = $this.find('.item')
|
||||
, $listbox = $options.parent()
|
||||
|
||||
$this.attr( { 'data-interval' : 'false', 'data-wrap' : 'false' } )
|
||||
$listbox.attr('role', 'listbox')
|
||||
$options.attr('role', 'option')
|
||||
|
||||
var spanPrev = document.createElement('span')
|
||||
spanPrev.setAttribute('class', 'sr-only')
|
||||
spanPrev.innerHTML='Previous'
|
||||
|
||||
var spanNext = document.createElement('span')
|
||||
spanNext.setAttribute('class', 'sr-only')
|
||||
spanNext.innerHTML='Next'
|
||||
|
||||
prev.attr('role', 'button')
|
||||
next.attr('role', 'button')
|
||||
|
||||
prev.append(spanPrev)
|
||||
next.append(spanNext)
|
||||
|
||||
$options.each(function () {
|
||||
var item = $(this)
|
||||
if(item.hasClass('active')){
|
||||
item.attr({ 'aria-selected': 'true', 'tabindex' : '0' })
|
||||
}else{
|
||||
item.attr({ 'aria-selected': 'false', 'tabindex' : '-1' })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
var slideCarousel = $.fn.carousel.Constructor.prototype.slide
|
||||
$.fn.carousel.Constructor.prototype.slide = function (type, next) {
|
||||
var $active = this.$element.find('.item.active')
|
||||
, $next = next || $active[type]()
|
||||
|
||||
slideCarousel.apply(this, arguments)
|
||||
|
||||
$active
|
||||
.one($.support.transition.end, function () {
|
||||
$active.attr({'aria-selected':false, 'tabIndex': '-1'})
|
||||
$next.attr({'aria-selected':true, 'tabIndex': '0'})
|
||||
//.focus()
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.carousel.Constructor.prototype.keydown = function (e) {
|
||||
var $this = $(this)
|
||||
, $ul = $this.closest('div[role=listbox]')
|
||||
, $items = $ul.find('[role=option]')
|
||||
, $parent = $ul.parent()
|
||||
, k = e.which || e.keyCode
|
||||
, index
|
||||
, i
|
||||
|
||||
if (!/(37|38|39|40)/.test(k)) return
|
||||
|
||||
index = $items.index($items.filter('.active'))
|
||||
if (k == 37 || k == 38) { // Up
|
||||
$parent.carousel('prev')
|
||||
index--
|
||||
if(index < 0) index = $items.length -1
|
||||
else $this.prev().focus()
|
||||
|
||||
}
|
||||
if (k == 39 || k == 40) { // Down
|
||||
$parent.carousel('next')
|
||||
index++
|
||||
if(index == $items.length) index = 0
|
||||
else {
|
||||
$this.one($.support.transition.end, function () {
|
||||
$this.next().focus()
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
}
|
||||
$(document).on('keydown.carousel.data-api', 'div[role=option]', $.fn.carousel.Constructor.prototype.keydown)
|
||||
|
||||
// GENERAL UTILITY FUNCTIONS
|
||||
// ===============================
|
||||
|
||||
var removeMultiValAttributes = function (el, attr, val) {
|
||||
var describedby = (el.attr( attr ) || "").split( /\s+/ )
|
||||
, index = $.inArray(val, describedby)
|
||||
if ( index !== -1 ) {
|
||||
describedby.splice( index, 1 )
|
||||
}
|
||||
describedby = $.trim( describedby.join( " " ) )
|
||||
if (describedby ) {
|
||||
el.attr( attr, describedby )
|
||||
} else {
|
||||
el.removeAttr( attr )
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})(jQuery);
|
4
js/bootstrap-accessibility.min.js
vendored
4
js/bootstrap-accessibility.min.js
vendored
File diff suppressed because one or more lines are too long
2
js/bootstrap-datepicker.js
vendored
2
js/bootstrap-datepicker.js
vendored
@ -310,7 +310,9 @@
|
||||
this._events = [
|
||||
// For components that are not readonly, allow keyboard nav
|
||||
[this.element.find('input'), {
|
||||
// <framadate>
|
||||
//focus: $.proxy(this.show, this),
|
||||
// </framadate>
|
||||
keyup: $.proxy(function(e){
|
||||
if ($.inArray(e.keyCode, [27,37,39,38,40,32,13,9]) === -1)
|
||||
this.update();
|
||||
|
162
js/core.js
162
js/core.js
@ -2,14 +2,56 @@ $(document).ready(function() {
|
||||
var lang = $('html').attr('lang');
|
||||
|
||||
// Datepicker
|
||||
var framadatepicker = function() {
|
||||
$('.input-group.date').datepicker({
|
||||
format: "dd/mm/yyyy",
|
||||
todayBtn: "linked",
|
||||
orientation: "top left",
|
||||
autoclose: true,
|
||||
language: lang
|
||||
language: lang,
|
||||
todayHighlight: true,
|
||||
beforeShowDay: function (date){
|
||||
var $selected_days = new Array();
|
||||
$('#selected-days input[id^="day"]').each(function() {
|
||||
if($(this).val()!='') {
|
||||
$selected_days.push($(this).val());
|
||||
}
|
||||
});
|
||||
for(i = 0; i < $selected_days.length; i++){
|
||||
var $selected_date = $selected_days[i].split('/');
|
||||
|
||||
if (date.getFullYear() == $selected_date[2] && (date.getMonth()+1) == $selected_date[1] && date.getDate() == $selected_date[0]){
|
||||
return {
|
||||
classes: 'disabled selected'
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
var datepickerfocus = false; // a11y : datepicker not display on focus until there is one click on the button
|
||||
|
||||
$(document).on('click','.input-group.date .input-group-addon', function() {
|
||||
datepickerfocus = true;
|
||||
// Re-init datepicker config before displaying
|
||||
$(this).parent().datepicker(framadatepicker());
|
||||
$(this).parent().datepicker('show');
|
||||
|
||||
// Trick to refresh calendar
|
||||
$('.datepicker-days .prev').trigger('click');
|
||||
$('.datepicker-days .next').trigger('click');
|
||||
// .active must be clicable in order to unfill the form
|
||||
$('.datepicker-days .active').removeClass('disabled');
|
||||
});
|
||||
|
||||
$(document).on('focus','.input-group.date input', function() {
|
||||
if(datepickerfocus) {
|
||||
$(this).parent('.input-group.date').datepicker(framadatepicker());
|
||||
$(this).parent('.input-group.date').datepicker('show');
|
||||
}
|
||||
});
|
||||
/**
|
||||
* choix_date.php
|
||||
**/
|
||||
@ -95,6 +137,7 @@ $(document).ready(function() {
|
||||
$(this).addClass('disabled');
|
||||
}
|
||||
};
|
||||
SubmitDaysAvalaible();
|
||||
});
|
||||
|
||||
// Button "Add a day"
|
||||
@ -116,28 +159,17 @@ $(document).ready(function() {
|
||||
last_day.after('<fieldset>'+new_day_html+'</fieldset>');
|
||||
$('#day'+(nb_days)).focus();
|
||||
$('#remove-a-day, #copyhours').removeClass('disabled');
|
||||
|
||||
// Repeat datepicker init (junk code but it works for added days)
|
||||
$('.input-group.date').datepicker({
|
||||
format: "dd/mm/yyyy",
|
||||
todayBtn: "linked",
|
||||
orientation: "top left",
|
||||
autoclose: true,
|
||||
language: lang
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Button "Remove a day"
|
||||
$('#remove-a-day').on('click', function() {
|
||||
var nb_days = $('#selected-days fieldset').length;
|
||||
|
||||
$('#selected-days fieldset:last').remove();
|
||||
var nb_days = $('#selected-days fieldset').length;
|
||||
$('#day'+(nb_days-1)).focus();
|
||||
if ( nb_days == 1) {
|
||||
$('#remove-a-day, #copyhours').addClass('disabled');
|
||||
};
|
||||
|
||||
SubmitDaysAvalaible();
|
||||
});
|
||||
|
||||
// Title update on hours and buttons -/+ hours
|
||||
@ -180,8 +212,8 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('change','.hours, #selected-days fieldset legend input', function() {
|
||||
SubmitDaysAvalaible()
|
||||
$(document).on('keyup, change','.hours, #selected-days fieldset legend input', function() {
|
||||
SubmitDaysAvalaible();
|
||||
});
|
||||
SubmitDaysAvalaible();
|
||||
|
||||
@ -220,14 +252,13 @@ $(document).ready(function() {
|
||||
|
||||
// Button "Remove a choice"
|
||||
$('#remove-a-choice').on('click', function() {
|
||||
var nb_choices = $('.choice-field').length;
|
||||
|
||||
$('.choice-field:last').remove();
|
||||
$('#choice'+(nb_choices-2)).focus();
|
||||
if (nb_choices == 3) {
|
||||
$('#remove-a-choice, button[name="fin_sondage_autre"]').addClass('disabled');
|
||||
var nb_choices = $('.choice-field').length;
|
||||
$('#choice'+(nb_choices-1)).focus();
|
||||
if (nb_choices == 2) {
|
||||
$('#remove-a-choice').addClass('disabled');
|
||||
};
|
||||
|
||||
SubmitChoicesAvalaible();
|
||||
});
|
||||
|
||||
// 2 choices filled and you can submit
|
||||
@ -245,11 +276,31 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('change','.choice-field input', function() {
|
||||
SubmitChoicesAvalaible()
|
||||
$(document).on('keyup, change','.choice-field input', function() {
|
||||
SubmitChoicesAvalaible();
|
||||
});
|
||||
SubmitChoicesAvalaible();
|
||||
|
||||
$(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-imgModal .btn-primary').on('click', function() {
|
||||
if($('#md-img').val()!='' && $('#md-a').val()!='') {
|
||||
$('#'+$(this).val()).val('[!['+$('#md-text').val()+']('+$('#md-img').val()+')]('+$('#md-a').val()+')');
|
||||
} else if ($('#md-img').val()!='') {
|
||||
$('#'+$(this).val()).val('!['+$('#md-text').val()+']('+$('#md-img').val()+')');
|
||||
} else if ($('#md-a').val()!='') {
|
||||
$('#'+$(this).val()).val('['+$('#md-text').val()+']('+$('#md-a').val()+')');
|
||||
} else {
|
||||
$('#'+$(this).val()).val($('#md-text').val());
|
||||
}
|
||||
$('#md-a-imgModal').modal('hide');
|
||||
$('#md-img').val(''); $('#md-a').val('');$('#md-text').val('');
|
||||
});
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* adminstuds.php
|
||||
**/
|
||||
@ -296,4 +347,67 @@ $(document).ready(function() {
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#poll-rules-form .btn-edit').on('click', function() {
|
||||
$('#poll-rules-form p').hide();
|
||||
$('#poll-rules-form .js-poll-rules').removeClass("hidden");
|
||||
$('.js-poll-rules select').focus();
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#poll-rules-form .btn-cancel').on('click', function() {
|
||||
$('#poll-rules-form p').show();
|
||||
$('#poll-rules-form .js-poll-rules').addClass("hidden");
|
||||
$('.js-poll-rules .btn-edit').focus();
|
||||
return false;
|
||||
});
|
||||
|
||||
// Horizontal scroll buttons
|
||||
if($('.results').width() > $('.container').width()) {
|
||||
$('.scroll-buttons').removeClass('hidden');
|
||||
}
|
||||
|
||||
var $scroll_page = 1;
|
||||
var $scroll_scale = $('#tableContainer').width()*2/3;
|
||||
|
||||
$('.scroll-left').addClass('disabled');
|
||||
|
||||
$('.scroll-left').click(function(){
|
||||
$('.scroll-right').removeClass('disabled');
|
||||
$( "#tableContainer" ).animate({
|
||||
scrollLeft: $scroll_scale*($scroll_page-1)
|
||||
}, 1000);
|
||||
if($scroll_page == 1) {
|
||||
$(this).addClass('disabled');
|
||||
} else {
|
||||
$scroll_page = $scroll_page-1;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('.scroll-right').click(function(){
|
||||
$('.scroll-left').removeClass('disabled');
|
||||
$( "#tableContainer" ).animate({
|
||||
scrollLeft: $scroll_scale*($scroll_page)
|
||||
}, 1000);
|
||||
|
||||
if($scroll_scale*($scroll_page+1) > $( ".results" ).width()) {
|
||||
$(this).addClass('disabled');
|
||||
} else {
|
||||
$scroll_page++;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// Vote form moving to the top or to the bottom
|
||||
$(window).scroll(function() {
|
||||
var $table_offset = $('.results thead').offset();
|
||||
if($table_offset != undefined && $(window).scrollTop() < $table_offset.top) {
|
||||
$('.results tbody').prepend($('#vote-form'));
|
||||
$('#tableContainer').before($('.scroll-buttons'));
|
||||
} else {
|
||||
$('#addition').before($('#vote-form'));
|
||||
$('#tableContainer').after($('.scroll-buttons'));
|
||||
}
|
||||
|
||||
});
|
||||
|
Binary file not shown.
@ -21,6 +21,9 @@ msgstr ""
|
||||
msgid "Make your polls"
|
||||
msgstr "Organiser des rendez-vous simplement, librement."
|
||||
|
||||
msgid "Home"
|
||||
msgstr "Accueil"
|
||||
|
||||
msgid "Poll"
|
||||
msgstr "Sondage"
|
||||
|
||||
@ -45,6 +48,12 @@ msgstr "Modifier"
|
||||
msgid "Next"
|
||||
msgstr "Continuer"
|
||||
|
||||
msgid "Back"
|
||||
msgstr "Précédent"
|
||||
|
||||
msgid "Close"
|
||||
msgstr "Fermer"
|
||||
|
||||
msgid "Your name"
|
||||
msgstr "Votre nom"
|
||||
|
||||
@ -55,7 +64,7 @@ msgid "Description"
|
||||
msgstr "Description"
|
||||
|
||||
msgid "Back to the homepage of "
|
||||
msgstr "Retournez à la page d'accueil de"
|
||||
msgstr "Retourner à la page d'accueil de"
|
||||
|
||||
msgid "Error!"
|
||||
msgstr "Erreur !"
|
||||
@ -79,30 +88,80 @@ msgstr "Changer la langue"
|
||||
msgid "Select the language"
|
||||
msgstr "Choisir la langue"
|
||||
|
||||
########### Footer ###########
|
||||
msgid "Home"
|
||||
msgstr "Accueil"
|
||||
|
||||
msgid "About"
|
||||
msgstr "Informations générales"
|
||||
|
||||
msgid "Contact"
|
||||
msgstr "Contact"
|
||||
|
||||
############ Homepage ############
|
||||
msgid "Schedule an event"
|
||||
msgstr "Créer un sondage spécial dates"
|
||||
|
||||
msgid "Make a poll"
|
||||
msgid "Make a classic poll"
|
||||
msgstr "Créer un sondage classique"
|
||||
|
||||
msgid "or"
|
||||
msgstr "ou"
|
||||
# 1st section
|
||||
msgid "What is that?"
|
||||
msgstr "Prise en main"
|
||||
|
||||
msgid "view an example"
|
||||
msgstr "voir un exemple"
|
||||
msgid "Framadate is an online service for planning an appointment or make a decision quickly and easily. No registration is required."
|
||||
msgstr "Framadate est un service en ligne permettant de planifier un rendez-vous ou prendre des décisions rapidement et simplement. Aucune inscription préalable n’est nécessaire."
|
||||
|
||||
msgid "Here is how it works:"
|
||||
msgstr "Voici comment ça fonctionne :"
|
||||
|
||||
msgid "Make a poll"
|
||||
msgstr "Créez un sondage"
|
||||
|
||||
msgid "Define dates or subjects to choose"
|
||||
msgstr "Déterminez les dates ou les sujets à choisir"
|
||||
|
||||
msgid "Send the poll link to your friends or colleagues"
|
||||
msgstr "Envoyez le lien du sondage à vos amis ou collègues"
|
||||
|
||||
msgid "Discuss and make a decision"
|
||||
msgstr "Discutez et prennez votre décision"
|
||||
|
||||
msgid "Do you want to "
|
||||
msgstr "Voulez-vous "
|
||||
|
||||
msgid "view an example?"
|
||||
msgstr "voir un exemple ?"
|
||||
|
||||
# 2nd section
|
||||
msgid "The software"
|
||||
msgstr "Le logiciel"
|
||||
|
||||
msgid "Framadate was initially based on "
|
||||
msgstr "Framadate est initialement basé sur "
|
||||
|
||||
msgid " a software developed by the University of Strasbourg. Today, it is devevoped by the association Framasoft"
|
||||
msgstr " un logiciel développé par l'Université de Strasbourg. Aujourd'hui, son développement est assuré par l’association Framasoft"
|
||||
|
||||
msgid "This software needs javascript and cookies enabled. It is compatible with the following web browsers:"
|
||||
msgstr "Ce logiciel requiert l’activation du javascript et des cookies. Il est compatible avec les navigateurs web suivant :"
|
||||
|
||||
msgid "It is governed by the "
|
||||
msgstr "Il est régi par la "
|
||||
|
||||
msgid "CeCILL-B license"
|
||||
msgstr "licence CeCILL-B"
|
||||
|
||||
# 3rd section
|
||||
msgid "Cultivate your garden"
|
||||
msgstr "Cultivez votre jardin"
|
||||
|
||||
msgid "To participate in the software development, suggest improvements or simply download it, please visit "
|
||||
msgstr "Pour participer au développement du logiciel, proposer des améliorations ou simplement le télécharger, rendez-vous sur "
|
||||
|
||||
msgid "the development site"
|
||||
msgstr "le site de développement"
|
||||
|
||||
msgid "If you want to install the software for your own use and thus increase your independence, we help you on:"
|
||||
msgstr "Si vous souhaitez installer ce logiciel pour votre propre usage et ainsi gagner en autonomie, nous vous aidons sur :"
|
||||
|
||||
############## Poll ##############
|
||||
msgid "Poll administration"
|
||||
msgstr "Administration du sondage"
|
||||
|
||||
msgid "Legend:"
|
||||
msgstr "Légende :"
|
||||
|
||||
# Jumbotron adminstuds.php (+ studs.php)
|
||||
msgid "Back to the poll"
|
||||
msgstr "Retour au sondage"
|
||||
@ -158,6 +217,27 @@ msgstr "Lien public du sondage"
|
||||
msgid "Admin link of the pool"
|
||||
msgstr "Lien d'administration du sondage"
|
||||
|
||||
msgid "Poll rules"
|
||||
msgstr "Permissions du sondage"
|
||||
|
||||
msgid "Edit the poll rules"
|
||||
msgstr "Modifier les permissions du sondage"
|
||||
|
||||
msgid "Votes and comments are locked"
|
||||
msgstr "Les votes et commentaires sont verrouillés"
|
||||
|
||||
msgid "Votes and comments are open"
|
||||
msgstr "Les votes et commentaires sont ouverts"
|
||||
|
||||
msgid "Votes are editable"
|
||||
msgstr "Les votes sont modifiables"
|
||||
|
||||
msgid "Save the new rules"
|
||||
msgstr "Enregistrer les nouvelles permissions"
|
||||
|
||||
msgid "Cancel the rules edit"
|
||||
msgstr "Annuler le changement de permissions"
|
||||
|
||||
# Help text adminstuds.php
|
||||
msgid "As poll administrator, you can change all the lines of this poll with this button "
|
||||
msgstr "En tant qu'administrateur, vous pouvez modifier toutes les lignes de ce sondage avec ce bouton "
|
||||
@ -176,6 +256,9 @@ msgid "If you want to vote in this poll, you have to give your name, choose the
|
||||
msgstr "Pour participer à ce sondage, veuillez entrer votre nom, choisir toutes les valeurs qui vous conviennent et valider votre choix avec le bouton en bout de ligne."
|
||||
|
||||
# Poll results
|
||||
msgid "Votes of the poll "
|
||||
msgstr "Votes du sondage "
|
||||
|
||||
msgid "Remove the column"
|
||||
msgstr "Effacer la colonne"
|
||||
|
||||
@ -233,6 +316,15 @@ msgstr "votes"
|
||||
msgid "for"
|
||||
msgstr "à"
|
||||
|
||||
msgid "Remove all the votes"
|
||||
msgstr "Supprimer tous les votes"
|
||||
|
||||
msgid "Scroll to the left"
|
||||
msgstr "Faire défiler à gauche"
|
||||
|
||||
msgid "Scroll to the right"
|
||||
msgstr "Faire défiler à droite"
|
||||
|
||||
# Comments
|
||||
msgid "Comments of polled people"
|
||||
msgstr "Commentaires de sondés"
|
||||
@ -252,6 +344,9 @@ msgstr "Envoyer le commentaire"
|
||||
msgid "anonyme"
|
||||
msgstr "anonyme"
|
||||
|
||||
msgid "Remove all the comments"
|
||||
msgstr "Supprimer tous les commentaires"
|
||||
|
||||
# Add a colum adminstuds.php
|
||||
msgid "Column's adding"
|
||||
msgstr "Ajout de colonne"
|
||||
@ -320,6 +415,9 @@ msgstr "Vous souhaitez que les sondés puissent modifier leur ligne eux-mêmes."
|
||||
msgid "To receive an email for each new vote."
|
||||
msgstr "Vous souhaitez recevoir un mail à chaque participation d'un sondé."
|
||||
|
||||
msgid "Go to step 2"
|
||||
msgstr "Aller à l'étape 2"
|
||||
|
||||
# Errors info_sondage.php
|
||||
msgid "Enter a title"
|
||||
msgstr "Il faut saisir un titre !"
|
||||
@ -337,6 +435,9 @@ msgstr "L'adresse saisie n'est pas correcte ! (Il faut une adresse valide pour r
|
||||
msgid "You haven't filled the first section of the poll creation."
|
||||
msgstr "Vous n'avez pas renseigné la première page du sondage"
|
||||
|
||||
msgid "Back to step 1"
|
||||
msgstr "Revenir à l’étape 1"
|
||||
|
||||
########### Step 2 ###########
|
||||
# Step 2 choix_date.php
|
||||
msgid "Poll dates (2 on 3)"
|
||||
@ -391,15 +492,42 @@ msgstr "Pour créer un sondage classique, vous devez proposer au moins deux choi
|
||||
msgid "You can add or remove additional choices with the buttons"
|
||||
msgstr "Vous pouvez ajouter ou supprimer des choix supplémentaires avec les boutons"
|
||||
|
||||
msgid "It's possible to propose links or images by using "
|
||||
msgstr "Il est possible d’insérer des liens ou des images en utilisant "
|
||||
|
||||
msgid "the Markdown syntax"
|
||||
msgstr "la syntaxe Markdown"
|
||||
|
||||
msgid "Choice"
|
||||
msgstr "Choix"
|
||||
|
||||
msgid "Add a link or an image"
|
||||
msgstr "Ajouter un lien ou une image"
|
||||
|
||||
msgid "These fields are optional. You can add a link, an image or both."
|
||||
msgstr "Ces champs sont optionnels. Vous pouvez ajouter un lien, une image ou les deux."
|
||||
|
||||
msgid "URL of the image"
|
||||
msgstr "URL de l'image"
|
||||
|
||||
msgid "Link"
|
||||
msgstr "Lien"
|
||||
|
||||
msgid "Alternative text"
|
||||
msgstr "Texte alternatif"
|
||||
|
||||
msgid "Remove a choice"
|
||||
msgstr "Supprimer un choix"
|
||||
|
||||
msgid "Add a choice"
|
||||
msgstr "Ajouter un choix"
|
||||
|
||||
msgid "Back to step 2"
|
||||
msgstr "Revenir à l’étape 2"
|
||||
|
||||
msgid "Go to step 3"
|
||||
msgstr "Aller à l’étape 3"
|
||||
|
||||
########### Step 3 ###########
|
||||
msgid "Removal date and confirmation (3 on 3)"
|
||||
msgstr "Date d'expiration et confirmation (3 sur 3)"
|
||||
@ -407,6 +535,9 @@ msgstr "Date d'expiration et confirmation (3 sur 3)"
|
||||
msgid "Confirm the creation of your poll"
|
||||
msgstr "Confirmez la création de votre sondage"
|
||||
|
||||
msgid "List of your choices"
|
||||
msgstr "Liste de vos choix"
|
||||
|
||||
msgid "Once you have confirmed the creation of your poll, you will be automatically redirected on the administration page of your poll."
|
||||
msgstr "Une fois que vous aurez confirmé la création du sondage, vous serez redirigé automatiquement vers la page d'administration de votre sondage."
|
||||
|
||||
@ -417,15 +548,15 @@ msgid "Create the poll"
|
||||
msgstr "Créer le sondage"
|
||||
|
||||
# Step 3 choix_date.php
|
||||
msgid "Your poll will expire automatically 2 days after the last date of your poll."
|
||||
msgstr "Votre sondage sera automatiquement effacé après la date la plus tardive."
|
||||
msgid "Your poll will be automatically removed 6 months after the last date of your poll:"
|
||||
msgstr "Votre sondage sera automatiquement effacé 6 mois après la date la plus tardive :"
|
||||
|
||||
msgid "Removal date:"
|
||||
msgstr "Date de suppression :"
|
||||
|
||||
# Step 3 choix_autre.php
|
||||
msgid "Your poll will be automatically removed after 6 months."
|
||||
msgstr "Votre sondage sera automatiquement effacé dans 6 mois."
|
||||
msgid "Your poll will be automatically removed after 6 months:"
|
||||
msgstr "Votre sondage sera automatiquement effacé dans 6 mois :"
|
||||
|
||||
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."
|
||||
@ -433,29 +564,6 @@ msgstr "Néanmoins vous pouvez décider ci-dessous d'une date plus rapprochée p
|
||||
msgid "Removal date (optional)"
|
||||
msgstr "Date de fin (facultative)"
|
||||
|
||||
########### Contact #########
|
||||
msgid "Contact us"
|
||||
msgstr "Nous contacter"
|
||||
|
||||
msgid "If you have questions, you can send a message here."
|
||||
msgstr "Pour toutes questions ou suggestions vous pouvez laisser un message via ce formulaire."
|
||||
|
||||
msgid "Question"
|
||||
msgstr "Question"
|
||||
|
||||
msgid "Send your question"
|
||||
msgstr "Envoyer votre question"
|
||||
|
||||
msgid "Your message has been sent!"
|
||||
msgstr "Votre message a bien été envoyé !"
|
||||
|
||||
# Errors contact.php
|
||||
msgid "The address is not correct!"
|
||||
msgstr "L'adresse saisie n'est pas correcte !"
|
||||
|
||||
msgid "You must ask a question!"
|
||||
msgstr "Vous devez poser au moins une question !"
|
||||
|
||||
############# Admin #############
|
||||
msgid "Polls administrator"
|
||||
msgstr "Administrateur de la base"
|
||||
@ -512,57 +620,28 @@ msgstr ""
|
||||
msgid "Thanks for your confidence."
|
||||
msgstr "Merci de votre confiance."
|
||||
|
||||
msgid "\n"
|
||||
"--\n\n"
|
||||
"« La route est longue, mais la voie est libre… »\n"
|
||||
"Framasoft ne vit que par vos dons (déductibles des impôts).\n"
|
||||
"Merci d'avance pour votre soutien http://soutenir.framasoft.org."
|
||||
msgstr "\n"
|
||||
"--\n\n"
|
||||
"« La route est longue, mais la voie est libre… »\n"
|
||||
"Framasoft ne vit que par vos dons (déductibles des impôts).\n"
|
||||
"Merci d'avance pour votre soutien http://soutenir.framasoft.org."
|
||||
|
||||
# Mails adminstuds.php
|
||||
msgid "[ADMINISTRATOR] New title for your poll"
|
||||
msgstr "[ADMINISTRATEUR] Changement du titre du sondage avec "
|
||||
msgid "[ADMINISTRATOR] New settings for your poll"
|
||||
msgstr "[ADMINISTRATEUR] Changement de configuration du sondage"
|
||||
|
||||
msgid ""
|
||||
"You have changed the title of your poll. \n"
|
||||
"You have changed the settings of your poll. \n"
|
||||
"You can modify this poll with this link"
|
||||
msgstr ""
|
||||
"Vous avez modifié le titre de votre sondage. \n"
|
||||
"Vous avez modifié la configuration de votre sondage. \n"
|
||||
"Vous pouvez modifier ce sondage au lien suivant"
|
||||
|
||||
msgid "[ADMINISTRATOR] New description for your poll"
|
||||
msgstr "[ADMINISTRATEUR] Changement de description de votre sondage "
|
||||
|
||||
msgid ""
|
||||
"You have changed the description of your poll. \n"
|
||||
"You can modify this poll with this link"
|
||||
msgstr ""
|
||||
"Vous avez modifié la description de votre sondage. \n"
|
||||
"Vous pouvez modifier ce sondage au lien suivant"
|
||||
|
||||
msgid "[ADMINISTRATOR] New email address for your poll"
|
||||
msgstr "[ADMINISTRATEUR] Changement d'adresse électronique de l'administrateur avec "
|
||||
|
||||
msgid ""
|
||||
"You have changed your email address in your poll. \n"
|
||||
"You can modify this poll with this link"
|
||||
msgstr ""
|
||||
"Vous avez modifié l'adresse mail associé à votre sondage. \n"
|
||||
"Vous pouvez modifier ce sondage au lien suivant"
|
||||
|
||||
msgid "[ADMINISTRATOR] Removing of your poll"
|
||||
msgstr "[ADMINISTRATEUR] Suppression de sondage"
|
||||
|
||||
msgid ""
|
||||
"You have removed your poll. \n"
|
||||
"You can make new polls with this link"
|
||||
msgstr ""
|
||||
"Vous supprimé un sondage. \n"
|
||||
"Vous pouvez faire de nouveaux sondages au lien suivant"
|
||||
|
||||
msgid "[ADMINISTRATOR] New column for your poll"
|
||||
msgstr "[ADMINISTRATEUR] Ajout d'une nouvelle colonne au sondage "
|
||||
|
||||
msgid ""
|
||||
"You have added a new column in your poll. \n"
|
||||
"You can inform the voters of this change with this link"
|
||||
msgstr ""
|
||||
"Vous avez ajouté une colonne à votre sondage. \n"
|
||||
"Vous pouvez informer vos utilisateurs de ce changement en leur envoyant l'adresse suivante"
|
||||
|
||||
# Mails creation_sondage.php
|
||||
msgid ""
|
||||
"This is the message you have to send to the people you want to poll. \n"
|
||||
@ -591,28 +670,3 @@ msgstr "Réservé à l'auteur"
|
||||
|
||||
msgid "For sending to the polled users"
|
||||
msgstr "Pour diffusion aux sondés"
|
||||
|
||||
# Mails contact.php
|
||||
msgid "[CONTACT] You have sent a question "
|
||||
msgstr "[CONTACT] Envoi de question "
|
||||
|
||||
msgid "You have a question from a user "
|
||||
msgstr "Vous avez une question d'utilisateur de "
|
||||
|
||||
msgid "User"
|
||||
msgstr "Utilisateur"
|
||||
|
||||
msgid "User's email address"
|
||||
msgstr "Adresse utilisateur"
|
||||
|
||||
msgid "Message"
|
||||
msgstr "Message"
|
||||
|
||||
msgid "[COPY] Someone has sent a question "
|
||||
msgstr "[COPIE] Envoi de question "
|
||||
|
||||
msgid "Here is a copy of your question"
|
||||
msgstr "Voici une copie de votre question"
|
||||
|
||||
msgid "We're going to answer your question shortly."
|
||||
msgstr "Nous allons prendre en compte votre message rapidement."
|
||||
|
157
studs.php
157
studs.php
@ -320,7 +320,7 @@ $td_headers = array(); // for a11y, headers="M1 D4 H5" on each td
|
||||
$radio_title = array(); // date for
|
||||
|
||||
// Dates poll
|
||||
if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
if ($dsondage->format=="D"||$dsondage->format=="D+"||$dsondage->format=="D-") {
|
||||
|
||||
$tr_months = '<tr><th role="presentation"></th>';
|
||||
$tr_days = '<tr><th role="presentation"></th>';
|
||||
@ -366,7 +366,7 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
$hour = substr($current, strpos($current, '@')-count($current)+2);
|
||||
|
||||
if ($hour != "") {
|
||||
$tr_hours .= '<th class="bg-info'.$rbd.'" id="H'.$i.'">'.$hour.'</th>';
|
||||
$tr_hours .= '<th class="bg-info'.$rbd.'" id="H'.$i.'" title="'.$hour.'">'.$hour.'</th>';
|
||||
$radio_title[$i] .= ' - '.$hour;
|
||||
$td_headers[$i] .= ' H'.$i;
|
||||
} else {
|
||||
@ -396,11 +396,35 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
$td_headers[$i]='';$radio_title[$i]=''; // init before concatenate
|
||||
|
||||
// Subjects
|
||||
$tr_subjects .= '<th class="bg-info" id="S'.preg_replace("/[^a-zA-Z0-9]_+/", "", stripslashes($toutsujet[$i])).'">'.stripslashes($toutsujet[$i]).'</th>';
|
||||
preg_match_all('/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/',$toutsujet[$i],$md_a_img); // Markdown [![alt](src)](href)
|
||||
preg_match_all('/!\[(.*?)\]\((.*?)\)/',$toutsujet[$i],$md_img); // Markdown ![alt](src)
|
||||
preg_match_all('/\[(.*?)\]\((.*?)\)/',$toutsujet[$i],$md_a); // Markdown [text](href)
|
||||
if (isset($md_a_img[2][0]) && $md_a_img[2][0]!='' && isset($md_a_img[3][0]) && $md_a_img[3][0]!='') { // [![alt](src)](href)
|
||||
|
||||
$th_subject_text = (isset($md_a_img[1][0]) && $md_a_img[1][0]!='') ? stripslashes($md_a_img[1][0]) : _("Choice") .' '.($i+1);
|
||||
$th_subject_html = '<a href="'.$md_a_img[3][0].'"><img src="'.$md_a_img[2][0].'" class="img-responsive" alt="'.$th_subject_text.'" /></a>';
|
||||
|
||||
} elseif (isset($md_img[2][0]) && $md_img[2][0]!='') { // ![alt](src)
|
||||
|
||||
$th_subject_text = (isset($md_img[1][0]) && $md_img[1][0]!='') ? stripslashes($md_img[1][0]) : _("Choice") .' '.($i+1);
|
||||
$th_subject_html = '<img src="'.$md_img[2][0].'" class="img-responsive" alt="'.$th_subject_text.'" />';
|
||||
|
||||
} elseif (isset($md_a[2][0]) && $md_a[2][0]!='') { // [text](href)
|
||||
|
||||
$th_subject_text = (isset($md_a[1][0]) && $md_a[1][0]!='') ? stripslashes($md_a[1][0]) : _("Choice") .' '.($i+1);
|
||||
$th_subject_html = '<a href="'.$md_a[2][0].'">'.$th_subject_text.'</a>';
|
||||
|
||||
} else { // text only
|
||||
|
||||
$th_subject_text = stripslashes($toutsujet[$i]);
|
||||
$th_subject_html = $th_subject_text;
|
||||
|
||||
}
|
||||
$tr_subjects .= '<th class="bg-info" id="S'.$i.'" title="'.$th_subject_text.'">'.$th_subject_html.'</th>';
|
||||
|
||||
$border[$i] = false;
|
||||
$td_headers[$i] .= stripslashes($toutsujet[$i]);
|
||||
$radio_title[$i] .= stripslashes($toutsujet[$i]);
|
||||
$td_headers[$i] .= 'S'.$i;
|
||||
$radio_title[$i] .= $th_subject_text;
|
||||
|
||||
}
|
||||
|
||||
@ -411,13 +435,35 @@ if ($dsondage->format=="D"||$dsondage->format=="D+") {
|
||||
echo '
|
||||
<form name="formulaire" action="' . Utils::getUrlSondage($dsondage->id_sondage) . '" method="POST">
|
||||
<input type="hidden" name="sondage" value="' . $numsondage . '"/>
|
||||
|
||||
';
|
||||
if ($dsondage->format=="A-" || $dsondage->format=="D-") {
|
||||
echo '
|
||||
<div class="alert alert-danger">
|
||||
<p>' . _("The administrator locked this poll, votes and comments are frozen, it's not possible to participate anymore.") . '</p>
|
||||
<p><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</span></p>
|
||||
</div>';
|
||||
} else {
|
||||
echo '
|
||||
<div class="alert alert-info">
|
||||
<p>' . _("If you want to vote in this poll, you have to give your name, choose the values that fit best for you and validate with the plus button at the end of the line.") . '</p>
|
||||
<p><b>' . _('Legend:'). '</b> <span class="glyphicon glyphicon-ok"></span> =' . _('Yes') . ', <b>(<span class="glyphicon glyphicon-ok"></span>)</b> = ' . _('Ifneedbe') . ', <span class="glyphicon glyphicon-ban-circle"></span> = ' . _('No') . '</span></p>
|
||||
</div>';
|
||||
}
|
||||
echo'
|
||||
<div class="hidden row scroll-buttons" aria-hidden="true">
|
||||
<div class="btn-group pull-right">
|
||||
<button class="btn btn-sm btn-link scroll-left" title="' . _('Scroll to the left') . '">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
</button>
|
||||
<button class="btn btn-sm btn-link scroll-right" title="' . _('Scroll to the right') . '">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="tableContainer" class="tableContainer">
|
||||
<table class="results">
|
||||
<caption>'._('Votes of the poll ').$title.'</caption>
|
||||
<caption class="sr-only">'._('Votes of the poll ').$title.'</caption>
|
||||
<thead>'. $thead . '</thead>
|
||||
<tbody>';
|
||||
|
||||
@ -499,8 +545,12 @@ while ($data = $user_studs->FetchNextObject(false)) {
|
||||
|
||||
//a la fin de chaque ligne se trouve les boutons modifier
|
||||
if ($compteur != $ligneamodifier && ($dsondage->format=="A+"||$dsondage->format=="D+") && $mod_ok) {
|
||||
echo '<td><button type="submit" class="btn btn-link btn-sm" name="modifierligne'.$compteur.'" title="'. _('Edit the line:') .' '.stripslashes($nombase).'">
|
||||
<span class="glyphicon glyphicon-pencil"></span></button></td>'."\n";
|
||||
echo '
|
||||
<td>
|
||||
<button type="submit" class="btn btn-link btn-sm" name="modifierligne'.$compteur.'" title="'. _('Edit the line:') .' '.stripslashes($nombase).'">
|
||||
<span class="glyphicon glyphicon-pencil"></span><span class="sr-only">' . _('Edit') . '</span>
|
||||
</button>
|
||||
</td>'."\n";
|
||||
}
|
||||
|
||||
//demande de confirmation pour modification de ligne
|
||||
@ -517,7 +567,7 @@ while ($data = $user_studs->FetchNextObject(false)) {
|
||||
}
|
||||
|
||||
// affichage de la ligne pour un nouvel utilisateur
|
||||
if (( !(USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) || !$user_mod) && $ligneamodifier==-1) {
|
||||
if (( !(USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) || !$user_mod) && $ligneamodifier==-1 && ($dsondage->format!="A-" && $dsondage->format!="D-")) {
|
||||
//affichage de la case vide de texte pour un nouvel utilisateur
|
||||
echo '<tr id="vote-form">
|
||||
<td class="bg-info" style="padding:5px">
|
||||
@ -562,71 +612,56 @@ if (( !(USE_REMOTE_USER && isset($_SERVER['REMOTE_USER'])) || !$user_mod) && $li
|
||||
|
||||
// Addition and Best choice
|
||||
//affichage de la ligne contenant les sommes de chaque colonne
|
||||
$tr_addition = '<tr><td>'. _("Addition") .'</td>';
|
||||
$tr_bestchoice = '<tr><td></td>';
|
||||
$meilleurecolonne = 0;
|
||||
|
||||
$tr_addition = '<tr id="addition"><td>'. _("Addition") .'</td>';
|
||||
$meilleurecolonne = max($somme);
|
||||
$compteursujet = 0;
|
||||
$meilleursujet = '<ul style="list-style:none">';
|
||||
for ($i = 0; $i < $nbcolonnes; $i++) {
|
||||
if (isset($somme[$i]) && $somme[$i] > 0 ) {
|
||||
if (isset($somme[$i]) && $somme[$i] > $meilleurecolonne){
|
||||
$meilleurecolonne = $somme[$i];
|
||||
}
|
||||
if (in_array($i, array_keys($somme, max($somme)))){
|
||||
|
||||
$tr_addition .= '<td><span class="glyphicon glyphicon-star text-warning"></span><span>'.$somme[$i].'</span></td>';
|
||||
|
||||
$meilleursujet.= '<li><b>'.$radio_title[$i].'</b></li>';
|
||||
$compteursujet++;
|
||||
|
||||
} else {
|
||||
$tr_addition .= '<td>'.$somme[$i].'</td>';
|
||||
}
|
||||
} else {
|
||||
$tr_addition .= '<td></td>';
|
||||
}
|
||||
}
|
||||
$tr_addition .= '<td></td></tr>';
|
||||
|
||||
//recuperation des valeurs des sujets et adaptation pour affichage
|
||||
$toutsujet = explode(",", $dsondage->sujet);
|
||||
|
||||
$compteursujet = 0;
|
||||
$meilleursujet = '<ul style="list-style:none">';
|
||||
for ($i = 0; $i < $nbcolonnes; $i++) {
|
||||
|
||||
if (isset($somme[$i]) && $somme[$i] > 0 && $somme[$i] == $meilleurecolonne){
|
||||
$tr_bestchoice .= '<td><span class="glyphicon glyphicon-star text-warning"></span></td>';
|
||||
|
||||
if ($dsondage->format == "D" || $dsondage->format == "D+") {
|
||||
$meilleursujetexport = $toutsujet[$i];
|
||||
|
||||
if (strpos($toutsujet[$i], '@') !== false) {
|
||||
$toutsujetdate = explode("@", $toutsujet[$i]);
|
||||
$meilleursujet .= '<li><b>'.strftime(_("%A, den %e. %B %Y"),$toutsujetdate[0]). ' - ' . $toutsujetdate[1].'</b></li>';
|
||||
} else {
|
||||
$meilleursujet .= '<li><b>'.strftime(_("%A, den %e. %B %Y"),$toutsujet[$i]).'</b></li>';
|
||||
}
|
||||
} else {
|
||||
$meilleursujet.= '<li><b>'.$toutsujet[$i].'</b></li>';
|
||||
}
|
||||
$compteursujet++;
|
||||
|
||||
} else {
|
||||
$tr_bestchoice .= '<td></td>';
|
||||
}
|
||||
}
|
||||
$tr_bestchoice .= '<td></td></tr>';
|
||||
|
||||
$meilleursujet = str_replace("°", "'", $meilleursujet).'</ul>';
|
||||
$vote_str = ($meilleurecolonne > 1) ? $vote_str = _('votes') : _('vote');
|
||||
|
||||
// Print Addition and Best choice
|
||||
echo $tr_addition."\n".$tr_bestchoice.'
|
||||
echo $tr_addition.'
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="col-sm-4 col-sm-offset-4"><p>'."\n";
|
||||
</div>
|
||||
<div class="row">'."\n";
|
||||
|
||||
if ($compteursujet == 1) {
|
||||
echo '<span class="glyphicon glyphicon-star text-warning"></span> ' . _("The best choice at this time is:") . '</p>' . $meilleursujet . '<p>' . _("with") . ' <b>' . $meilleurecolonne . '</b> ' . $vote_str . ".\n";
|
||||
echo '
|
||||
<div class="col-sm-6 col-sm-offset-3 alert alert-success">
|
||||
<p><span class="glyphicon glyphicon-star text-warning"></span> ' . _("The best choice at this time is:") . '</p>
|
||||
' . $meilleursujet . '
|
||||
<p>' . _("with") . ' <b>' . $meilleurecolonne . '</b> ' . $vote_str . '.</p>
|
||||
</div>'."\n";
|
||||
} elseif ($compteursujet > 1) {
|
||||
echo '<span class="glyphicon glyphicon-star text-warning"></span> ' . _("The bests choices at this time are:") . '</p>' . $meilleursujet . '<p>' . _("with") . ' <b>' . $meilleurecolonne . '</b> ' . $vote_str . ".\n";
|
||||
echo '
|
||||
<div class="col-sm-6 col-sm-offset-3 alert alert-success">
|
||||
<p><span class="glyphicon glyphicon-star text-warning"></span> ' . _("The bests choices at this time are:") . '</p>
|
||||
' . $meilleursujet . '
|
||||
<p>' . _("with") . ' <b>' . $meilleurecolonne . '</b> ' . $vote_str . '.</p>
|
||||
</div>'."\n";
|
||||
}
|
||||
|
||||
echo '
|
||||
</p></div>
|
||||
</div>
|
||||
|
||||
<hr />';
|
||||
|
||||
// Comments
|
||||
@ -635,7 +670,7 @@ $sql = $connect->Prepare($sql);
|
||||
$comment_user=$connect->Execute($sql, array($numsondage));
|
||||
|
||||
if ($comment_user->RecordCount() != 0) {
|
||||
echo '<div class="row"><h3>' . _("Comments of polled people") . '</h3>'."\n";
|
||||
echo '<div><h3>' . _("Comments of polled people") . '</h3>'."\n";
|
||||
|
||||
while($dcomment = $comment_user->FetchNextObject(false)) {
|
||||
echo '
|
||||
@ -647,8 +682,10 @@ if ($comment_user->RecordCount() != 0) {
|
||||
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
if ($dsondage->format!="A-" && $dsondage->format!="D-") {
|
||||
echo '
|
||||
<div class="row hidden-print alert alert-info">
|
||||
<div class="hidden-print alert alert-info">
|
||||
<div class="col-md-6 col-md-offset-3">
|
||||
<fieldset id="add-comment"><legend>' . _("Add a comment in the poll") . '</legend>
|
||||
<div class="form-group">
|
||||
@ -661,10 +698,12 @@ echo '
|
||||
<p class="text-center"><input type="submit" name="ajoutcomment" value="'. _("Send the comment") .'" class="btn btn-success"></p>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="clearfix"></div>
|
||||
</div>';
|
||||
}
|
||||
|
||||
<a id="bas"></a>';
|
||||
echo '
|
||||
</div>
|
||||
</form>';
|
||||
|
||||
bandeau_pied();
|
||||
|
Loading…
Reference in New Issue
Block a user