Changeset 8036


Ignore:
Timestamp:
May 25, 2022, 8:31:55 AM (9 months ago)
Author:
Nicklas Nordborg
Message:

References #2278: Improvements to login page for better extensions

Added support for dynamic attributes to the LoginFormBean and FieldInfo classes.

Location:
branches/3.19-stable
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3.19-stable/src/clients/web/net/sf/basedb/clients/web/extensions/login/FieldInfo.java

    r6426 r8036  
    2222package net.sf.basedb.clients.web.extensions.login;
    2323
     24import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport;
     25
    2426/**
    2527  Information about a the login/password fields on the login form.
     
    2931*/
    3032public class FieldInfo
     33  extends DynamicActionAttributeSupport
    3134{
    3235
  • branches/3.19-stable/src/clients/web/net/sf/basedb/clients/web/extensions/login/LoginFormBean.java

    r7529 r8036  
    2222package net.sf.basedb.clients.web.extensions.login;
    2323
     24import net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport;
     25
    2426/**
    2527  A simple implementation of the {@link LoginFormAction} interface.
     
    2931*/
    3032public class LoginFormBean
     33  extends DynamicActionAttributeSupport
    3134  implements LoginFormAction
    3235{
  • branches/3.19-stable/www/main.jsp

    r7954 r8036  
    5252  import="net.sf.basedb.clients.web.extensions.login.FieldInfo"
    5353  import="net.sf.basedb.clients.web.extensions.login.PasswordLoginFormFactory"
     54  import="net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport"
    5455  import="net.sf.basedb.util.Values"
    5556  import="java.util.Date"
     
    128129  </base:head>
    129130  <base:body style="padding-top: 5em;" data-login-form="<%=HTML.encodeTags(selectedLoginForm)%>" data-requested-form="<%=HTML.encodeTags(requestedLoginForm) %>">
    130     <form name="login" action="login.jsp" method="post">
     131    <form name="login" action="login.jsp" method="post"
     132      <%=DynamicActionAttributeSupport.getAttributesString(loginAction)%>
     133    >
    131134    <input type="hidden" name="ID" value="<%=ID%>">
    132135    <input type="hidden" name="again" value="<%=again?1:0%>">
     
    195198                <%=loginAction.rememberLastLogin() ? "" : "autocomplete=\"off\" data-use-last-login=\"0\""%>
    196199                maxlength="100"
    197                 tabindex="1">
     200                tabindex="1"
     201                <%=DynamicActionAttributeSupport.getAttributesString(loginField)%>
     202                >
    198203              </td>
    199204            </tr>
     
    207212                <%=valueIfNotNull("placeholder=\"", passwordField.getPlaceHolder(), "\"") %>
    208213                maxlength="80"
    209                 tabindex="2">
     214                tabindex="2"
     215                <%=DynamicActionAttributeSupport.getAttributesString(passwordField)%>
     216                >
    210217              </td>
    211218              <td <%=extraField != null?"rowspan=\"2\"" : "" %> style="vertical-align: bottom;">
     
    237244                  <%=valueIfNotNull("placeholder=\"", extraField.getPlaceHolder(), "\"") %>
    238245                  maxlength="80"
    239                   tabindex="3">
     246                  tabindex="3"
     247                  <%=DynamicActionAttributeSupport.getAttributesString(extraField)%>
     248                  >
    240249                </td>
    241250              </tr>
  • branches/3.19-stable/www/switch.jsp

    r7954 r8036  
    3838  import="net.sf.basedb.clients.web.extensions.ExtensionsControl"
    3939  import="net.sf.basedb.clients.web.extensions.JspContext"
     40  import="net.sf.basedb.clients.web.extensions.DynamicActionAttributeSupport"
    4041  import="net.sf.basedb.clients.web.extensions.login.LoginFormAction"
    4142  import="net.sf.basedb.clients.web.extensions.login.PasswordLoginFormFactory"
     
    105106  <base:body data-login-form="<%=HTML.encodeTags(selectedLoginForm)%>" data-requested-form="<%=HTML.encodeTags(requestedLoginForm) %>">
    106107    <h1>Switch user <base:help helpid="switchuser" /></h1>
    107     <form name="login" action="login.jsp" method="post">
     108    <form name="login" action="login.jsp" method="post"
     109      <%=DynamicActionAttributeSupport.getAttributesString(loginAction)%>
     110    >
    108111    <input type="hidden" name="ID" value="<%=ID%>">
    109112    <input type="hidden" name="again" value="1">
     
    148151          data-use-last-login="0"
    149152          maxlength="100"
    150           tabindex="0">
     153          tabindex="0"
     154          <%=DynamicActionAttributeSupport.getAttributesString(loginField)%>
     155          >
    151156        </td>
    152157      </tr>
     
    159164          <%=valueIfNotNull("placeholder=\"", passwordField.getPlaceHolder(), "\"") %>
    160165          maxlength="80"
    161           tabindex="0">
     166          tabindex="0"
     167          <%=DynamicActionAttributeSupport.getAttributesString(passwordField)%>
     168          >
    162169        </td>
    163170      </tr>
     
    174181            <%=valueIfNotNull("placeholder=\"", extraField.getPlaceHolder(), "\"") %>
    175182            maxlength="80"
    176             tabindex="0">
     183            tabindex="0"
     184            <%=DynamicActionAttributeSupport.getAttributesString(extraField)%>
     185            >
    177186          </td>
    178187        </tr>
Note: See TracChangeset for help on using the changeset viewer.