Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
6b6e9519
Commit
6b6e9519
authored
Sep 05, 2014
by
Bertrand Gauthier
Browse files
Page de connexion : ajout du head title et modif de présentation cosmétique.
parent
a10cfe43
Changes
2
Hide whitespace changes
Inline
Side-by-side
config/module.config.php
View file @
6b6e9519
...
...
@@ -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'e
nregistre
r
"
),
'label'
=>
_
(
"
E
nregistre
ment
"
),
'route'
=>
'zfcuser/register'
,
'visible'
=>
false
,
),
...
...
view/zfc-user/user/login.phtml
View file @
6b6e9519
<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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment