aboutsummaryrefslogtreecommitdiff
path: root/views/failsafe/input
diff options
context:
space:
mode:
Diffstat (limited to 'views/failsafe/input')
-rw-r--r--views/failsafe/input/access.php100
-rw-r--r--views/failsafe/input/checkboxes.php78
-rw-r--r--views/failsafe/input/longtext.php38
-rw-r--r--views/failsafe/input/pulldown.php70
-rw-r--r--views/failsafe/input/text.php38
5 files changed, 162 insertions, 162 deletions
diff --git a/views/failsafe/input/access.php b/views/failsafe/input/access.php
index d83b265ce..74fc56ddf 100644
--- a/views/failsafe/input/access.php
+++ b/views/failsafe/input/access.php
@@ -1,51 +1,51 @@
-<?php
-
- /**
- * Elgg access level input
- * Displays a pulldown input field
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @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
- *
- */
-
- if (isset($vars['class'])) $class = $vars['class'];
- if (!$class) $class = "input-access";
-
- if ((!isset($vars['options'])) || (!is_array($vars['options'])))
- {
- $vars['options'] = array();
- $vars['options'] = get_write_access_array();
- }
-
- if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
-
-?>
-
-<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; ?>">
-<?php
-
- foreach($vars['options'] as $key => $option) {
- if ($key != $vars['value']) {
- echo "<option value=\"{$key}\">{$option}</option>";
- } else {
- echo "<option value=\"{$key}\" selected=\"selected\">{$option}</option>";
- }
- }
-
-?>
-</select>
-
-<?php
-
- }
-
+<?php
+
+ /**
+ * Elgg access level input
+ * Displays a pulldown input field
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @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
+ *
+ */
+
+ if (isset($vars['class'])) $class = $vars['class'];
+ if (!$class) $class = "input-access";
+
+ if ((!isset($vars['options'])) || (!is_array($vars['options'])))
+ {
+ $vars['options'] = array();
+ $vars['options'] = get_write_access_array();
+ }
+
+ if (is_array($vars['options']) && sizeof($vars['options']) > 0) {
+
+?>
+
+<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; ?>">
+<?php
+
+ foreach($vars['options'] as $key => $option) {
+ if ($key != $vars['value']) {
+ echo "<option value=\"{$key}\">{$option}</option>";
+ } else {
+ echo "<option value=\"{$key}\" selected=\"selected\">{$option}</option>";
+ }
+ }
+
+?>
+</select>
+
+<?php
+
+ }
+
?> \ No newline at end of file
diff --git a/views/failsafe/input/checkboxes.php b/views/failsafe/input/checkboxes.php
index 46894c5cb..0e394af55 100644
--- a/views/failsafe/input/checkboxes.php
+++ b/views/failsafe/input/checkboxes.php
@@ -1,49 +1,49 @@
-<?php
-
- /**
- * Elgg checkbox input
- * Displays a checkbox input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg checkbox input
+ * Displays a checkbox input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @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['options'] An array of strings representing the options for the checkbox field
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @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['options'] An array of strings representing the options for the checkbox field
+ *
+ */
$class = $vars['class'];
if (!$class) $class = "input-checkboxes";
-
- foreach($vars['options'] as $label => $option) {
- //if (!in_array($option,$vars['value'])) {
- if (is_array($vars['value'])) {
- if (!in_array($option,$vars['value'])) {
- $selected = "";
- } else {
- $selected = "checked = \"checked\"";
- }
+
+ foreach($vars['options'] as $label => $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;
+ 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 "<label><input type=\"checkbox\" $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" {$selected} value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
- }
-
+ if ($vars['disabled']) $disabled = ' disabled="yes" ';
+ echo "<label><input type=\"checkbox\" $disabled {$vars['js']} name=\"{$vars['internalname']}[]\" {$selected} value=\"".htmlentities($option, ENT_QUOTES, 'UTF-8')."\" {$selected} class=\"$class\" />{$label}</label><br />";
+ }
+
?> \ No newline at end of file
diff --git a/views/failsafe/input/longtext.php b/views/failsafe/input/longtext.php
index 41cb395c2..c1f38fe69 100644
--- a/views/failsafe/input/longtext.php
+++ b/views/failsafe/input/longtext.php
@@ -1,25 +1,25 @@
-<?php
-
- /**
- * Elgg long text input
- * Displays a long text input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg long text input
+ * Displays a long text input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @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
- *
- */
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @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
+ *
+ */
$class = $vars['class'];
if (!$class) $class = "input-textarea";
-
-?>
-
+
+?>
+
<textarea class="<?php echo $class; ?>" 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/failsafe/input/pulldown.php b/views/failsafe/input/pulldown.php
index a0e91ce25..1adbad099 100644
--- a/views/failsafe/input/pulldown.php
+++ b/views/failsafe/input/pulldown.php
@@ -1,33 +1,33 @@
-<?php
-
- /**
- * Elgg pulldown input
- * Displays a pulldown input field
- *
- * @package Elgg
- * @subpackage Core
-
- * @author Curverider Ltd
-
- * @link http://elgg.org/
- *
- * @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['options'] An array of strings representing the options for the pulldown field
+<?php
+
+ /**
+ * Elgg pulldown input
+ * Displays a pulldown input field
+ *
+ * @package Elgg
+ * @subpackage Core
+
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @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['options'] An array of strings representing the options for the pulldown field
* @uses $vars['options_values'] An associative array of "value" => "option" where "value" is an internal name and "option" is
- * the value displayed on the button. Replaces $vars['options'] when defined.
- */
+ * the value displayed on the button. Replaces $vars['options'] when defined.
+ */
$class = $vars['class'];
if (!$class) $class = "input-pulldown";
-
-?>
-
-
-<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
-<?php
+
+?>
+
+
+<select name="<?php echo $vars['internalname']; ?>" <?php echo $vars['js']; ?> <?php if ($vars['disabled']) echo ' disabled="yes" '; ?> class="<?php echo $class; ?>">
+<?php
if ($vars['options_values'])
{
foreach($vars['options_values'] as $value => $option) {
@@ -39,14 +39,14 @@
}
}
else
- {
- foreach($vars['options'] as $option) {
- if ($option != $vars['value']) {
- echo "<option>{$option}</option>";
- } else {
- echo "<option selected=\"selected\">{$option}</option>";
- }
- }
- }
-?>
+ {
+ foreach($vars['options'] as $option) {
+ if ($option != $vars['value']) {
+ echo "<option>{$option}</option>";
+ } else {
+ echo "<option selected=\"selected\">{$option}</option>";
+ }
+ }
+ }
+?>
</select> \ No newline at end of file
diff --git a/views/failsafe/input/text.php b/views/failsafe/input/text.php
index 2195741f2..4c37e5219 100644
--- a/views/failsafe/input/text.php
+++ b/views/failsafe/input/text.php
@@ -1,27 +1,27 @@
-<?php
-
- /**
- * Elgg text input
- * Displays a text input field
- *
- * @package Elgg
- * @subpackage Core
+<?php
- * @author Curverider Ltd
+ /**
+ * Elgg text input
+ * Displays a text input field
+ *
+ * @package Elgg
+ * @subpackage Core
- * @link http://elgg.org/
- *
- * @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
+ * @author Curverider Ltd
+
+ * @link http://elgg.org/
+ *
+ * @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
- * @uses $vars['class'] Class override
- */
+ * @uses $vars['class'] Class override
+ */
$class = $vars['class'];
if (!$class) $class = "input-text";
-
-?>
-
+
+?>
+
<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