From 4c18a0cf43c7ab7d72532ec10814d7f55ac6b477 Mon Sep 17 00:00:00 2001 From: marcus Date: Tue, 22 Jul 2008 16:39:56 +0000 Subject: Disabled support added to forms. git-svn-id: https://code.elgg.org/elgg/trunk@1495 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/input/access.php | 2 +- views/default/input/checkboxes.php | 6 ++++-- views/default/input/file.php | 2 +- views/default/input/longtext.php | 2 +- views/default/input/password.php | 2 +- views/default/input/pulldown.php | 2 +- views/default/input/radio.php | 6 ++++-- views/default/input/tags.php | 2 +- views/default/input/text.php | 4 ++-- views/default/input/url.php | 2 +- 10 files changed, 17 insertions(+), 13 deletions(-) (limited to 'views/default/input') 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 @@ ?> - > $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 "
"; + } + + if ($vars['disabled']) $disabled = ' disabled="yes" '; + echo "
"; } ?> \ 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 @@ } ?> -name="" /> \ No newline at end of file +name="" /> \ 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 @@ ?> - \ No newline at end of file + \ 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 @@ ?> - name="" value="" /> \ No newline at end of file + name="" 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 @@ ?> - > {$label}
"; + } + + if ($vars['disabled']) $disabled = ' disabled="yes" '; + echo "
"; } ?> \ 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 @@ } ?> - name="" value="" class="input-tags"/> \ No newline at end of file + name="" value="" 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 */ ?> - name="" value="" class="input-text"/> \ No newline at end of file + name="" 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 @@ ?> - name="" value="" class="input-url"/> \ No newline at end of file + name="" value="" class="input-url"/> \ No newline at end of file -- cgit v1.2.3