Creating login control under secondary navigation

Our client has a site design that requires a login box (username, password, login button) under the secondary navigation (vertical navigation on left hand of page).

We are using WCM 15.1.1.3632. 

I've checked the iPart gallery and don't see any login iParts  - any ideas how to create this functionality?  Anyone added a login box to a content area? 

Keith

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

You can't do it through WCM;

You can't do it through WCM; you'll need to edit the .master page for your WCM website and insert the login box markup inside the div with id="SideBarPanel".

That's assuming you want it on every page. If you only want it on certain pages, things get trickier.

Eric Means
System Architect, ASI

Thanks - the good news is

Thanks - the good news is they want it on every page.  However, how would I determine what code to put in here?  Or would I have to create this from 'scratch ' using ibo? 

Keith

 

It's a form

The login is a form, so it needs somewhere to submit to which can process it.  If you name your controls correctly, you might be able to point the form at the normal login page, since most pages submit to themselves.
--
Bruce Wilson
Director, Technical Services
RSM McGladrey, Inc.

Thanks - I've tried to

Thanks - I've tried to 'fool' asp forms before - posting to them from another page, but the view_state and other security controls are pretty hard to get around.  I believe ASP.NET is built to prevent this kind of spoofing.

Anyone have any thoughts on an iPart using the membership web service?  If we build an iPart to login using the membership web service, will it authenicate the visitor's browser, or just the iPart?   Or any one heard of code samples for the membership web service to authenticate the browser session? 

 

 

 

Please look at this

Please look at this link

http://ftpimis151.fishtech.net/iMIS15/Default.aspx

Actually I copied existing login.ascx and modifed little bit and named it login2.ascx.

Then I added this control to one of the home page content area using location option

~/\AsiCommon/Controls/Shared/FormsAuthentication/login2.ascx.

Let me know if you need login2.ascx html code

Thanks

 

 

 

 

That looks like the

That looks like the solution!  Thanks very much.  If  you feel like posting the code it could be helpful to me and anyone else who encounters the problem. Keith

Hi,We are trying to the

Hi,

We are trying to do the same thing for one of our clients. can you please post or send me your html code.

my emails address is snarsa@a-gcs.com.

Thanks in advance.

Sapna

Good Evening

We are trying to do the same thing.  WOuld yo ube able to post your code?  It would be way helpful:).  Thanks!

you may need to modify your CSS to fit into your WCM Site

<%@ control language="C#" autoeventwireup="true" inherits="Asi.Web.UI.Common.FormsAuthentication.Login, Asi.Webroot.AsiCommon.Controls.Shared.FormsAuthentication" %>

<script type="text/javascript">
    addLoadEvent(focusLogonName);
    function focusLogonName()
    {
        var logonNameId = '<asp:Literal runat="server" Text='<%# LoginView1.FindControl("Login1") != null ? LoginView1.FindControl("Login1").FindControl("UserName").ClientID : "" %>' />';
        if (logonNameId.length > 0)
            $get(logonNameId).focus();
    }
</script>
<div style="width:100%; text-align: left;">
<asp:UpdatePanel ID="LoginUpdatePanel" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">
    <ContentTemplate>
    <p><asp:Label ID="lblMessage" runat="server"></asp:Label></p>
    <p class="error"><asp:Label ID="LoginErrorMessage" runat="server" Visible="false"></asp:Label></p>
    <asp:LoginView ID="LoginView1" runat="server">
        <AnonymousTemplate>
            <asp:Login ID="Login1" runat="server" style="margin:auto;" Width="182px"
                DisplayRememberMe="true" OnAuthenticate="Login1_Authenticate"
                OnLoggedIn="Login1_LoggedIn"
                PasswordRecoveryUrl="RecoverPassword.aspx">
                <LayoutTemplate>
                    <asiweb:PanelTemplateControl id="PanelTemplate1" runat="server" TemplateTitle="iMIS Logon" Collapsible="false" DefaultButton="Login" FieldSet="true">                       
                        <span class="Error" style="width:99%; text-align:center;">
                            <asp:Literal ID="FailureText" runat="server" />
                        </span>
                        <div class="PanelField AutoWidth">
                            <asp:Label ID="UserNameLabel" runat="server" Text="Username" AssociatedControlID="UserName" style="width:6em !important;" />
                            <div class="PanelFieldValue">
                                <asp:TextBox ID="UserName" runat="server" style="width:9.5em;" />
<asp:requiredfieldvalidator Display="Dynamic" CssClass="Error" id="UserNameRequired" runat="server" ControlToValidate="UserName" Text="*"></asp:requiredfieldvalidator>
                            </div>
                        </div>
                        <div class="PanelField AutoWidth">
                            <asp:Label ID="PasswordLabel" runat="server" Text="Password" AssociatedControlID="Password" style="width:6em !important;" />
                            <div class="PanelFieldValue">
                                <asp:TextBox TextMode="Password" ID="Password" runat="server" style="width:9.5em;" /> <asp:requiredfieldvalidator Display="Dynamic" CssClass="Error" id="PasswordRequired" runat="server" ControlToValidate="Password" Text="*"></asp:requiredfieldvalidator>
                            </div>
                        </div>
                        <div id="Div1" class="" runat="server" visible="<%# ShowRememberMe() %>" style="text-align:left;">
                            <asp:CheckBox ID="RememberMe" visible="true" runat="server" Text="Remember me on this computer." />
                        </div>
                        <div class="PanelField" style="text-align:right; margin-left: auto; border-bottom: none;">
                            <asiweb:StyledButton ID="Login" CommandName="Login" runat="server" CausesValidation="true" UseSubmitBehavior="true" />
                        </div>
                        <div class="PanelField" style="text-align:left; border-bottom: none;">
                            <asp:HyperLink ID="ForgotMyLogonLink" visible="false" runat="server" NavigateUrl="<%# ForgotLogonURL() %>" Text="Forgot my logon"></asp:HyperLink>
                        </div>
                        <div class="PanelField" style="text-align:left; border-bottom: none;">
                            <asp:HyperLink ID="RecoverPasswordLink" visible="false" runat="server" NavigateUrl="<%# RecoverPasswordURL() %>" Text=""></asp:HyperLink>
                        </div>
                        <div class="PanelField" style="text-align:left;">
                            <asp:HyperLink ID="CreateAnAccountLink" visible="false" runat="server" NavigateUrl="<%# CreateAccountURL() %>" Text="Create a new account"></asp:HyperLink>
                        </div>
                        <div class="PanelField" style="text-align:right; margin-left: auto;">
                            <asp:Image visible="false" ID="iMISOrangeImage" runat="server" SkinID="LoginImage" />
                        </div>
                    </asiweb:PanelTemplateControl>
                </LayoutTemplate>
                </asp:Login>
        </AnonymousTemplate>
        <LoggedInTemplate>
            <div><asp:LoginName runat="server" visible="true" ID="LoginName1" /></div>
            <asp:Panel runat="server" visible="false" ID="UsernameChangePanel">
            <table cellspacing="0" cellpadding="1" border="0" style="border-collapse:collapse;background:red">
                <tr>
                 <td><table cellpadding="0" border="0" style="display:none;">
                  <tr>
                   <td align="center" colspan="2"><asp:Label runat="server" ID="UsernameInstructionLabel"></asp:Label></td>
                  </tr><tr>
                   <td align="right"><asp:Label runat="server" ID="UsernameLabel"></asp:Label></td><td><asp:TextBox runat="server" ID="UsernameTextBox"></asp:TextBox></td>
                  </tr><tr>
                   <td align="right"><asp:Label runat="server" ID="PasswordLabel"></asp:Label></td><td><asp:TextBox runat="server" ID="PasswordTextBox" TextMode="Password"></asp:TextBox></td>
                  </tr><tr>
                   <td align="center" colspan="2"><asp:Button runat="server" ID="ChangeUsernameButton" OnClick="ChangeUsername_Click" /></td>
                  </tr><tr>
                   <td align="center" colspan="2"><asp:Label runat="server" ID="UsernameMessageLabel" /></td>
                  </tr>
                 </table></td>
                </tr>
            </table>           
            </asp:Panel>
<!--            <div><asp:ChangePassword ID="ChangePassword1" runat="server"></asp:ChangePassword></div> -->
            <div><asp:LoginStatus ID="LoginStatus1" runat="server" OnLoggedOut="LoginStatus1_LoggedOut" /></div>
        </LoggedInTemplate>
    </asp:LoginView>
    </ContentTemplate>
</asp:UpdatePanel>    
           
</div>
 

worked like a charm

thank you so much!

Thank you very

Thank you very much.

Sapna

 

search and login form on master page

Hi,

I have a search box and a login form on all of my webpage. When I type in a search term and hit the Enter key, the login form take control. I used javascript so the search form gets the focus when a search term has been entered but it is quircky. Does anyone have any suggestions?

I am using a custom template.

Thanks!

Aby

You can capture all

You can capture all keystrokes using onkeydown event. so when user hit enter key, key code value will be passed as 13 . You can submit search form automatically by the below script.,

Make sure your search form must have an id attribute called mySearchForm to work the below script

onkeydown="if ((event.which && event.which == 13) ||
    (event.keyCode && event.keyCode == 13))
    {document.mySearchForm.submit();return false;}
    else return true;"