Skip to content

Commit

Permalink
MDL-13893 fixed hiding of editor buttons, added labels there too; mer…
Browse files Browse the repository at this point in the history
…ged from MOODLE_19_STABLE
  • Loading branch information
skodak committed Mar 15, 2008
1 parent 4e56a2e commit 5ac776a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/adminlib.php
Expand Up @@ -3012,7 +3012,7 @@ function get_setting() {
if ($result === '') {
return array();
}
return explode(',', $result);
return explode(' ', $result);
}

function write_setting($data) {
Expand All @@ -3023,7 +3023,7 @@ function write_setting($data) {
$result = array();

foreach ($data as $key => $value) {
if (!in_array($key, array_keys($this->items))) {
if (!isset($this->items[$key])) {
return get_string('errorsetting', 'admin');
}
if ($value == '1') {
Expand Down Expand Up @@ -3051,8 +3051,10 @@ function output_html($data, $query='') {
$return .= '</td><td valign="top" align="right">';
}

$return .= '<label for="'.$this->get_id().$key.'">';
$return .= ($value == '' ? get_string($key,'editor') : '<img width="18" height="18" src="'.$CFG->wwwroot.'/lib/editor/htmlarea/images/'.$value.'" alt="'.get_string($key,'editor').'" title="'.get_string($key,'editor').'" />').'&nbsp;';
$return .= '<input type="checkbox" class="form-checkbox" value="1" id="'.$this->get_id().$key.'" name="'.$this->get_full_name().'['.$key.']"'.(in_array($key,$data) ? ' checked="checked"' : '').' />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
$return .= '</label>';
$count++;
if ($count % 15 != 0) {
$return .= '<br /><br />';
Expand Down

0 comments on commit 5ac776a

Please sign in to comment.