function engagements_sms_settings_form

6.x engagements.module engagements_sms_settings_form()

Configure the various SMS settings

File

modules/engagements/engagements.module, line 918
This is the primary module file for the engagements module.

Code

function engagements_sms_settings_form() 
 {




  $form = array();


  $form ['mark_signalwire_top'] = array(
    'value' => "<fieldset><legend>Settings for SignalWire</legend>
                <p>The following settings are for the service SignalWire.  You must already have a SignalWire account
                   set up to use.</p>",
  );

  $form ['sms_project_id'] = array(
    'label' => 'Project ID',
    'type' => 'textfield',
    'value' => variable_get('sms_project_id', ''),
    'description' => t("This is the project id (from SignalWire)."),
  );

  $form ['sms_auth_token'] = array(
    'label' => 'Auth Token',
    'type' => 'textfield',
    'value' => variable_get('sms_auth_token', ''),
    'description' => t("Given by the API settings in signalwire"),
  );


  $form ['sms_space_url'] = array(
    'label' => 'Space URL',
    'type' => 'textfield',
    'value' => variable_get('sms_space_url', ''),
    'description' => t("The URL you use to access your region of signalwire.  example.signalwire.com.  No http:// or such."),
  );


  $form ['sms_from_phone'] = array(
    'label' => 'From Phone number(s):',
    'type' => 'textarea',
    'rows' => 3,
    'value' => variable_get('sms_from_phone', '555-555-1234'),
    'description' => t("These are the phone numbers from your SignalWire account.  
                        <br>Enter them one per line, with a tilda (~) between the number
                        and a brief line description, like so:
                      <br> &nbsp; &nbsp; 555-123-4567 ~ Brief Description ~ default
                      <br> &nbsp; &nbsp; 555-222-1111 ~ Brief Description2
                      <br>Notice that the 'default' designation lets FlightPath know what is the default number which standard notifications
                      will be sent from.  If no default is set, the first number will be used.
                      <br><strong>Important:</strong> Do not send mass txt messages from these numbers unless your campaign is set to do so.  These
                          numbers will not appear as options to send mass txt messages."),
  );


  $form ['sms_mass_phone'] = array(
    'label' => 'Mass Text Phone number(s):',
    'type' => 'textarea',
    'rows' => 3,
    'value' => variable_get('sms_mass_phone', '800-555-1234'),
    'description' => t("These are phone numbers from your SignalWire account, specifically belonging to a campaign for marketting or otherwise
                        mass text messages.  At the time of this writing, toll-free numbers do not need to belong to such a campaign.  These
                        will be the only numbers which appear as options to send mass txt messages to."),
  );


  $form ['sms_header'] = array(
    'label' => 'SMS Header:',
    'type' => 'textfield',
    'value' => variable_get('sms_header', '(@initials) from @name:'),
    'description' => t("All SMS text messages sent from FlightPath will begin with this header, in order to help the student
                        understand the who the sender of the message is.  
                        <br>You may leave blank to disable (not recommended),
                        or use the following replacement patterns:
                        <ul>
                          <li><b>@initials</b> - The sender's school initials.  Ex: ULM or UD</li>
                          <li><b>@school</b> - The sender's school name.  Ex: University of Idaho (this is only applicable if you have the Schools module enabled.)</li>
                          <li><b>@name</b> - The first and last name of the sending user OR for automated messages, it will simply say FlightPath (or whatever your system has been named).</li>
                          <li><b>@line-desc</b> - This is the line description for the number the message is being sent from.</li>
                          <li><b>@line-desc-trimmed</b> - This is a trimmed (to no more than 20 chars) of the line description for the number the message is being sent from.
                        </ul>"),
  );


  $form ['sms_mass_sms_password'] = array(
    'label' => 'Mass SMS Password:',
    'type' => 'textfield',
    'value' => variable_get('sms_mass_sms_password', 'changeMe'),
    'description' => t("Before a user may use the Send Mass Text Messages feature (to sent o many recipients), they must enter this password to protect against accidental submissions."),
  );


  $form ['mark_signalwire_bottom'] = array(
    'value' => "</fieldset><br><br>",
  );




  return $form;
}