aboutsummaryrefslogtreecommitdiff
path: root/views/default/input
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-06-17 16:46:51 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-06-17 16:46:51 +0000
commitd57dc52041c5fdb5b4bec42d58a9791b84686d1f (patch)
tree6c82c8d4f306b3f1cc3cb64a7e437fb4d1139051 /views/default/input
parentaf7cac705174546ca6684749538e206aa509bb98 (diff)
downloadelgg-d57dc52041c5fdb5b4bec42d58a9791b84686d1f.tar.gz
elgg-d57dc52041c5fdb5b4bec42d58a9791b84686d1f.tar.bz2
Closes #540: input/* views have internalid attribute.
git-svn-id: https://code.elgg.org/elgg/trunk@3342 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input')
-rw-r--r--views/default/input/access.php2
-rw-r--r--views/default/input/button.php2
-rw-r--r--views/default/input/checkboxes.php3
-rw-r--r--views/default/input/email.php2
-rw-r--r--views/default/input/file.php2
-rw-r--r--views/default/input/hidden.php2
-rw-r--r--views/default/input/longtext.php2
-rw-r--r--views/default/input/password.php2
-rw-r--r--views/default/input/plaintext.php2
-rw-r--r--views/default/input/pulldown.php2
-rw-r--r--views/default/input/radio.php3
-rw-r--r--views/default/input/tags.php2
-rw-r--r--views/default/input/text.php2
-rw-r--r--views/default/input/url.php2
14 files changed, 16 insertions, 14 deletions
diff --git a/views/default/input/access.php b/views/default/input/access.php
index 68cfcce71..38a43ec8c 100644
--- a/views/default/input/access.php
+++ b/views/default/input/access.php
@@ -34,7 +34,7 @@
?>
-<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; ?>">
+<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; ?>">
<?php
foreach($vars['options'] as $key => $option) {
diff --git a/views/default/input/button.php b/views/default/input/button.php
index 6ee4adc0d..5f48fe6a3 100644
--- a/views/default/input/button.php
+++ b/views/default/input/button.php
@@ -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
diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php
index 3ae9c2987..6a7713b01 100644
--- a/views/default/input/checkboxes.php
+++ b/views/default/input/checkboxes.php
@@ -43,9 +43,10 @@
$label = $option;
}
+ if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\"";
$disabled = "";
if ($vars['disabled']) $disabled = ' disabled="yes" ';
- echo "<label><input type=\"checkbox\" $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+ 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 />";
}
?> \ No newline at end of file
diff --git a/views/default/input/email.php b/views/default/input/email.php
index d9516fd2b..cb38543df 100644
--- a/views/default/input/email.php
+++ b/views/default/input/email.php
@@ -21,4 +21,4 @@
if (!$class) $class = "input-text";
?>
-<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
diff --git a/views/default/input/file.php b/views/default/input/file.php
index 58d7437ff..3b1a43bda 100644
--- a/views/default/input/file.php
+++ b/views/default/input/file.php
@@ -23,4 +23,4 @@
$class = $vars['class'];
if (!$class) $class = "input-file";
?>
-<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
diff --git a/views/default/input/hidden.php b/views/default/input/hidden.php
index 6fcd56e4a..d1750b6f3 100644
--- a/views/default/input/hidden.php
+++ b/views/default/input/hidden.php
@@ -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
diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php
index b199ef2aa..83c0f5a60 100644
--- a/views/default/input/longtext.php
+++ b/views/default/input/longtext.php
@@ -22,4 +22,4 @@
?>
-<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
diff --git a/views/default/input/password.php b/views/default/input/password.php
index ecc02c365..c8b7d5e06 100644
--- a/views/default/input/password.php
+++ b/views/default/input/password.php
@@ -21,4 +21,4 @@
if (!$class) $class = "input-password";
?>
-<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
diff --git a/views/default/input/plaintext.php b/views/default/input/plaintext.php
index a957940cf..105c8780d 100644
--- a/views/default/input/plaintext.php
+++ b/views/default/input/plaintext.php
@@ -22,4 +22,4 @@
?>
-<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
diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php
index 42a72259c..fb7619048 100644
--- a/views/default/input/pulldown.php
+++ b/views/default/input/pulldown.php
@@ -26,7 +26,7 @@
?>
-<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<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; ?>">
<?php
if ($vars['options_values'])
{
diff --git a/views/default/input/radio.php b/views/default/input/radio.php
index 6dfa3a7ae..e6fcb8aa5 100644
--- a/views/default/input/radio.php
+++ b/views/default/input/radio.php
@@ -32,8 +32,9 @@
$label = $option;
}
+ if (isset($vars['internalid'])) $id = "id=\"{$vars['internalid']}\"";
if ($vars['disabled']) $disabled = ' disabled="yes" ';
- echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+ 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 />";
}
?> \ No newline at end of file
diff --git a/views/default/input/tags.php b/views/default/input/tags.php
index b3c69ae76..3e8bb8023 100644
--- a/views/default/input/tags.php
+++ b/views/default/input/tags.php
@@ -42,4 +42,4 @@
}
?>
-<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
diff --git a/views/default/input/text.php b/views/default/input/text.php
index 94559afd6..dfe7265da 100644
--- a/views/default/input/text.php
+++ b/views/default/input/text.php
@@ -24,4 +24,4 @@
?>
-<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
diff --git a/views/default/input/url.php b/views/default/input/url.php
index 1bfe04fe4..31e973eb5 100644
--- a/views/default/input/url.php
+++ b/views/default/input/url.php
@@ -21,4 +21,4 @@
if (!$class) $class = "input-url";
?>
-<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