Commit ea1cc1a0 authored by Penny Leach's avatar Penny Leach
Browse files

added last missing field to AdminPluginProfile

parent b890ee4e
......@@ -31,6 +31,7 @@ $string['myfiles'] = 'My Files';
$string['mandatory'] = 'Mandatory';
$string['public'] = 'Public';
$string['profileiconsize'] = 'Icon size';
// profile fields
......
......@@ -246,6 +246,35 @@ class ArtefactTypeProfile extends ArtefactType {
);
}
$form['elements']['emptyrow'] = array(
'title' => ' ',
'type' => 'html',
'value' => ' ',
);
$form['elements']['profileiconwidth'] = array(
'type' => 'text',
'size' => 4,
'suffix' => get_string('widthshort'),
'title' => get_string('profileiconsize', 'artefact.internal'),
'defaultvalue' => get_config_plugin('artefact', 'internal', 'profileiconwidth'),
'rules' => array(
'required' => true,
'integer' => true,
)
);
$form['elements']['profileiconheight'] = array(
'type' => 'text',
'suffix' => get_string('heightshort'),
'size' => 4,
'title' => get_string('profileiconsize', 'artefact.internal'),
'defaultvalue' => get_config_plugin('artefact', 'internal', 'profileiconheight'),
'rules' => array(
'required' => true,
'integer' => true,
)
);
$form['elements']['submit'] = array(
'type' => 'submit',
'value' =>get_string('save')
......@@ -254,8 +283,6 @@ class ArtefactTypeProfile extends ArtefactType {
}
public function save_config_options($values) {
// log_debug($values);
// log_debug($_POST);
$mandatory = '';
$public = '';
foreach ($values as $field => $value) {
......@@ -271,6 +298,8 @@ class ArtefactTypeProfile extends ArtefactType {
}
set_config_plugin('artefact', 'internal', 'profilepublic', $public);
set_config_plugin('artefact', 'internal', 'profilemandatory', $mandatory);
set_config_plugin('artefact', 'internal', 'profileiconwidth', $values['profileiconwidth']);
set_config_plugin('artefact', 'internal', 'profileiconheight', $values['profileiconheight']);
}
}
......
......@@ -202,4 +202,10 @@ $string['plugintype'] = 'Plugin type';
$string['settingssaved'] = 'Settings saved';
$string['settingssavefailed'] = 'Failed to save settings';
$string['width'] = 'Width';
$string['height'] = 'Height';
$string['widthshort'] = 'w';
$string['heightshort'] = 'h';
?>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment