function message_ui_form_message_user_admin_settings_alter in Message UI 7
Implements hook_form_FORM_ID_alter().
File
- ./
message_ui.module, line 380 - Main file for the message UI module.
Code
function message_ui_form_message_user_admin_settings_alter(&$form, $form_state) {
$form['update_tokens'] = array(
'#type' => 'fieldset',
'#itle' => t('Token update settings'),
);
$form['update_tokens']['update_tokens_update_tokens'] = array(
'#type' => 'checkbox',
'#title' => t('Update messages arguments'),
'#description' => t('When editing a message type, the user can add or delete arguments. When this is checked, you can choose how to update to messages arguments.'),
'#default_value' => variable_get('update_tokens_update_tokens', FALSE),
);
$form['update_tokens']['update_tokens_how_to_act'] = array(
'#type' => 'select',
'#title' => t('Choose how to act'),
'#default_value' => variable_get('update_tokens_how_to_act'),
'#options' => array(
'update_when_removed' => t('Update messages when tokens are removed'),
'update_when_added' => t('Update messages when tokens are added'),
),
'#states' => array(
'visible' => array(
':input[name="update_tokens_update_tokens"]' => array(
'checked' => TRUE,
),
),
),
);
$form['update_tokens']['update_tokens_how_update'] = array(
'#type' => 'select',
'#title' => t('Choose how to update the messages'),
'#default_value' => variable_get('update_tokens_how_update'),
'#options' => array(
'update_with_batch' => t('Update messages with batch API'),
'update_when_item' => t('Update messages with queue item'),
),
'#states' => array(
'visible' => array(
':input[name="update_tokens_update_tokens"]' => array(
'checked' => TRUE,
),
),
),
);
$form['update_tokens']['update_tokens_number_items'] = array(
'#type' => 'textfield',
'#size' => '10',
'#title' => t('Items to process each time.'),
'#description' => t('Choose how much items to process each iteration.'),
'#default_value' => variable_get('update_tokens_number_items', 250),
'#states' => array(
'visible' => array(
':input[name="update_tokens_update_tokens"]' => array(
'checked' => TRUE,
),
),
),
);
$form['message_ui_show_preview'] = array(
'#type' => 'radios',
'#title' => t('Show/hide preview'),
'#default_value' => variable_get('message_ui_show_preview', TRUE),
'#options' => array(
TRUE => t('Show preview'),
FALSE => t('Hide preview'),
),
'#description' => t('Show/hide the text of the message when editing an instance of the message.'),
);
}