contact_mail_user

Хочешь помочь с переводом? Это очень просто и быстро. Лишь зарегистрируйся, и можешь тут же начать переводить.

modules/contact/contact.pages.inc, строка 173

Версии
5
contact_mail_user($recipient)
6
contact_mail_user(&$form_state, $recipient)

Код

<?php
function contact_mail_user(&$form_state, $recipient) {
  global $user;
  $form['#token'] = $user->name . $user->mail;
  $form['recipient'] = array('#type' => 'value', '#value' => $recipient);
  $form['from'] = array('#type' => 'item',
    '#title' => t('From'),
    '#value' => theme('username', $user) .' &lt;'. check_plain($user->mail) .'&gt;',
  );
  $form['to'] = array('#type' => 'item',
    '#title' => t('To'),
    '#value' => theme('username', $recipient),
  );
  $form['subject'] = array('#type' => 'textfield',
    '#title' => t('Subject'),
    '#maxlength' => 50,
    '#required' => TRUE,
  );
  $form['message'] = array('#type' => 'textarea',
    '#title' => t('Message'),
    '#rows' => 15,
    '#required' => TRUE,
  );
  $form['copy'] = array('#type' => 'checkbox',
    '#title' => t('Send yourself a copy.'),
  );
  $form['submit'] = array('#type' => 'submit',
    '#value' => t('Send e-mail'),
  );
  return $form;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии

Вход в систему