function theme_invite_form in Invite 6.2
Same name and namespace in other branches
- 5.2 invite.module \theme_invite_form()
- 5 invite.module \theme_invite_form()
Theme function for the invite form.
File
- ./
invite.module, line 905 - Allows your users to send and track invitations to join your site.
Code
function theme_invite_form($form) {
$output = '';
$op = $form['#parameters'][2];
if ($op == 'page') {
// Show form elements.
$output .= drupal_render($form['remaining_invites_markup']);
$output .= drupal_render($form['remaining_invites']);
$output .= drupal_render($form['from']);
if (isset($form['email_markup'])) {
$output .= drupal_render($form['email_markup']);
}
$output .= drupal_render($form['email']);
$output .= drupal_render($form['subject']);
// Show complete invitation message.
$output .= drupal_render($form['body']);
$output .= '<div class="invite-message"><div class="opening">';
// Prepare invitation message.
$message_form = "</p></div>\n" . drupal_render($form['message']) . "\n" . '<div class="closing"><p>';
$body = _filter_autop(t(_invite_get_mail_template()));
// Perform token replacement on message body.
$types = _invite_token_types(array(
'data' => array(
'message' => $message_form,
),
));
$output .= token_replace_multiple($body, $types);
$output .= "</div></div>\n";
}
// Render all missing form elements.
$output .= drupal_render($form);
return $output;
}