Technical support This forum is closed.
Version 1.x > Technical support > modifying the LogonForm View modes: 
User avatar
Member
Member
forrester - 2/23/2006 6:44:37 PM
   
modifying the LogonForm
Is it possible to modify the layout of the LogonForm for version 1.8a? I have looked in the Developer's Guide and searched this forum, but couldn't find the answer.

Here is what I am trying to achieve...I would like the LogonForm to fit in a 200px width column. In doing that, I would like the layout to look like this (I want 'username' and 'password' above the textfields):

username
--textfield--
password
--textfield--
remember me --box--
logon button

instead of....

username --textfield--
password --textfield--
remember me --box--
logon button

Thanks for your help.

forrester

User avatar
Guest
admin - 2/24/2006 4:28:12 PM
   
Re: modifying the LogonForm
Hello,

thank you for your message. Unfortunately, the design of the logon form is not very configurable. However, you could do that perhaps with CSS positioning like this:

.LogonFormUserNameLabel
{
position:relative;
left: 100px;
top: -20px;
}

Alternatively, you could create your own logon form - the only thing you need to do is to run code like this:

TreeProvider tree = Functions.GetTreeProvider();
object[,] paramsIdent = new object[ 1, 3 ];

if ( tree.SecurityProvider.AuthenticateUser( mUserNameTextBox.Text.Trim(), mPasswordTextBox.Text ) == AuthenticationResultEnum.OK )
{
// get userid and set it to the session("CMSUserID") value
paramsIdent[ 0, 0 ] = "@UserName";
paramsIdent[ 0, 1 ] = mUserNameTextBox.Text.Trim();
System.Web.HttpContext.Current.Session[ "CMSUserID" ] = tree.Connection.ExecuteQuery( "cms.user.selectbyusername", paramsIdent ).Tables[ 0 ].Rows[ 0 ][ "UserID" ];
// redirect user
FormsAuthentication.RedirectFromLoginPage( mUserNameTextBox.Text.Trim(), mRememberCheckBox.Checked );
}

else

{
//logon failed
}

Best Regards,

User avatar
Member
Member
forrester - 2/24/2006 7:07:26 PM
   
Re: modifying the LogonForm
Thanks for the reply...
The CSS option kinda worked, but not to my satisfaction, so I am trying your alternative solution. Thanks for writing that out for me.

forrester