Changeset 6987


Ignore:
Timestamp:
Oct 30, 2015, 9:42:18 AM (6 years ago)
Author:
Nicklas Nordborg
Message:

References #1959: Add support for password-type parameters to plug-ins

Added PasswordParameterType class which creates a <input type="password"> input field in the gui.

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/ParameterType.java

    r6372 r6987  
    203203  {
    204204    return multiplicity;
     205  }
     206 
     207  /**
     208    Should this parameter be masked in the GUI?
     209    @return FALSE, unless overridden by subclass
     210    @since 3.7
     211  */
     212  public boolean isMasked()
     213  {
     214    return false;
    205215  }
    206216 
  • trunk/www/common/plugin/configure.jsp

    r6610 r6987  
    539539                    int height = pType.getHeight() <= 0 ? 6 : pType.getHeight();
    540540                    if (height > 20) height = 20;
     541                    boolean isPassword = pType.isMasked();
    541542                    if (maxLength == null || maxLength > 255)
    542543                    {
     
    561562                      %>
    562563                      <b><%=HTML.encodeTags(param.getLabel())%></b> (String)<br>
    563                       <input class="text <%=pType.getNotNull() ? "required" : ""%>" type="text"
     564                      <input class="text <%=pType.getNotNull() ? "required" : ""%>"
     565                        type="<%=isPassword ? "password": "text"%>"
    564566                        name="<%=fieldName%>" id="<%=fieldName%>" value=""
    565567                        maxlength="<%=maxLength%>">
Note: See TracChangeset for help on using the changeset viewer.