aboutsummaryrefslogtreecommitdiff
path: root/views/installation/input/button.php
diff options
context:
space:
mode:
Diffstat (limited to 'views/installation/input/button.php')
-rw-r--r--views/installation/input/button.php37
1 files changed, 13 insertions, 24 deletions
diff --git a/views/installation/input/button.php b/views/installation/input/button.php
index 1b70800e9..ec90fed9d 100644
--- a/views/installation/input/button.php
+++ b/views/installation/input/button.php
@@ -1,25 +1,22 @@
<?php
/**
* Create a input button
- * Use this view for forms rather than creating a submit/reset button tag in the wild as it provides
- * extra security which help prevent CSRF attacks.
- *
- * @package Elgg
- * @subpackage Core
*
* @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['type'] Submit or reset, defaults to submit.
- * @uses $vars['src'] Src of an image
- *
+ * @uses $vars['name'] The name of the input field
+ * @uses $vars['type'] submit or button.
*/
-global $CONFIG;
+if (isset($vars['class'])) {
+ $class = $vars['class'];
+} else {
+ $class = "elgg-button-submit";
+}
-$class = $vars['class'];
-if (!$class) {
- $class = "submit_button";
+if (isset($vars['name'])) {
+ $name = $vars['name'];
+} else {
+ $name = '';
}
if (isset($vars['type'])) {
@@ -32,20 +29,12 @@ switch ($type) {
case 'button' :
$type='button';
break;
- case 'reset' :
- $type='reset';
- break;
case 'submit':
default:
$type = 'submit';
}
$value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
-$name = $vars['internalname'];
-$src = $vars['src'];
-// blank src if trying to access an offsite image.
-if (strpos($src,elgg_get_site_url())===false) {
- $src = "";
-}
+
?>
-<input type="<?php echo $type; ?>" <?php if (isset($vars['internalid'])) echo "id=\"{$vars['internalid']}\"";?> <?php echo $vars['js']; ?> value="<?php echo $value; ?>" src="<?php echo $src; ?>" class="<?php echo $class; ?>" /> \ No newline at end of file
+<input type="<?php echo $type; ?>" value="<?php echo $value; ?>" class="<?php echo $class; ?>" /> \ No newline at end of file