[CLOSED] PasswordMask information

  1. #1

    [CLOSED] PasswordMask information

    Hi,

    Can't find not much info about the PasswordMask plugin.

    I would send a dutch warning message instead of "Password must contain digits. Password is too short"

    Is this possible ?

    This is my current code:

    
    <%@ Page Language="C#" %><%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Meldinggroep</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <ext:ResourceManager ID="rsmMeldingGroep" runat="server" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="Fit">
            <Items>
                <ext:FormPanel ID="fpPassword" runat="server" Title="" Frame="true" BodyPadding="5"
                    AutoScroll="true" IDMode="Static" Layout="AnchorLayout">
                    <FieldDefaults LabelWidth="130" AllowBlank="false"/>
                    <Items>
                    <ext:TextField 
                        ID="tfOriginal" 
                        runat="server"                    
                        FieldLabel="Bestaand wachtwoord"
                        AnchorHorizontal="100%" ValidateOnBlur="false" ValidateOnChange="false"
                        MsgTarget="Side">
                        <Plugins>
                            <ext:PasswordMask runat="server" AllowAnyChars="true"/>
                            <ext:CapsLockDetector ID="ckdOriginal" runat="server">
                                <Listeners>
                                    <CapsLockOn Handler="#{tfOriginal}.showIndicator({iconCls : '#Error', tip : 'CapsLock is actief'});" />
                                    <CapsLockOff Handler="#{tfOriginal}.hideIndicator();" />
                                </Listeners>
                            </ext:CapsLockDetector>
                        </Plugins>
                        </ext:TextField>
                    <ext:TextField 
                        ID="tfNew" 
                        runat="server"                    
                        FieldLabel="Nieuw wachtwoord"
                        AnchorHorizontal="100%"
                        MsgTarget="Side"
                        >
                            <Listeners>
                                <ValidityChange Handler="this.next().validate();" />
                                <Blur Handler="this.next().validate();" />
                            </Listeners>
                        <Plugins>
                            <ext:PasswordMask runat="server" AllowAnyChars="true" />
                            <ext:CapsLockDetector ID="cldNew" runat="server">
                                <Listeners>
                                    <CapsLockOn Handler="#{tfNew}.showIndicator({iconCls : '#Error', tip : 'CapsLock is actief'});" />
                                    <CapsLockOff Handler="#{tfNew}.hideIndicator();" />
                                </Listeners>
                            </ext:CapsLockDetector>
                        </Plugins>
                        </ext:TextField>
                    <ext:TextField ID="tfRepeat" 
                        runat="server"                     
                        Vtype="password"
                        VtypeText="Wachtwoorden zijn niet gelijk"
                        FieldLabel="Herhaal wachtwoord"
                        MsgTarget="Side"
                        AnchorHorizontal="100%">     
                        <CustomConfig>
                            <ext:ConfigItem Name="initialPassField" Value="tfNew" Mode="Value" />
                        </CustomConfig>   
                        <Plugins>
                            <ext:PasswordMask runat="server" AllowAnyChars="true"/>
                            <ext:CapsLockDetector ID="cldRepeat" runat="server">
                                <Listeners>
                                    <CapsLockOn Handler="#{tfRepeat}.showIndicator({iconCls : '#Error', tip : 'CapsLock is actief'});" />
                                    <CapsLockOff Handler="#{tfRepeat}.hideIndicator();" />
                                </Listeners>
                            </ext:CapsLockDetector>
                        </Plugins>                   
                    </ext:TextField>     
                    </Items>
                    <Buttons>
                        <ext:Button ID="tbOpslaan" runat="server" Text="Opslaan" Icon="Disk">
                           <%-- <Listeners>
                                <Click Handler="var valid= #{fpPassword}.getForm().isValid(); if (valid) App.direct.OpslaanPassword();" />
                            </Listeners>--%>
                        </ext:Button>
                    </Buttons>
                </ext:FormPanel>
            </Items>
        </ext:Viewport>
        </form>
    </body>
    </html>
    Last edited by Daniil; Sep 17, 2013 at 5:30 AM. Reason: [CLOSED]
  2. #2
    Vladimir Shcheglov
    Sr. Developer
  3. #3
  4. #4
    Vlad,

    Used your code, but getting this error:

    "Unsupported type: System.Collections.Specialized.StringDictionary. Use the JsonSerializer class to get the object's JSON representation. Path ''.

    My code:

     PasswordMask mask = pwmNew;
    
    
                System.Collections.Specialized.StringDictionary messages = new System.Collections.Specialized.StringDictionary();
                messages["pass"] = "wachtwoord";
                messages["and"] = "en";
                messages["passTooShort"] = "Wachtwoord te kort. (min. lengte: {0})";
                messages["digits"] = "cijfers";
                messages["letters"] = "letters";
                //pwmOriginal.Messages = messages;
                mask.Messages = messages;
                //pwmRepeat.Messages = messages;

    Did i forget something ?

    Marti
  5. #5
    Thanks for the report, fixed in SVN
    Please note that StringDictionary type is replaced by Ext.Net.JsonObject (other code is not changed)
    Vladimir Shcheglov
    Sr. Developer
  6. #6
    Quote Originally Posted by Vladimir View Post
    Thanks for the report, fixed in SVN
    Please note that StringDictionary type is replaced by Ext.Net.JsonObject (other code is not changed)

    Will update. Thanks !

    Martin

Similar Threads

  1. Get Users Information
    By rsaldanhabr in forum 1.x Help
    Replies: 6
    Last Post: Mar 13, 2013, 4:32 PM
  2. Get GridPanel's Column Information in 2.1 version
    By shaileshsakaria in forum 2.x Help
    Replies: 1
    Last Post: Feb 20, 2013, 1:56 PM
  3. More Information Required
    By geoffrey.mcgill in forum Open Discussions
    Replies: 0
    Last Post: Sep 23, 2010, 8:08 PM
  4. Need information about AjaxEventConfirmation
    By jjmanuel in forum 1.x Help
    Replies: 1
    Last Post: May 05, 2009, 2:14 PM
  5. Replies: 0
    Last Post: Oct 30, 2008, 10:12 PM

Posting Permissions