aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--views/default/input/access.php2
-rw-r--r--views/default/input/checkboxes.php6
-rw-r--r--views/default/input/file.php2
-rw-r--r--views/default/input/longtext.php2
-rw-r--r--views/default/input/password.php2
-rw-r--r--views/default/input/pulldown.php2
-rw-r--r--views/default/input/radio.php6
-rw-r--r--views/default/input/tags.php2
-rw-r--r--views/default/input/text.php4
-rw-r--r--views/default/input/url.php2
10 files changed, 17 insertions, 13 deletions
diff --git a/views/default/input/access.php b/views/default/input/access.php
index 90ef403be..1157e45e0 100644
--- a/views/default/input/access.php
+++ b/views/default/input/access.php
@@ -27,7 +27,7 @@
?>
-<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?>>
+<select name="<?php echo $vars['internalname']; ?>" <?php if (isset($vars['js'])) echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?>>
<?php
foreach($vars['options'] as $key => $option) {
diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php
index 5039b5523..6d39d823d 100644
--- a/views/default/input/checkboxes.php
+++ b/views/default/input/checkboxes.php
@@ -36,8 +36,10 @@
$labelint = (int) $label;
if ("{$label}" == "{$labelint}") {
$label = $option;
- }
- echo "<label><input type=\"checkbox\" {$vars['js']} name=\"{$vars['internalname']}[]\" {$selected} value=\"".htmlentities($option)."\" {$selected} />{$label}</label><br />";
+ }
+
+ if ($vars['disabled']) $disabled = ' disabled="yes" ';
+ echo "<label><input type=\"checkbox\" $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" {$selected} value=\"".htmlentities($option)."\" {$selected} />{$label}</label><br />";
}
?> \ No newline at end of file
diff --git a/views/default/input/file.php b/views/default/input/file.php
index 103159566..5dde370a2 100644
--- a/views/default/input/file.php
+++ b/views/default/input/file.php
@@ -21,4 +21,4 @@
}
?>
-<input type="file" size="30" <?php echo $vars['js']; ?>name="<?php echo $vars['internalname']; ?>" /> \ No newline at end of file
+<input type="file" size="30" <?php echo $vars['js']; ?>name="<?php echo $vars['internalname']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> /> \ No newline at end of file
diff --git a/views/default/input/longtext.php b/views/default/input/longtext.php
index 06c62c855..e21c96a59 100644
--- a/views/default/input/longtext.php
+++ b/views/default/input/longtext.php
@@ -19,4 +19,4 @@
?>
-<textarea class="input-textarea" name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?>><?php echo $vars['value']; ?></textarea> \ No newline at end of file
+<textarea class="input-textarea" name="<?php echo $vars['internalname']; ?>" <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> <?php echo $vars['js']; ?>><?php echo $vars['value']; ?></textarea> \ No newline at end of file
diff --git a/views/default/input/password.php b/views/default/input/password.php
index efa0fc74b..740a1a3f0 100644
--- a/views/default/input/password.php
+++ b/views/default/input/password.php
@@ -19,4 +19,4 @@
?>
-<input type="password" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo $vars['value']; ?>" /> \ 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']; ?>" value="<?php echo $vars['value']; ?>" /> \ No newline at end of file
diff --git a/views/default/input/pulldown.php b/views/default/input/pulldown.php
index 520a62c88..081dffc2a 100644
--- a/views/default/input/pulldown.php
+++ b/views/default/input/pulldown.php
@@ -22,7 +22,7 @@
?>
-<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?>>
+<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?>>
<?php
if ($vars['options_values'])
{
diff --git a/views/default/input/radio.php b/views/default/input/radio.php
index 8f20131b2..6089b912f 100644
--- a/views/default/input/radio.php
+++ b/views/default/input/radio.php
@@ -23,8 +23,10 @@
$selected = "";
} else {
$selected = "checked = \"checked\"";
- }
- echo "<label><input type=\"radio\" {$vars['js']} name=\"{$vars['internalname']}\" value=\"".htmlentities($option)."\" {$selected} />{$label}</label><br />";
+ }
+
+ if ($vars['disabled']) $disabled = ' disabled="yes" ';
+ echo "<label><input type=\"radio\" $disabled {$vars['js']} name=\"{$vars['internalname']}\" value=\"".htmlentities($option)."\" {$selected} />{$label}</label><br />";
}
?> \ No newline at end of file
diff --git a/views/default/input/tags.php b/views/default/input/tags.php
index f9812c8cc..8a03759fd 100644
--- a/views/default/input/tags.php
+++ b/views/default/input/tags.php
@@ -39,4 +39,4 @@
}
?>
-<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($tags); ?>" class="input-tags"/> \ 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']; ?>" value="<?php echo htmlentities($tags); ?>" class="input-tags"/> \ No newline at end of file
diff --git a/views/default/input/text.php b/views/default/input/text.php
index 4b040445a..6f3b6ba4b 100644
--- a/views/default/input/text.php
+++ b/views/default/input/text.php
@@ -14,9 +14,9 @@
* @uses $vars['value'] The current value, if any
* @uses $vars['js'] Any Javascript to enter into the input tag
* @uses $vars['internalname'] The name of the input field
- *
+ * @uses $vars['disabled'] If true then control is read-only
*/
?>
-<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo htmlentities($vars['value']); ?>" class="input-text"/> \ 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']; ?>" value="<?php echo htmlentities($vars['value']); ?>" class="input-text"/> \ No newline at end of file
diff --git a/views/default/input/url.php b/views/default/input/url.php
index 2b7b7fd94..f42a43a14 100644
--- a/views/default/input/url.php
+++ b/views/default/input/url.php
@@ -19,4 +19,4 @@
?>
-<input type="text" <?php echo $vars['js']; ?> name="<?php echo $vars['internalname']; ?>" value="<?php echo $vars['value']; ?>" class="input-url"/> \ 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']; ?>" value="<?php echo $vars['value']; ?>" class="input-url"/> \ No newline at end of file