issue #0001636 : Redraw style, change layout
This commit is contained in:
parent
8c78243669
commit
cb42228ad9
@ -51,7 +51,6 @@ class UserController extends Zend_Controller_Action
|
||||
public function init()
|
||||
{
|
||||
require_once 'Scores/WsScores.php';
|
||||
|
||||
$this->view->headLink()->appendStylesheet('/themes/default/styles/user.css', 'all');
|
||||
}
|
||||
|
||||
@ -103,7 +102,7 @@ class UserController extends Zend_Controller_Action
|
||||
}
|
||||
|
||||
if ( in_array($options['profil'], array('Administrateur', 'SuperAdministrateur'))
|
||||
&& !in_array('monprofil', $options['droits']) ) {
|
||||
&& !in_array('monprofil', $options['droits']) ) {
|
||||
$options['droits'][] = 'monprofil';
|
||||
}
|
||||
|
||||
@ -229,6 +228,57 @@ class UserController extends Zend_Controller_Action
|
||||
$this->view->assign('prefsLib', $prefsLib);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display box to enter emails
|
||||
* One main email and two secondary
|
||||
* Email length 80 * 3 = 240
|
||||
* 255 chars is the length to store emails (email1;email2;email3)
|
||||
*/
|
||||
public function emailsAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$nbEmails = 3;
|
||||
|
||||
$request = $this->getRequest();
|
||||
$emails = $request->getParam('q');
|
||||
|
||||
if (null !== $emails) {
|
||||
$emailList = explode(';', $emails);
|
||||
if ( count($emailList)>0 ) {
|
||||
$i = 1;
|
||||
foreach ( $emailList as $email ) {
|
||||
$this->view->assign('email'.$i, $email);
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate email
|
||||
*/
|
||||
public function emailvalidAction()
|
||||
{
|
||||
$this->_helper->layout()->disableLayout();
|
||||
|
||||
$request = $this->getRequest();
|
||||
$email = $request->getParam('q');
|
||||
|
||||
$valid = false;
|
||||
|
||||
if (null !== $email) {
|
||||
$validateur = new Zend_Validate_EmailAddress();
|
||||
$valid = $validateur->isValid($email);
|
||||
}
|
||||
|
||||
$result = array(
|
||||
'valid' => $valid,
|
||||
);
|
||||
|
||||
$this->view->assign('result', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* Téléchargement de la consommation au format CSV
|
||||
*/
|
||||
@ -334,10 +384,8 @@ class UserController extends Zend_Controller_Action
|
||||
*/
|
||||
public function loginAction()
|
||||
{
|
||||
$this->view->inlineScript()
|
||||
->appendFile('/libs/jquery/jquery.infieldlabel.min.js')
|
||||
->appendFile('/libs/jquery/jquery-1.9.1.min.js')
|
||||
->appendFile('/libs/ui-1.9.2/jquery-ui.min.js');
|
||||
$this->view->headScript()
|
||||
->appendFile('/libs/jquery/jquery.infieldlabel.min.js');
|
||||
|
||||
//@todo : gestion des affichages particuliers pour les clients
|
||||
$this->view->headTitle()->append('Connexion');
|
||||
@ -548,14 +596,14 @@ class UserController extends Zend_Controller_Action
|
||||
print_r($device->getAllFeatures());
|
||||
echo "</pre>";
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Sends email to the specific client, who requests for forgotten password
|
||||
*/
|
||||
public function motpasseAction()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
$name = 'Mot de passe, Identifiant oubliés';
|
||||
$name = 'Identifiants oubliés ?';
|
||||
$params = array(
|
||||
'identifiant' => '',
|
||||
'telephone' => '',
|
||||
@ -565,13 +613,13 @@ class UserController extends Zend_Controller_Action
|
||||
'fonction' => '',
|
||||
'rsociale' => '',
|
||||
);
|
||||
|
||||
|
||||
if ( $request->isXmlHttpRequest() ) {
|
||||
$this->_helper->layout()->disableLayout();
|
||||
if ( $request->isPost() ) {
|
||||
$params = $request->getParams();
|
||||
$message = '';
|
||||
|
||||
|
||||
$paramlist = array(
|
||||
'telephone' => 'Numéro de téléphone direct',
|
||||
'email' => 'Adresse email',
|
||||
@ -580,22 +628,22 @@ class UserController extends Zend_Controller_Action
|
||||
'fonction' => 'Fonction',
|
||||
'rsociale' => 'Sociale',
|
||||
);
|
||||
|
||||
|
||||
foreach ($paramlist as $item => $val) {
|
||||
if (!isset($params[$item])) {
|
||||
$message .= "Valeur $val vide !<br/>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$validator = new Zend_Validate_EmailAddress();
|
||||
if (isset($params['email'])){
|
||||
if (!$validator->isValid($params['email'])) {
|
||||
$message .="Adress email n'est pas correct! <br/>";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($message == '') {
|
||||
|
||||
|
||||
require_once 'Scores/Mail.php';
|
||||
$mail = new Mail();
|
||||
$mail->setSubject($name);
|
||||
|
@ -3,7 +3,6 @@
|
||||
<head>
|
||||
<?php echo $this->headMeta()?>
|
||||
<?php echo $this->headTitle()?>
|
||||
<?php echo $this->headStyle()?>
|
||||
<?php echo $this->headLink()?>
|
||||
<?php echo $this->headScript()?>
|
||||
</head>
|
||||
|
@ -1,10 +1,11 @@
|
||||
<?php echo $this->doctype()?>
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="/libs/ui-1.9.2/themes/smoothness/jquery-ui.css" />
|
||||
<?=$this->headMeta();?>
|
||||
<?=$this->headTitle();?>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?='http://'.$_SERVER['SERVER_NAME']?>/favicon.ico" />
|
||||
<?php echo $this->headMeta()?>
|
||||
<?php echo $this->headTitle()?>
|
||||
<?php echo $this->headLink()?>
|
||||
<?php echo $this->headScript()?>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="<?='http://'.$_SERVER['SERVER_NAME']?>/favicon.ico" />
|
||||
<style>
|
||||
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, em, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, dialog, figure, footer, header, hgroup, nav, section {
|
||||
border: 0 none;
|
||||
@ -576,8 +577,6 @@ a.bookmarklet {
|
||||
|
||||
</style>
|
||||
<!--[if IE 8]><style>input[type="checkbox"]{padding:0;}</style><![endif]-->
|
||||
|
||||
<?=$this->inlineScript()?>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$("label").inFieldLabels();
|
||||
@ -595,19 +594,41 @@ $(document).ready(function(){
|
||||
|
||||
<form method="post" action="<?=$this->url(array('controller'=>'user', 'action'=>'login'),null, true)?>">
|
||||
<p style="text-align:center; color:red;"><span><?=$this->message?></span></p>
|
||||
<fieldset>
|
||||
<p class="infield">
|
||||
<label for="user" class="infield">Identifiant</label>
|
||||
<input type="text" name="login" id="user" value="" autofocus autocomplete="off" required />
|
||||
</p>
|
||||
<p class="infield">
|
||||
<label for="password" class="infield">Mot de passe</label>
|
||||
<input type="password" name="pass" id="password" value="" required />
|
||||
</p>
|
||||
<!-- <input type="checkbox" name="remember_login" value="1" id="remember_login" /><label for="remember_login">Remember</label> -->
|
||||
<script>document.write('<input name="screenSize" type="hidden" value="'+ screen.width +'x'+screen.height + '">')</script>
|
||||
<input type="submit" id="submit" class="login" value="Connexion" />
|
||||
</fieldset><div class="StyleInfoData"><?=$this->action('motpasse','user', null); ?></div>
|
||||
<fieldset>
|
||||
<p class="infield">
|
||||
<label for="user" class="infield">Identifiant</label>
|
||||
<input type="text" name="login" id="user" value="" autofocus autocomplete="off" required />
|
||||
</p>
|
||||
<p class="infield">
|
||||
<label for="password" class="infield">Mot de passe</label>
|
||||
<input type="password" name="pass" id="password" value="" required />
|
||||
</p>
|
||||
<!-- <input type="checkbox" name="remember_login" value="1" id="remember_login" /><label for="remember_login">Remember</label> -->
|
||||
<script>document.write('<input name="screenSize" type="hidden" value="'+ screen.width +'x'+screen.height + '">');</script>
|
||||
<a class="dlg" title="Identifiants oubliés ?" href="<?=$this->url(array('controller'=>'user', 'action'=>'motpasse'))?>">Identifiants oubliés ?</a>
|
||||
<script>
|
||||
$('a.dlg').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var dlgOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 710,
|
||||
height: 530,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {'Fermer': function() { $(this).dialog('close'); }},
|
||||
close: function() { $('#dlg').remove(); }};
|
||||
$('<div id="dlg"></div>').dialog(dlgOpts);
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
<input type="submit" id="submit" class="login" value="Connexion" />
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
@ -1,31 +1,17 @@
|
||||
<?php if ($this->href) {?>
|
||||
|
||||
<a class="dlg" title="<?=$this->name?>" href="<?=$this->href?>"><?=$this->name?></a>
|
||||
<script>
|
||||
$('a.dlg').on('click', function(e){
|
||||
e.preventDefault();
|
||||
var title = $(this).attr('title');
|
||||
var href = $(this).attr('href');
|
||||
var dlgOpts = {
|
||||
bgiframe: true,
|
||||
title: title,
|
||||
width: 710,
|
||||
height: 530,
|
||||
modal: true,
|
||||
open: function(event, ui) {
|
||||
$(this).html('Chargement...');
|
||||
$(this).load(href);
|
||||
},
|
||||
buttons: {'Fermer': function() { $(this).dialog('close'); }},
|
||||
close: function() { $('#dlg').remove(); }};
|
||||
$('<div id="dlg"></div>').dialog(dlgOpts);
|
||||
return false;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<?php } else {?>
|
||||
|
||||
<style>
|
||||
div#dlg input[type="text"] {
|
||||
border-radius:0;
|
||||
font-size:1em;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: arial;
|
||||
}
|
||||
@ -37,15 +23,15 @@ label#frm {
|
||||
text-align: right;
|
||||
font-weight: bold;
|
||||
}
|
||||
input#frm {
|
||||
/*input#frm {
|
||||
width: 28em !important;
|
||||
}
|
||||
}*/
|
||||
.brsr {
|
||||
border-style:solid;
|
||||
border-width:1px;
|
||||
border-color:red;
|
||||
}
|
||||
.loading
|
||||
.loading
|
||||
{
|
||||
background-color: silver;
|
||||
height: 450px;
|
||||
@ -54,7 +40,7 @@ input#frm {
|
||||
position: absolute;
|
||||
width: 720px;
|
||||
opacity: 0.3;
|
||||
display:none;
|
||||
display:none;
|
||||
z-index: 1;
|
||||
}
|
||||
.message {
|
||||
@ -82,13 +68,12 @@ input#frm {
|
||||
<?php if ($this->message!='') {?>
|
||||
<div class='message'><p><?=$this->message; ?></p></div>
|
||||
<?php }?>
|
||||
<?php
|
||||
<?php
|
||||
$params = $this->params;
|
||||
?>
|
||||
|
||||
<div id='htxt'>
|
||||
<pre>Cher client,
|
||||
|
||||
<pre>
|
||||
Pour recevoir votre mot de passe ou votre identifiant oubliés, nous vous invitons à saisir les informations ci-dessous et cliquer sur valider.
|
||||
A réception de ces données, nous vous informerons par e-mail.
|
||||
|
||||
@ -98,38 +83,38 @@ Tous les champs (*) sont obligatoires : en cas de données manquantes ou erroné
|
||||
|
||||
<div>
|
||||
<form>
|
||||
<div id='stl'>
|
||||
<label id='frm'>Votre Identifiant :</label>
|
||||
<input id='frm' type="text" name="identifiant" value="<?=$params['identifiant']; ?>"/>
|
||||
<div id="stl">
|
||||
<label id="frm">Votre Identifiant :</label>
|
||||
<input id="frm" type="text" name="identifiant" value="<?=$params['identifiant']; ?>"/>
|
||||
</div>
|
||||
<div id='stl'>
|
||||
<label id='frm'>Votre Adresse email* :</label>
|
||||
<input id='frm' type="email" name="email" value="<?=$params['email']; ?>" required />
|
||||
<div id="stl">
|
||||
<label id="frm">Votre Adresse email* :</label>
|
||||
<input id="frm" type="text" name="email" value="<?=$params['email']; ?>" required />
|
||||
</div>
|
||||
<div id='stl'>
|
||||
<label id='frm'>Votre Numéro de téléphone direct* :</label>
|
||||
<input id='frm' type="text" name="telephone" value="<?=$params['telephone']; ?>" required/>
|
||||
<div id="stl">
|
||||
<label id="frm">Votre Numéro de téléphone * :</label>
|
||||
<input id="frm" type="text" name="telephone" value="<?=$params['telephone']; ?>" required/>
|
||||
</div>
|
||||
<div id='stl'>
|
||||
<label id='frm'>Votre Nom* :</label>
|
||||
<input id='frm' type="text" name="nom" value="<?=$params['nom']; ?>" required/>
|
||||
<div id="stl">
|
||||
<label id="frm">Votre Nom* :</label>
|
||||
<input id="frm" type="text" name="nom" value="<?=$params['nom']; ?>" required/>
|
||||
</div>
|
||||
<div id='stl'>
|
||||
<label id='frm'>Votre Prénom* :</label>
|
||||
<input id='frm' type="text" name="prenom" value="<?=$params['prenom']; ?>" required/>
|
||||
<div id="stl">
|
||||
<label id="frm">Votre Prénom* :</label>
|
||||
<input id="frm" type="text" name="prenom" value="<?=$params['prenom']; ?>" required/>
|
||||
</div>
|
||||
<div id='stl'>
|
||||
<label id='frm'>Votre Fonction* :</label>
|
||||
<input id='frm' type="text" name="fonction" value="<?=$params['fonction']; ?>" required/>
|
||||
<div id="stl">
|
||||
<label id="frm">Votre Fonction* :</label>
|
||||
<input id="frm" type="text" name="fonction" value="<?=$params['fonction']; ?>" required/>
|
||||
</div>
|
||||
<div id='stl'>
|
||||
<label id='frm'>Raison Sociale* :</label>
|
||||
<input id='frm' type="text" name="rsociale" value="<?=$params['rsociale']; ?>" required/>
|
||||
<div id="stl">
|
||||
<label id="frm">Raison Sociale* :</label>
|
||||
<input id="frm" type="text" name="rsociale" value="<?=$params['rsociale']; ?>" required/>
|
||||
</div>
|
||||
|
||||
<div id='alwayshidden'>
|
||||
<div id="alwayshidden">
|
||||
|
||||
<style type='text/css'>
|
||||
<style type="text/css">
|
||||
table {font-family:Arial, Helvetica, sans-serif; font-size: 12px; width: 550px; border: none;}
|
||||
table td{padding: 4px 8px;}
|
||||
</style>
|
||||
@ -155,7 +140,7 @@ S'il vous plaît envoyez-moi encore une fois l'identifiant et(ou) le mot de pass
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id='ftxt'>
|
||||
<div id="ftxt">
|
||||
<pre>
|
||||
Les informations que vous nous communiquez dans ce formulaire seront utilisées exclusivement par nos services internes pour le traitement de votre demande et pour personnaliser la communication.
|
||||
</pre>
|
||||
|
Loading…
Reference in New Issue
Block a user