function bueditor_form_admin in BUEditor 5
Admin form.
1 string reference to 'bueditor_form_admin'
- bueditor_admin in ./
bueditor.module - Admin main page.
File
- ./
bueditor.module, line 58
Code
function bueditor_form_admin() {
$form = array(
'#tree' => TRUE,
);
$options = array(
0 => t('none'),
);
foreach (bueditor_editors('all') as $eid => $editor) {
$options[$eid] = $editor->name;
}
if ($GLOBALS['user']->uid == 1) {
$form['user1editor'] = array(
'#type' => 'select',
'#options' => $options,
'#default_value' => variable_get('bueditor_user1', 1),
);
}
foreach (bueditor_sorted_roles() as $rid => $role) {
$form['roles'][$rid]['name'] = array(
'#type' => 'markup',
'#value' => $role['name'],
);
$form['roles'][$rid]['weight'] = array(
'#type' => 'weight',
'#default_value' => $role['weight'],
);
$form['roles'][$rid]['editor'] = array(
'#type' => 'select',
'#options' => $options,
'#default_value' => $role['editor'],
);
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
return $form;
}