]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Closes #540: input/* views have internalid attribute.
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 17 Jun 2009 16:46:51 +0000 (16:46 +0000)
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>
Wed, 17 Jun 2009 16:46:51 +0000 (16:46 +0000)
git-svn-id: https://code.elgg.org/elgg/trunk@3342 36083f99-b078-4883-b0ff-0f9b5a30f544

14 files changed:
views/default/input/access.php
views/default/input/button.php
views/default/input/checkboxes.php
views/default/input/email.php
views/default/input/file.php
views/default/input/hidden.php
views/default/input/longtext.php
views/default/input/password.php
views/default/input/plaintext.php
views/default/input/pulldown.php
views/default/input/radio.php
views/default/input/tags.php
views/default/input/text.php
views/default/input/url.php

index 68cfcce71066a2887446c6e59ce22fc96414d042..38a43ec8cef4a012d33799bb03b0a8fac687b8cd 100644 (file)
@@ -34,7 +34,7 @@
                         \r
 ?>\r
 \r
-<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">\r
+<select <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ((isset($vars['disabled'])) && ($vars['disabled'])) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">\r
 <?php\r
 \r
     foreach($vars['options'] as $key => $option) {\r
index 6ee4adc0dcba5dc88f3924ae01327ce008eca60b..5f48fe6a3ecac655e1ae208ab375900113af51da 100644 (file)
@@ -38,4 +38,4 @@
        if (isset($vars['src'])) $src = "src=\"{$vars['src']}\"";
        if (strpos($src,$CONFIG->wwwroot)===false) $src = ""; // blank src if trying to access an offsite image.
 ?>
-<input name="<?php echo $vars['internalname']; ?>" type="<?php echo $type; ?>" class="<?php echo $class; ?>" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" <?php echo $src; ?> />
\ No newline at end of file
+<input name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> type="<?php echo $type; ?>" class="<?php echo $class; ?>" <?php echo $vars['js']; ?> value="<?php echo $value; ?>" <?php echo $src; ?> />
\ No newline at end of file
index 3ae9c29873449ae2a25664fd32a587e931aaca8e..6a7713b010ac04139e2b8dd5d4ea2989e64f4998 100644 (file)
                $label = $option;\r
         }
         
+        if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; 
         $disabled = "";
         if ($vars['disabled']) $disabled = ' disabled="yes" '; \r
-        echo "<label><input type=\"checkbox\" $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";\r
+        echo "<label><input type=\"checkbox\" $id $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";\r
     }\r
 \r
 ?> 
\ No newline at end of file
index d9516fd2b1dd55004cabdf079f96242f04f4f463..cb38543df64a728ab0faf92ab7d8b81f926f25a8 100644 (file)
@@ -21,4 +21,4 @@
        if (!$class) $class = "input-text";\r
 ?>\r
 \r
-<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
+<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?>value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
index 58d7437ff6e7ac723d64b89cd33c0ce3adc8ceb3..3b1a43bda39199ed6d78448790ce4af07d2c9902 100644 (file)
@@ -23,4 +23,4 @@
     $class = $vars['class'];
        if (!$class) $class = "input-file";\r
 ?>\r
-<input type="file" size="30" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>" />
\ No newline at end of file
+<input type="file" size="30" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>" />
\ No newline at end of file
index 6fcd56e4aef7e00db7b634d38f79356e55be04d2..d1750b6f367fff2afd50146f1cf4a880bbb97854 100644 (file)
@@ -17,4 +17,4 @@
         * 
         */
 ?>
-<input type="hidden" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" /> 
\ No newline at end of file
+<input type="hidden" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" /> 
\ No newline at end of file
index b199ef2aa9c7aaa3270dd4236f66883b02ce4058..83c0f5a6090f4ce74d077932d18ff4415cdc3d58 100644 (file)
@@ -22,4 +22,4 @@
        \r
 ?>\r
 \r
-<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> 
\ No newline at end of file
+<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> 
\ No newline at end of file
index ecc02c365716d74143285d73d13cd7d8831c00b3..c8b7d5e06528b5ac938473e39aea162c3b78bcfc 100644 (file)
@@ -21,4 +21,4 @@
        if (!$class) $class = "input-password";\r
 ?>\r
 \r
-<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" /> 
\ No newline at end of file
+<input type="password" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>" /> 
\ No newline at end of file
index a957940cf2c1b02842e0c0e3484e65e7bed7eae5..105c8780df977a5c0813089bda3a04b770f607f2 100644 (file)
@@ -22,4 +22,4 @@
        \r
 ?>\r
 \r
-<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> 
\ No newline at end of file
+<textarea class="<?php echo $class; ?>" name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?></textarea> 
\ No newline at end of file
index 42a72259cd0653f369876e35861c150ff3d1df99..fb7619048ed277c19bb09d3c19b0e0a9bff785b3 100644 (file)
@@ -26,7 +26,7 @@
 ?>\r
 \r
 \r
-<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">\r
+<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">\r
 <?php\r
        if ($vars['options_values'])
        {
index 6dfa3a7aeaebf7780b31840181782433f726cf16..e6fcb8aa58928a312375fcceec8e51d107defd8f 100644 (file)
@@ -32,8 +32,9 @@
                $label = $option;\r
         }
         
+        if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\""; 
         if ($vars['disabled']) $disabled = ' disabled="yes" '; \r
-        echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";\r
+        echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" $id value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";\r
     }\r
 \r
 ?> 
\ No newline at end of file
index b3c69ae76bad6e99140fec99d928299c46fe9fe4..3e8bb8023fc5287f52e3824e08b64c3b8fb32472 100644 (file)
@@ -42,4 +42,4 @@
     }\r
     \r
 ?>\r
-<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?><?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($tags, ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?><?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($tags, ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
index 94559afd65354868c7c49c0f8857120548850b59..dfe7265dae5c678b001523ee092bbe8bebbece16 100644 (file)
@@ -24,4 +24,4 @@
        \r
 ?>\r
 \r
-<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/> 
\ No newline at end of file
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class ?>"/> 
\ No newline at end of file
index 1bfe04fe42e8526efc706bc6615293b333734b43..31e973eb5a45d539401baa47d061ca54a1190b79 100644 (file)
@@ -21,4 +21,4 @@
        if (!$class) $class = "input-url";\r
 ?>\r
 \r
-<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file
+<input type="text" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\""; ?> value="<?php echo htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); ?>" class="<?php echo $class; ?>"/> 
\ No newline at end of file