Commit 486e0941 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Branche pour migration vers Twitter Bootstrap 3

parent 3c25c0e1
......@@ -70,14 +70,13 @@ class UserCurrent extends UserAbstract
href="#">$status</a>
EOS;
$out .= PHP_EOL;
$out .= <<<EOS
<script type="text/javascript">
$(function() {
$("#$id").popover({ html: true, container: '#navbar' });
});
</script>
$js = <<<EOS
$(function() {
$("#$id").popover({ html: true, container: '#navbar' });
});
EOS;
$out .= PHP_EOL;
$this->getView()->inlineScript()->offsetSetScript(1000, $js);
return $out;
}
......
......@@ -5,41 +5,57 @@
<?php
$form = $this->loginForm;
$form->prepare();
$form->setAttribute('action', $this->url('zfcuser/login'));
$form->setAttribute('method', 'post');
$form->setAttributes(array(
'action' => $this->url('zfcuser/login'),
'method' => 'post',
'class' => 'form-horizontal',
'role' => 'form'));
?>
<?php echo $this->form()->openTag($form) ?>
<div class="container col-sm-2">
<?php echo $this->form()->openTag($form) ?>
<?php if (($errors = $this->formErrors($this->loginForm))): ?>
<p>
<?php echo $errors ?>
</p>
<?php endif ?>
<p>
<?php echo $this->formLabel($form->get($name = 'identity')->setAttribute('id', $name)) ?>
<?php echo $this->formInput($form->get($name)) ?>
<?php echo $this->formLabel($form->get($name = 'credential')->setAttribute('id', $name)) ?>
<?php echo $this->formInput($form->get($name)) ?>
<?php if ($this->redirect): ?>
<input type="hidden" name="redirect" value="<?php echo $this->redirect ?>" />
<?php if (($errors = $this->formErrors($this->loginForm))): ?>
<p>
<?php echo $errors ?>
</p>
<?php endif ?>
</p>
<p>
<div class="form-group">
<?php
$identity = $form->get($name = 'identity')
->setAttributes(array('id' => $name, 'class' => 'form-control'))
/*->setLabelAttributes(array('class' => 'control-label'))*/;
echo $this->formLabel($identity);
echo $this->formInput($identity);
?>
</div>
<div class="form-group">
<?php
$identity = $form->get($name = 'credential')
->setAttributes(array('id' => $name, 'class' => 'form-control'))
/*->setLabelAttributes(array('class' => 'control-label'))*/;
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 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