MDL-31496 mod_data Replacing inline styles for CSS classes in text inputs
authorDavid Monllao <davidm@moodle.com>
Mon, 20 Aug 2012 09:17:24 +0000 (17:17 +0800)
committerDavid Monllao <davidm@moodle.com>
Mon, 20 Aug 2012 09:17:24 +0000 (17:17 +0800)
mod/data/field/picture/mod.html
mod/data/field/textarea/mod.html
mod/data/styles.css

index 4b32474..2ea0778 100644 (file)
         <td class="c0"><label for="param1">
             <?php echo get_string('fieldwidthsingleview', 'data');?></label></td>
         <td class="c1">
-            <input style="width:70px;" type="text" name="param1" id="param1" value="<?php if (!empty($this->field->param1)) p($this->field->param1); ?>" />
+            <input class="picturefieldsize" type="text" name="param1" id="param1" value="<?php if (!empty($this->field->param1)) p($this->field->param1); ?>" />
         </td>
     </tr>
     <tr>
         <td class="c0"><label for="param2">
             <?php echo get_string('fieldheightsingleview', 'data');?></label></td>
         <td class="c1">
-            <input style="width:70px;" type="text" name="param2" id="param2" value="<?php if (!empty($this->field->param2)) p($this->field->param2); ?>" />
+            <input class="picturefieldsize" type="text" name="param2" id="param2" value="<?php if (!empty($this->field->param2)) p($this->field->param2); ?>" />
         </td>
     </tr>
     <tr>
         <td class="c0"><label for="param4">
             <?php echo get_string('fieldwidthlistview', 'data');?></label></td>
-        <td class="c1"><input style="width:70px;" type="text" name="param4" id="param4" value="<?php if (!empty($this->field->param4)) p($this->field->param4); ?>" />
+        <td class="c1"><input class="picturefieldsize" type="text" name="param4" id="param4" value="<?php if (!empty($this->field->param4)) p($this->field->param4); ?>" />
         </td>
     </tr>
     <tr>
         <td class="c0"><label for="param5">
             <?php echo get_string('fieldheightlistview', 'data');?></label></td>
         <td class="c1">
-            <input style="width:70px;" type="text" name="param5" id="param5" value="<?php if (!empty($this->field->param5)) p($this->field->param5); ?>" />
+            <input class="picturefieldsize" type="text" name="param5" id="param5" value="<?php if (!empty($this->field->param5)) p($this->field->param5); ?>" />
         </td>
     </tr>
     <tr>
index fb68424..e75365a 100644 (file)
@@ -14,7 +14,7 @@
         <td class="c0"><label for="param2">
             <?php echo get_string('fieldwidth', 'data'); ?></label></td>
         <td class="c1">
-            <input style="width:50px;" type="text" name="param2" id="param2" value=
+            <input class="textareafieldsize" type="text" name="param2" id="param2" value=
             <?php
                 if (empty($this->field->param2)) {
                     echo('"60"');
@@ -28,7 +28,7 @@
         <td class="c0"><label for="param3">
             <?php echo get_string('fieldheight', 'data'); ?></label></td>
         <td class="c1">
-            <input style="width:50px;" type="text" name="param3" id="param3" value=
+            <input class="textareafieldsize" type="text" name="param3" id="param3" value=
             <?php
                 if (empty($this->field->param3)) {
                     echo('"35"');
index b9636ac..ba002fd 100644 (file)
     width:300px;
     height:150px;
 }
+.path-mod-data-field input.textareafieldsize {
+    width:50px;
+}
+.path-mod-data-field input.picturefieldsize {
+    width:70px;
+}
 
 /** UI Usability Hacks **/
 #page-mod-data-export #notice span {padding:0 10px;}