Commit 1106d25e authored by hass's avatar hass
Browse files

Add fieldsets to position "token browse" link better

parent ff4edd01
...@@ -7,11 +7,16 @@ ...@@ -7,11 +7,16 @@
* @see realname_settings_form_submit() * @see realname_settings_form_submit()
*/ */
function realname_settings_form($form, &$form_state) { function realname_settings_form($form, &$form_state) {
$form['general'] = array(
'#type' => 'fieldset',
'#title' => t('General settings'),
);
$note = '<div>'; $note = '<div>';
$note .= t('Note that if it is changed, all current Realnames will be deleted and the list in the database will be rebuilt as needed.'); $note .= t('Note that if it is changed, all current Realnames will be deleted and the list in the database will be rebuilt as needed.');
$note .= '</div>'; $note .= '</div>';
$form['realname_pattern'] = array( $form['general']['realname_pattern'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Realname pattern'), '#title' => t('Realname pattern'),
'#default_value' => variable_get('realname_pattern', '[user:name-raw]'), '#default_value' => variable_get('realname_pattern', '[user:name-raw]'),
...@@ -22,16 +27,19 @@ function realname_settings_form($form, &$form_state) { ...@@ -22,16 +27,19 @@ function realname_settings_form($form, &$form_state) {
'#maxlength' => 256, '#maxlength' => 256,
'#description' => t('This pattern will be used to construct Realnames for all users.') . $note, '#description' => t('This pattern will be used to construct Realnames for all users.') . $note,
); );
// Add the token tree UI. // Add the token tree UI.
$form['token_help'] = array( $form['general']['token_help'] = array(
'#theme' => 'token_tree', '#theme' => 'token_tree',
'#token_types' => array('user'), '#token_types' => array('user'),
'#global_types' => FALSE, '#global_types' => FALSE,
'#dialog' => TRUE, '#dialog' => TRUE,
); );
$form['realname_suppress_user_name_mail_validation'] = array( $form['advanced'] = array(
'#type' => 'fieldset',
'#title' => t('Advanded settings'),
);
$form['advanced']['realname_suppress_user_name_mail_validation'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
'#title' => t('Suppress missing token warning in e-mail templates'), '#title' => t('Suppress missing token warning in e-mail templates'),
'#description' => t('With Real name module enabled you need to replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in your <a href="@people">e-mail</a> templates. If you are running modules like <em>Email Registration</em> you may like to suppress this warning and use a different token.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-admin-created')))), '#description' => t('With Real name module enabled you need to replace the token <code>[user:name]</code> with <code>[user:name-raw]</code> in your <a href="@people">e-mail</a> templates. If you are running modules like <em>Email Registration</em> you may like to suppress this warning and use a different token.', array('@people' => url('admin/config/people/accounts', array('fragment' => 'edit-email-admin-created')))),
......
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