Login Control customization
Hi,
I'd like to customize login control and use it on my custom master page.
Could you please help me giving some source code example how to do it?
I put control on my master page and it's displayed perfectly, but I don't know how to change LayoutTemplate to provide all the fields needed.
Thank you,
Dmitry.
Hello Dmitry,
To customize the way the control is displayed at the fronted add css classes inside your theme and address the control. I have attached a sample css file to illustrate how to set the css classes ( please use firebug to find names of the elements you need) .
If you need to achieve some fancy functionality with the login control feel free to use images attached to your theme and javascript.
$(document).ready(
function
()
$(
'.sfLoginField .sfTxtLbl'
).click(
function
()
if
($(
this
).html() ==
"Username"
)
if
($(
this
).next().attr(
'class'
)==
'Help help-username'
)
$(
'.help-username'
).toggle();
if
($(
this
).next().attr(
'class'
)==
'sfTxt'
)
$(
this
).after(
'<div class="Help help-username">Enter your User name here.</span>'
)
if
($(
this
).html() ==
"Password"
)
if
($(
this
).next().attr(
'class'
) ==
'Help help-password'
)
$(
'.help-password'
).toggle();
if
($(
this
).next().attr(
'class'
)==
'sfTxt'
)
$(
this
).after(
'<div class="Help help-password">Enter your Password.</span>'
)
)
)