Commit 6b6e9519 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Page de connexion : ajout du head title et modif de présentation cosmétique.

parent a10cfe43
......@@ -302,12 +302,12 @@ return array(
'home' => array(
'pages' => array(
'login' => array(
'label' => _("Se connecter"),
'label' => _("Connexion"),
'route' => 'zfcuser/login',
'visible' => false,
),
'register' => array(
'label' => _("S'enregistrer"),
'label' => _("Enregistrement"),
'route' => 'zfcuser/register',
'visible' => false,
),
......
<div class="page-header">
<h1><?php echo $this->translate("Sign In"); ?></h1>
</div>
<?php $this->headTitle("Connexion") ?>
<?php
$form = $this->loginForm;
......@@ -12,50 +10,52 @@ $form->setAttributes(array(
'role' => 'form'));
?>
<?php echo $this->form()->openTag($form) ?>
<style>
#div-connexion { max-width: 350px; margin: auto; }
</style>
<?php if (($errors = $this->formErrors($this->loginForm))): ?>
<p>
<?php echo $errors ?>
</p>
<?php endif ?>
<div class="container col-sm-3">
<div id="div-connexion">
<h1 class="page-header"><?php echo $this->translate("Connexion"); ?></h1>
<div class="form-group">
<?php echo $this->form()->openTag($form) ?>
<?php if (($errors = $this->formErrors($this->loginForm))): ?>
<p><?php echo $errors ?></p>
<?php endif ?>
<p>
<?php
$identity = $form->get($name = 'identity')
->setAttributes(array('id' => $name, 'class' => 'form-control'))
/*->setLabelAttributes(array('class' => 'control-label'))*/;
echo $this->formLabel($identity);
$identity = $form->get($name = 'identity')->setAttributes(array('id' => $name, 'class' => 'form-control'));
echo $this->formLabel($identity);
echo $this->formInput($identity);
?>
</div>
<div class="form-group">
</p>
<p>
<?php
$identity = $form->get($name = 'credential')
->setAttributes(array('id' => $name, 'class' => 'form-control'))
/*->setLabelAttributes(array('class' => 'control-label'))*/;
echo $this->formLabel($identity);
$identity = $form->get($name = 'credential')->setAttributes(array('id' => $name, 'class' => 'form-control'));
echo $this->formLabel($identity);
echo $this->formInput($identity);
?>
<?php if ($this->redirect): ?>
<input type="hidden" name="redirect" value="<?php echo $this->redirect ?>" />
<?php endif ?>
</div>
<?php echo $this->formButton($form->get('submit')->setAttribute('class', 'btn btn-primary')) ?>
</p>
<?php if ($this->redirect): ?>
<input type="hidden" name="redirect" value="<?php echo $this->redirect ?>" />
<?php endif ?>
</div>
<p>
<?php echo $this->formButton($form->get('submit')->setAttribute('class', 'btn btn-primary btn-block')) ?>
</p>
<?php echo $this->form()->closeTag() ?>
<?php echo $this->form()->closeTag() ?>
<?php if ($this->enableRegistration) : ?>
<?php echo $this->translate("Not registered?"); ?> <a href="<?php echo $this->url('zfcuser/register') . ($this->redirect ? '?redirect='.$this->redirect : '') ?>"><?php echo $this->translate("Sign up!"); ?></a>
<?php endif; ?>
<?php if ($this->enableRegistration) : ?>
<?php echo $this->translate("Not registered?"); ?> <a href="<?php echo $this->url('zfcuser/register') . ($this->redirect ? '?redirect=' . $this->redirect : '') ?>"><?php echo $this->translate("Sign up!"); ?></a>
<?php endif; ?>
</div>
<script type="text/javascript">
// focus sur le 1er champ vide
$("input").filter(function() { return this.value === ""; }).get(0).focus();
$("input").filter(function() {
return this.value === "";
}).get(0).focus();
</script>
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment