[Cluster-devel] conga/luci/storage form-macros

kupcevic at sourceware.org kupcevic at sourceware.org
Fri Oct 6 22:59:26 UTC 2006


CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic at sourceware.org	2006-10-06 22:59:26

Modified files:
	luci/storage   : form-macros 

Log message:
	luci storage: display allowed size range

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.6&r2=1.7

--- conga/luci/storage/form-macros	2006/10/06 22:08:13	1.6
+++ conga/luci/storage/form-macros	2006/10/06 22:59:26	1.7
@@ -189,10 +189,6 @@
        </td>
        <td>
         <select name="preferred_size_units" onchange="this.form.submit()">
-         <option value="bytes" 
-                 tal:attributes="selected python:preferred_size_units == 'bytes'">Bytes</option>
-         <option value="KB" 
-                 tal:attributes="selected python:preferred_size_units == 'KB'">KB - KiloBytes</option>
          <option value="MB" 
                  tal:attributes="selected python:preferred_size_units == 'MB'">MB - MegaBytes</option>
          <option value="GB" 
@@ -827,13 +823,19 @@
           
           
           
-          <input tal:condition="python:prop_type == 'int' and prop_units != 'bytes'"
-                 tal:attributes="name   p; 
-                                 type   string:text; 
-                                 value  prop/value;
-                                 onblur python:'validate_int(this, 2, ' + str(prop['validation']['min']) + ', ' + str(prop['validation']['max']) + ', ' + str(prop['validation']['step']) + ', \'' + prop_units + '\', \'' + form_submit_button_id + '\')'"
-                 onkeypress="return validate_int_keypress(this, event, 2)"/>
-          <span tal:condition="python:prop_type == 'int' and prop_units == 'bytes'">
+          <span tal:omit-tag=""
+                tal:condition="python:prop_type == 'int' and prop_units != 'bytes'">
+           <input tal:attributes="name   p; 
+                                  type   string:text; 
+                                  size   string:15; 
+                                  value  prop/value;
+                                  onblur python:'validate_int(this, 2, ' + str(prop['validation']['min']) + ', ' + str(prop['validation']['max']) + ', ' + str(prop['validation']['step']) + ', \'' + prop_units + '\', \'' + form_submit_button_id + '\')'"
+                  onkeypress="return validate_int_keypress(this, event, 2)"/>
+           (<span tal:replace="prop/validation/min"/> - <span tal:replace="prop/validation/max"/>)
+           <span tal:replace="prop_units"/>
+          </span>
+          <span tal:omit-tag=""
+                tal:condition="python:prop_type == 'int' and prop_units == 'bytes'">
            <span tal:define="bytes  prop/value;
                              dummy  python:here.bytes_to_value_prefunits(bytes);
                              value  python:dummy[0];
@@ -841,11 +843,13 @@
                              minim  python:here.convert_bytes(prop['validation']['min'], units);
                              maxim  python:here.convert_bytes(prop['validation']['max'], units);
                              step   python:here.convert_bytes(prop['validation']['step'], units)">
-            <input tal:attributes="name   p; 
-                                   type   string:text; 
+            <input tal:attributes="name   p;
+                                   type   string:text;
+                                   size   string:15; 
                                    value  value;
                                    onblur python:'validate_float(this, 2, ' + str(minim) + ', ' + str(maxim) + ', ' + str(step) + ', \'' + units + '\', \'' + form_submit_button_id + '\')'"
                    onkeypress="return validate_float_keypress(this, event, 2)"/>
+            (<span tal:replace="minim"/> - <span tal:replace="maxim"/>)
             <span tal:replace="units"/>
            </span>
           </span>




More information about the Cluster-devel mailing list