From 3c01acacc0e8a4794f2b925bda80632334fb3ab4 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 15 Aug 2008 14:56:27 +0000 Subject: Closes #224: Install now using failsafe views. Please test from scratch (including blanking setup) and make sure it works for you! git-svn-id: https://code.elgg.org/elgg/trunk@1940 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/failsafe/input/button.php | 41 +++++++++++++++++++++++++++++ views/failsafe/input/checkboxes.php | 49 ++++++++++++++++++++++++++++++++++ views/failsafe/input/form.php | 31 ++++++++++++++++++++++ views/failsafe/input/hidden.php | 20 ++++++++++++++ views/failsafe/input/longtext.php | 25 ++++++++++++++++++ views/failsafe/input/pulldown.php | 52 +++++++++++++++++++++++++++++++++++++ views/failsafe/input/reset.php | 27 +++++++++++++++++++ views/failsafe/input/submit.php | 27 +++++++++++++++++++ views/failsafe/input/text.php | 27 +++++++++++++++++++ 9 files changed, 299 insertions(+) create mode 100644 views/failsafe/input/button.php create mode 100644 views/failsafe/input/checkboxes.php create mode 100644 views/failsafe/input/form.php create mode 100644 views/failsafe/input/hidden.php create mode 100644 views/failsafe/input/longtext.php create mode 100644 views/failsafe/input/pulldown.php create mode 100644 views/failsafe/input/reset.php create mode 100644 views/failsafe/input/submit.php create mode 100644 views/failsafe/input/text.php (limited to 'views/failsafe/input') diff --git a/views/failsafe/input/button.php b/views/failsafe/input/button.php new file mode 100644 index 000000000..9a72f38b0 --- /dev/null +++ b/views/failsafe/input/button.php @@ -0,0 +1,41 @@ +wwwroot)===false) $src = ""; // blank src if trying to access an offsite image. +?> + value="" src="" class="" /> \ No newline at end of file diff --git a/views/failsafe/input/checkboxes.php b/views/failsafe/input/checkboxes.php new file mode 100644 index 000000000..ff3ab8523 --- /dev/null +++ b/views/failsafe/input/checkboxes.php @@ -0,0 +1,49 @@ + $option) { + //if (!in_array($option,$vars['value'])) { + if (is_array($vars['value'])) { + if (!in_array($option,$vars['value'])) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } else { + if ($option != $vars['value']) { + $selected = ""; + } else { + $selected = "checked = \"checked\""; + } + } + $labelint = (int) $label; + if ("{$label}" == "{$labelint}") { + $label = $option; + } + + $disabled = ""; + if ($vars['disabled']) $disabled = ' disabled="yes" '; + echo "
"; + } + +?> \ No newline at end of file diff --git a/views/failsafe/input/form.php b/views/failsafe/input/form.php new file mode 100644 index 000000000..a640619bb --- /dev/null +++ b/views/failsafe/input/form.php @@ -0,0 +1,31 @@ + +
id="" name="" action="" method="" > + +
\ No newline at end of file diff --git a/views/failsafe/input/hidden.php b/views/failsafe/input/hidden.php new file mode 100644 index 000000000..4ff9f31da --- /dev/null +++ b/views/failsafe/input/hidden.php @@ -0,0 +1,20 @@ + + name="" value="" /> \ No newline at end of file diff --git a/views/failsafe/input/longtext.php b/views/failsafe/input/longtext.php new file mode 100644 index 000000000..85c3f8186 --- /dev/null +++ b/views/failsafe/input/longtext.php @@ -0,0 +1,25 @@ + + + \ No newline at end of file diff --git a/views/failsafe/input/pulldown.php b/views/failsafe/input/pulldown.php new file mode 100644 index 000000000..96b4d19aa --- /dev/null +++ b/views/failsafe/input/pulldown.php @@ -0,0 +1,52 @@ + "option" where "value" is an internal name and "option" is + * the value displayed on the button. Replaces $vars['options'] when defined. + */ + + + $class = $vars['class']; + if (!$class) $class = "input-pulldown"; + +?> + + + \ No newline at end of file diff --git a/views/failsafe/input/reset.php b/views/failsafe/input/reset.php new file mode 100644 index 000000000..6aa9d1c82 --- /dev/null +++ b/views/failsafe/input/reset.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/views/failsafe/input/submit.php b/views/failsafe/input/submit.php new file mode 100644 index 000000000..591a43998 --- /dev/null +++ b/views/failsafe/input/submit.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/views/failsafe/input/text.php b/views/failsafe/input/text.php new file mode 100644 index 000000000..a6045cf4c --- /dev/null +++ b/views/failsafe/input/text.php @@ -0,0 +1,27 @@ + + + name="" value="" class=""/> \ No newline at end of file -- cgit v1.2.3