function _simplenews_node_form in Simplenews 7
Same name and namespace in other branches
- 7.2 simplenews.module \_simplenews_node_form()
@todo
1 call to _simplenews_node_form()
- simplenews_form_alter in ./
simplenews.module - Implements hook_form_alter().
File
- ./
simplenews.module, line 761 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function _simplenews_node_form(&$form, $form_state) {
// Display warning if the node is currently being sent.
if (!empty($form['#node']->nid)) {
$newsletter = simplenews_newsletter_load($form['#node']->nid);
if ($newsletter && $newsletter->status == SIMPLENEWS_STATUS_SEND_PENDING) {
drupal_set_message(t('This newsletter issue is currently being sent. Any changes will be reflected in the e-mails which have not been sent yet.'), 'warning');
}
}
if (module_exists('token')) {
$form['simplenews_token_help'] = array(
'#title' => t('Replacement patterns'),
'#type' => 'fieldset',
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#description' => t('These tokens can be used in all text fields except subject and will be replaced on-screen and in the email.'),
);
$form['simplenews_token_help']['browser'] = array(
'#theme' => 'token_tree',
'#token_types' => array(
'simplenews-category',
'simplenews-subscriber',
'node',
),
);
}
}