summaryrefslogtreecommitdiff
path: root/lib/plugins/config/settings/config.class.php
diff options
context:
space:
mode:
authorChristopher Smith <chris@jalakai.co.uk>2013-08-03 00:40:34 +0200
committerChristopher Smith <chris@jalakai.co.uk>2013-08-03 00:40:34 +0200
commitb8b64ed77285e4d753d35d4ceab0516be597a2f1 (patch)
tree7cc1a82a5887a9efeb3f9160f98613e65e404ba0 /lib/plugins/config/settings/config.class.php
parentaf07997c5ff7cc096965159d90158e3710d2d019 (diff)
parent586da9c1028b1013e8dc47911ba430671a389b5b (diff)
downloadrpg-b8b64ed77285e4d753d35d4ceab0516be597a2f1.tar.gz
rpg-b8b64ed77285e4d753d35d4ceab0516be597a2f1.tar.bz2
Merge branch 'master' into configmgr_improvements
Diffstat (limited to 'lib/plugins/config/settings/config.class.php')
-rw-r--r--lib/plugins/config/settings/config.class.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php
index 6de560128..6d582ad30 100644
--- a/lib/plugins/config/settings/config.class.php
+++ b/lib/plugins/config/settings/config.class.php
@@ -728,6 +728,29 @@ if (!class_exists('setting_email')) {
$this->_local = $input;
return true;
}
+ function html(&$plugin, $echo=false) {
+ $value = '';
+ $disable = '';
+
+ if ($this->is_protected()) {
+ $value = $this->_protected;
+ $disable = 'disabled="disabled"';
+ } else {
+ if ($echo && $this->_error) {
+ $value = $this->_input;
+ } else {
+ $value = is_null($this->_local) ? $this->_default : $this->_local;
+ }
+ }
+
+ $multiple = $this->_multiple ? 'multiple="multiple"' : '';
+ $key = htmlspecialchars($this->_key);
+ $value = htmlspecialchars($value);
+
+ $label = '<label for="config___'.$key.'">'.$this->prompt($plugin).'</label>';
+ $input = '<input id="config___'.$key.'" name="config['.$key.']" type="email" class="edit" value="'.$value.'" '.$multiple.' '.$disable.'/>';
+ return array($label,$input);
+ }
}
}