function anonymous_publishing_cl_admin_email in Anonymous Publishing 7
Menu callback: Form to change content of email message.
Return value
array Form.
1 string reference to 'anonymous_publishing_cl_admin_email'
- anonymous_publishing_cl_menu in modules/
cl/ anonymous_publishing_cl.admin.inc - Implements hook_menu().
File
- modules/
cl/ anonymous_publishing_cl.admin.inc, line 197 - Menu callbacks for the CL tabs on the module admin page.
Code
function anonymous_publishing_cl_admin_email() {
$form = array();
$form['#attached']['css'] = array(
drupal_get_path('module', 'anonymous_publishing') . '/anonymous_publishing_cl_mail.css',
);
$form['anonymous_publishing_usersec'] = array(
'#markup' => t('<p>You may edit the following fields to customize the e-mail message sent to non-authenticated users when they create content. One of the first two fields are used for the subject field, the rest may go in the body.</p>'),
);
// We do not santize these textfields and textareas, because the
// form API does this. If we santize, the results is:
// "quoted" => "quoted" => &quot;quoted&quot;.
$form['anonymous_publishing_cl_emailsubjectact'] = array(
'#type' => 'textfield',
'#title' => t('Subject (activate content):'),
'#size' => 72,
'#maxlength' => 180,
'#default_value' => variable_get('anonymous_publishing_cl_emailsubjectact', _anonymous_publishing_cl_substitute_text('anonymous_publishing_cl_emailsubjectact')),
);
$form['anonymous_publishing_cl_emailsubjectver'] = array(
'#type' => 'textfield',
'#title' => t('Subject (verify email):'),
'#size' => 72,
'#maxlength' => 180,
'#default_value' => variable_get('anonymous_publishing_cl_emailsubjectver', _anonymous_publishing_cl_substitute_text('anonymous_publishing_cl_emailsubjectver')),
);
$form['anonymous_publishing_cl_emailaction'] = array(
'#type' => 'textarea',
'#title' => t('Introduction:'),
'#default_value' => variable_get('anonymous_publishing_cl_emailaction', _anonymous_publishing_cl_substitute_text('anonymous_publishing_cl_emailaction')),
'#cols' => 60,
'#rows' => 4,
'#resizable' => FALSE,
);
$form['anonymous_publishing_cl_emailactivate'] = array(
'#type' => 'textarea',
'#title' => t('Text to include if auto-deletion is enabled:'),
'#default_value' => variable_get('anonymous_publishing_cl_emailactivate', _anonymous_publishing_cl_substitute_text('anonymous_publishing_cl_emailactivate')),
'#cols' => 60,
'#rows' => 1,
'#resizable' => FALSE,
);
$form['anonymous_publishing_cl_emailverify'] = array(
'#type' => 'textarea',
'#title' => t('Text to include when administrator approval is mandatory:'),
'#default_value' => variable_get('anonymous_publishing_cl_emailverify', _anonymous_publishing_cl_substitute_text('anonymous_publishing_cl_emailverify')),
'#cols' => 60,
'#rows' => 2,
'#resizable' => FALSE,
);
$form['anonymous_publishing_modsec'] = array(
'#markup' => t('<p>You may edit the following fields to customize the e-mail message sent to the administrator when non-authenticated users create content. The first field is the subject, the second is the body.</p>'),
);
$form['anonymous_publishing_cl_emailnsubject'] = array(
'#type' => 'textfield',
'#title' => t('Subject (admin):'),
'#default_value' => variable_get('anonymous_publishing_cl_emailnsubject', _anonymous_publishing_cl_substitute_text('anonymous_publishing_cl_emailnsubject')),
'#size' => 60,
'#maxlength' => 180,
);
$form['anonymous_publishing_cl_emailnbody'] = array(
'#type' => 'textarea',
'#title' => t('Body (admin):'),
'#default_value' => variable_get('anonymous_publishing_cl_emailnbody', _anonymous_publishing_cl_substitute_text('anonymous_publishing_cl_emailnbody')),
'#cols' => 60,
'#rows' => 2,
'#resizable' => FALSE,
);
$form['anonymous_publishing_vars'] = array(
'#markup' => t('<p>You may use the following tokens in the texts above: <code>!action, !autodelhours, !email, !site, !title, !verification_uri.</code></p>'),
);
return system_settings_form($form);
}