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
486e0941
Commit
486e0941
authored
Dec 13, 2013
by
Bertrand Gauthier
Browse files
Branche pour migration vers Twitter Bootstrap 3
parent
3c25c0e1
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/UnicaenAuth/View/Helper/UserCurrent.php
View file @
486e0941
...
...
@@ -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
;
}
...
...
view/zfc-user/user/login.phtml
View file @
486e0941
...
...
@@ -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
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