1. opensymphony
  2. webwork

Commits

plightbo  committed dd9e69c

minor UI tweaks and removal of velocity nags

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@645573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 0ef29e3
  • Branches master

Comments (0)

Files changed (10)

File src/java/template/simple/checkbox.vm

View file
  • Ignore whitespace
 <input type="checkbox" name="$!webwork.htmlEncode($parameters.name)" value="$!webwork.htmlEncode($parameters.fieldValue)"
 #if ($parameters.nameValue)        checked="checked"                                        #end
-#if ($parameters.disabled == true) disabled="disabled"                                      #end
+#if ($parameters.disabled && $parameters.disabled == true)
+                                   disabled="disabled"                                      #end
 #if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
 #if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end
 #if ($parameters.cssClass)         class="$!webwork.htmlEncode($parameters.cssClass)"       #end

File src/java/template/simple/combobox.vm

View file
  • Ignore whitespace
 #if ($parameters.size)             size="$!webwork.htmlEncode($parameters.size)"            #end
 #if ($parameters.maxlength)        maxlength="$!webwork.htmlEncode($parameters.maxlength)"  #end
 #if ($parameters.nameValue)        value="$!webwork.htmlEncode($parameters.nameValue)"      #end
-#if ($parameters.disabled == true) disabled="disabled"                                      #end
+#if ($parameters.disabled && $parameters.disabled == true)
+                                   disabled="disabled"                                      #end
 #if ($parameters.readonly)         readonly="readonly"                                      #end
 #if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
 #if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end

File src/java/template/simple/file.vm

View file
  • Ignore whitespace
                                    name="$!webwork.htmlEncode($parameters.name)"
 #if ($parameters.size)             size="$!webwork.htmlEncode($parameters.size)"            #end
 #if ($parameters.nameValue)        value="$!webwork.htmlEncode($parameters.nameValue)"      #end
-#if ($parameters.disabled == true) disabled="disabled"                                      #end
+#if ($parameters.disabled && $parameters.disabled == true) 
+                                   disabled="disabled"                                      #end
 #if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end
 #if ($parameters.accept)           accept="$!webwork.htmlEncode($parameters.accept)"        #end
 #if ($parameters.cssClass)         class="$!webwork.htmlEncode($parameters.cssClass)"       #end

File src/java/template/simple/form-close.vm

View file
  • Ignore whitespace
 </form>
-#if ($parameters.validate)
-    <script type="text/javascript">
-    function ${parameters.name}_validate() {
-        var form = document.forms['${parameters.name}'];
-        var focus = ${parameters.name}_validate_actual();
-        if (focus != null) {
-            form.elements[focus].focus();
-            if (form.elements[focus].type == 'text' || form.elements[focus].type == 'textarea') {
-                form.elements[focus].select();
-            }
-            return false;
-        } else {
-            return true;
-        }
-    }
-
-    function ${parameters.name}_validate_actual() {
-        var form = document.forms['${parameters.name}'];
-        $parameters.javascriptValidation
-        return null;
-    }
-    </script>
-#end

File src/java/template/simple/form.vm

View file
  • Ignore whitespace
 #if ($parameters.target)    target="$!webwork.htmlEncode($parameters.target)"   #end
 #if ($parameters.method)    method="$!webwork.htmlEncode($parameters.method)"   #end
 #if ($parameters.enctype)   enctype="$!webwork.htmlEncode($parameters.enctype)" #end
-#if ($parameters.validate)  onsubmit="return(${parameters.name}_validate())"    #end
 #if ($parameters.cssClass)  class="$!webwork.htmlEncode($parameters.cssClass)"  #end
 #if ($parameters.cssStyle)  style="$!webwork.htmlEncode($parameters.cssStyle)"  #end
 >

File src/java/template/simple/password.vm

View file
  • Ignore whitespace
                                    name="$!webwork.htmlEncode($parameters.name)"
 #if ($parameters.size)             size="$!webwork.htmlEncode($parameters.size)"            #end
 #if ($parameters.maxlength)        maxlength="$!webwork.htmlEncode($parameters.maxlength)"  #end
-
-#if ($parameters.nameValue && $parameters.showPassword == true)
+#if ($parameters.nameValue && $parameters.showPassword && $parameters.showPassword == true)
                                    value="$!webwork.htmlEncode($parameters.nameValue)"      #end
-
-#if ($parameters.disabled == true) disabled="disabled"                                      #end
+#if ($parameters.disabled && $parameters.disabled == true)
+                                   disabled="disabled"                                      #end
 #if ($parameters.readonly)         readonly="readonly"                                      #end
 #if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
 #if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end

File src/java/template/simple/text.vm

View file
  • Ignore whitespace
 #if ($parameters.size)             size="$!webwork.htmlEncode($parameters.size)"            #end
 #if ($parameters.maxlength)        maxlength="$!webwork.htmlEncode($parameters.maxlength)"  #end
 #if ($parameters.nameValue)        value="$!webwork.htmlEncode($parameters.nameValue)"      #end
-#if ($parameters.disabled == true) disabled="disabled"                                      #end
+#if ($parameters.disabled && $parameters.disabled == true)
+                                   disabled="disabled"                                      #end
 #if ($parameters.readonly)         readonly="readonly"                                      #end
 #if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
 #if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end

File src/java/template/simple/textarea.vm

View file
  • Ignore whitespace
           rows="$!webwork.htmlEncode($parameters.rows)"
 #if ($parameters.nameValue)        value="$!webwork.htmlEncode($parameters.nameValue)"      #end
 #if ($parameters.wrap)             value="$!webwork.htmlEncode($parameters.wrap)"           #end
-#if ($parameters.disabled == true) disabled="disabled"                                      #end
+#if ($parameters.disabled && $parameters.disabled== true)
+                                   disabled="disabled"                                      #end
 #if ($parameters.readonly)         readonly="readonly"                                      #end
 #if ($parameters.tabindex)         tabindex="$!webwork.htmlEncode($parameters.tabindex)"    #end
 #if ($parameters.id)               id="$!webwork.htmlEncode($parameters.id)"                #end

File src/java/template/xhtml/controlfooter.vm

View file
  • Ignore whitespace
-</td>
+$!{parameters.after}</td>
 </tr>

File src/java/template/xhtml/controlheader.vm

View file
  • Ignore whitespace
 ## if the label position is top,
 ## then give the label it's own row in the table
 <tr>
-#if ($parameters.labelposition == 'top')<td align="left" valign="top" colspan="2">#else<td align="right" valign="top">#end#if ($parameters.label)<label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end#if ($hasFieldErrors) class="errorLabel"#else class="label"#end>#if ($parameters.required)<span class="required">*</span>#end$!webwork.htmlEncode($parameters.label):</label>#end</td>
+#if ($parameters.labelposition && $parameters.labelposition == 'top')<td align="left" valign="top" colspan="2">#else<td align="right" valign="top">#end#if ($parameters.label)<label #if ($parameters.id) for="$!webwork.htmlEncode($parameters.id)"#end#if ($hasFieldErrors) class="errorLabel"#else class="label"#end>#if ($parameters.required)<span class="required">*</span>#end$!webwork.htmlEncode($parameters.label):</label>#end</td>
 ## add the extra row
-#if ($parameters.labelposition == 'top')
+#if ($parameters.labelposition && $parameters.labelposition == 'top')
 </tr>
 <tr>
 #end