| 1 |
|
<?php |
| 2 |
|
|
| 3 |
|
// $Id: |
| 4 |
/** |
/** |
| 5 |
* this file contains all the implementations of signit hook operations |
* this file contains all the implementations of signit hook operations |
| 6 |
* for the default operation of the module |
* for the default operation of the module |
| 40 |
* generates the form for creating hook_signit_targets |
* generates the form for creating hook_signit_targets |
| 41 |
*/ |
*/ |
| 42 |
function signit_signit_message_create($signit){ |
function signit_signit_message_create($signit){ |
| 43 |
$form['signit']['message']['signit_email_from'] = array( |
$form['signit_email_from'] = array( |
| 44 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 45 |
'#title' => t('Email from'), |
'#title' => t('Email from'), |
| 46 |
'#default_value' => $node->signit['email_from'] ? $node->signit['email_from']: variable_get("site_mail", null), |
'#default_value' => $node->signit['email_from'] ? $node->signit['email_from']: variable_get("site_mail", null), |
| 47 |
'#description' => t('Enter the email address that will appear in the "From: " header of sent messages. This is <em>only</em> used when sending a list of signatures.'), |
'#description' => t('Enter the email address that will appear in the "From: " header of sent messages. This is <em>only</em> used when sending a list of signatures.'), |
| 48 |
); |
); |
| 49 |
$form['signit']['message']['signit_email_subject_set'] = array( |
$form['signit_email_subject_set'] = array( |
| 50 |
'#type' => 'checkbox', |
'#type' => 'checkbox', |
| 51 |
'#title' => t('Allow users to set email subject.'), |
'#title' => t('Allow users to set email subject.'), |
| 52 |
'#options' => array('Enabled'), |
'#options' => array('Enabled'), |
| 55 |
); |
); |
| 56 |
|
|
| 57 |
// signit message subject |
// signit message subject |
| 58 |
$form['signit']['message']['signit_email_subject'] = array( |
$form['signit_email_subject'] = array( |
| 59 |
'#type' => 'textfield', |
'#type' => 'textfield', |
| 60 |
'#title' => t('Email subject'), |
'#title' => t('Email subject'), |
| 61 |
'#default_value' => $node->signit['email_subject'] ? $node->signit['email_subject'] : "My SignIt ", |
'#default_value' => $node->signit['email_subject'] ? $node->signit['email_subject'] : "My SignIt ", |
| 63 |
); |
); |
| 64 |
|
|
| 65 |
// signit message body |
// signit message body |
| 66 |
$form['signit']['message']['signit_message_filter']['signit_message'] = array( |
$form['signit_message_filter']['signit_message'] = array( |
| 67 |
'#type' => 'textarea', |
'#type' => 'textarea', |
| 68 |
'#title' => t('Email message'), |
'#title' => t('Email message'), |
| 69 |
'#default_value' => $node->signit['message'], |
'#default_value' => $node->signit['message'], |
| 70 |
'#description' => t('Body of auto-response email message to be sent. Please note, changes to this do not effect already collected signatures.'), |
'#description' => t('Body of auto-response email message to be sent. Please note, changes to this do not effect already collected signatures.'), |
| 71 |
); |
); |
| 72 |
// add a filter form to to the body |
// add a filter form to to the body |
| 73 |
$form['signit']['message']['signit_message_filter']['signit_message_format'] = filter_form($node->signit['message_format'], null, array('signit_message_filter')); |
$form['signit_message_filter']['signit_message_format'] = filter_form($node->signit['message_format'], null, array('signit_message_filter')); |
| 74 |
|
|
| 75 |
|
|
| 76 |
$form['signit']['message']['signit_personal_message'] = array( |
$form['signit_personal_message'] = array( |
| 77 |
'#type' => 'checkbox', |
'#type' => 'checkbox', |
| 78 |
'#title' => t('Allow users to add personal messages.'), |
'#title' => t('Allow users to add personal messages.'), |
| 79 |
'#options' => array('Enabled'), |
'#options' => array('Enabled'), |
| 81 |
'#description' => t('Gives user the ability to add a personal message to the email template. ') |
'#description' => t('Gives user the ability to add a personal message to the email template. ') |
| 82 |
); |
); |
| 83 |
|
|
| 84 |
$form['signit']['message']['signit_comment_allow'] = array( |
$form['signit_comment_allow'] = array( |
| 85 |
'#type' => 'checkbox', |
'#type' => 'checkbox', |
| 86 |
'#title' => t('Allow users to add a comment.'), |
'#title' => t('Allow users to add a comment.'), |
| 87 |
'#options' => array('Enabled'), |
'#options' => array('Enabled'), |
| 89 |
'#description' => t('Gives user the ability to leave a comment along with their message. This can be displayed on the list of signatures.') |
'#description' => t('Gives user the ability to leave a comment along with their message. This can be displayed on the list of signatures.') |
| 90 |
); |
); |
| 91 |
|
|
| 92 |
$form['signit']['message']['signit_comment_allow_html'] = array( |
$form['signit_comment_allow_html'] = array( |
| 93 |
'#type' => 'checkbox', |
'#type' => 'checkbox', |
| 94 |
'#title' => t('Allow HTML in comment form.'), |
'#title' => t('Allow HTML in comment form.'), |
| 95 |
'#options' => array('Enabled'), |
'#options' => array('Enabled'), |