summaryrefslogtreecommitdiff
path: root/lib/plugins/config/settings/config.class.php
diff options
context:
space:
mode:
authorKlap-in <klapinklapin@gmail.com>2013-08-01 23:06:36 +0200
committerKlap-in <klapinklapin@gmail.com>2013-08-01 23:06:36 +0200
commitde489e8bb4161522864aca1d308b9910387ae4bb (patch)
tree697a6ca1a6a3341598a6272dca6e5cf0ee4cd105 /lib/plugins/config/settings/config.class.php
parentcc036f74ff14c387f24d72f5a52f2f158208846e (diff)
parent4fb6e51447e840624b59742bec61641d606f5006 (diff)
downloadrpg-de489e8bb4161522864aca1d308b9910387ae4bb.tar.gz
rpg-de489e8bb4161522864aca1d308b9910387ae4bb.tar.bz2
Merge remote-tracking branch 'origin/master' into fetchimagetokexternal
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 8eb99284d..63be3a726 100644
--- a/lib/plugins/config/settings/config.class.php
+++ b/lib/plugins/config/settings/config.class.php
@@ -717,6 +717,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);
+ }
}
}