You are here

function messaging_xmpp_settings_form in Messaging 6.2

Same name and namespace in other branches
  1. 6.4 messaging_xmpp/messaging_xmpp.module \messaging_xmpp_settings_form()
  2. 6.3 messaging_xmpp/messaging_xmpp.module \messaging_xmpp_settings_form()

Site wide settings form

1 string reference to 'messaging_xmpp_settings_form'
messaging_xmpp_menu in messaging_xmpp/messaging_xmpp.module
Implementation of hook_menu()

File

messaging_xmpp/messaging_xmpp.module, line 53
XMPP Messsaging. Messaging method plug-in

Code

function messaging_xmpp_settings_form($form_state) {
  $form['offline'] = array(
    '#type' => 'fieldset',
    '#title' => t('XMPP offline messages'),
    '#description' => t('What to do with XMPP messages when the destination user is offline. Depending on the XMPP API used we may not be able to determine whether the user is online or not so you may want to set the <em>Send anyway</em> option and not allow per user settings.'),
  );
  $form['offline']['messaging_default_xmpp_offline'] = array(
    '#type' => 'radios',
    '#title' => t('Default for XMPP offline messages'),
    '#default_value' => variable_get('messaging_default_xmpp_offline', MESSAGING_XMPP_OFFLINE_SEND),
    '#options' => messaging_xmpp_user_offline_options(),
    '#description' => t('Select the default option for XMPP messages when the user is offline.'),
  );
  $form['offline']['messaging_peruser_xmpp_offline'] = array(
    '#type' => 'checkbox',
    '#title' => t('Allow per user settings'),
    '#default_value' => variable_get('messaging_peruser_xmpp_offline', 1),
    '#description' => t('If checked, users will be able to override this option in their user account settings. They will be offered additional options to get the messages through a different method depending on which ones they have available.'),
  );
  return system_settings_form($form);
}