Skip to content
Snippets Groups Projects
Commit 2586f61f authored by Christopher Smith's avatar Christopher Smith
Browse files

add html5 attributes to email fields of the config manager

parent 7b3674bd
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment