diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-08-31 19:05:21 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-08-31 19:05:21 +0000 |
commit | c5cc2821311012a8a4385a304a043c4b41f2afbb (patch) | |
tree | 3703351e4b5d56905eb52547d6129ffa14cb2a32 /views/default/input/access.php | |
parent | 775a5f08c501acc565c69659022bc31052677485 (diff) | |
download | elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.gz elgg-c5cc2821311012a8a4385a304a043c4b41f2afbb.tar.bz2 |
All line endings are now Unix-style.
git-svn-id: https://code.elgg.org/elgg/trunk@3451 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input/access.php')
-rw-r--r-- | views/default/input/access.php | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/views/default/input/access.php b/views/default/input/access.php index ccb38b54f..461fbf625 100644 --- a/views/default/input/access.php +++ b/views/default/input/access.php @@ -1,55 +1,55 @@ -<?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 (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT)
- $vars['value'] = get_default_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 <?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) {
- if ($key != $vars['value']) {
- echo "<option value=\"{$key}\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>";
- } else {
- echo "<option value=\"{$key}\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</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 (!array_key_exists('value', $vars) || $vars['value'] == ACCESS_DEFAULT) + $vars['value'] = get_default_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 <?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) { + if ($key != $vars['value']) { + echo "<option value=\"{$key}\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>"; + } else { + echo "<option value=\"{$key}\" selected=\"selected\">". htmlentities($option, ENT_QUOTES, 'UTF-8') ."</option>"; + } + } + +?> +</select> + +<?php + + } + ?>
\ No newline at end of file |