Skip to main content
aboutsummaryrefslogblamecommitdiffstats
blob: cd49b7033271c2ea82f2b6b708f6945c4fb0ad67 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                                                
                                  




































                                                                                                  
<!-- **************************************************************************
#
# Copyright  (c) 2004-2010 Oracle Corporation.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors: 
#
#    Kohsuke Kawaguchi
#        
#
#************************************************************************** --> 


<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:d="jelly:define" xmlns:st="jelly:stapler" xmlns:f="/lib/form">
  <st:documentation>
    Glorified &lt;input type="password">

    <st:attribute name="field">
      Used for databinding. TBD.
    </st:attribute>
    <st:attribute name="name">
      This becomes @name of the &lt;input> tag.
      If @field is specified, this value is inferred from it.
    </st:attribute>
    <st:attribute name="value">
      The initial value of the field. This becomes the @value of the &lt;input> tag.
      If @field is specified, the current property from the "instance" object
      will be set as the initial value automatically,
      which is the recommended approach.
    </st:attribute>
    <st:attribute name="clazz">
      Additional CSS class(es) to add (such as client-side validation clazz="required",
      "number" or "positive-number"; these may be combined, as clazz="required number").
    </st:attribute>
    <st:attribute name="checkUrl">
      If specified, the value entered in this input field will be checked (via AJAX)
      against this URL, and errors will be rendered under the text field.

      If @field is specified, this will be inferred automatically,
      which is the recommended approach.
    </st:attribute>
  </st:documentation>
  <f:prepareDatabinding />
  <m:input xmlns:m="jelly:hudson.util.jelly.MorphTagLibrary"
         class="setting-input ${attrs.checkUrl!=null?'validated ':''}${attrs.clazz}"
         name ="${attrs.name ?: '_.'+attrs.field}"
         value="${h.getPasswordValue(attrs.value ?: instance[attrs.field])}"
         type="password"
         ATTRIBUTES="${attrs}" EXCEPT="field clazz" />
</j:jelly>

Back to the top