diff options
Diffstat (limited to 'modules/contact.module')
-rw-r--r-- | modules/contact.module | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/modules/contact.module b/modules/contact.module index 2f745a7c1..f86a43522 100644 --- a/modules/contact.module +++ b/modules/contact.module @@ -70,7 +70,7 @@ function contact_menu($may_cache) { */ function contact_settings() { $form['contact_form_information'] = array( - '#type' => 'textarea', '#title' => t('Additional information'), '#cols' => 60, '#rows' => 5, + '#type' => 'textarea', '#title' => t('Additional information'), '#default_value' => variable_get('contact_form_information', t('You can leave us a message using the contact form below.')), '#description' => t('Information to show on the <a href="%form">contact page</a>. Can be anything from submission guidelines to your postal address or telephone number.', array('%form' => url('contact'))) ); @@ -84,8 +84,8 @@ function contact_settings() { */ function contact_user($type, $edit, &$user, $category = NULL) { if ($type == 'form' && $category == 'account') { - $form['contact'] = array('#type' => 'fieldset', '#title' => t('Contact settings'), '#weight' => 5, '#collapsible' => TRUE, '#collapsed' => FALSE); - $form['contact']['contact'] = array('#type' => 'checkbox', '#title' => t('Personal contact form'), '#return_value' => 1, '#default_value' => $edit['contact'], '#description' => t('Allow other users to contact you by e-mail via <a href="%url">your personal contact form</a>. Note that your e-mail address is not made public and that privileged users such as site administrators are able to contact you even if you choose not to enable this feature.', array('%url' => url("user/$user->uid/contact")))); + $form['contact'] = array('#type' => 'fieldset', '#title' => t('Contact settings'), '#weight' => 5, '#collapsible' => TRUE); + $form['contact']['contact'] = array('#type' => 'checkbox', '#title' => t('Personal contact form'), '#default_value' => $edit['contact'], '#description' => t('Allow other users to contact you by e-mail via <a href="%url">your personal contact form</a>. Note that your e-mail address is not made public and that privileged users such as site administrators are able to contact you even if you choose not to enable this feature.', array('%url' => url("user/$user->uid/contact")))); return $form; //return array(array('title' => t('Contact settings'), 'data' => drupal_get_form('contact_user', $form), 'weight' => 2)); } @@ -116,8 +116,8 @@ function contact_mail_user() { $form['#token'] = $user->name . $user->mail; $form['from'] = array('#type' => 'item', '#title' => t('From'), '#value' => $user->name .' <'. $user->mail .'>'); $form['to'] = array('#type' => 'item', '#title' => t('To'), '#value' => $account->name); - $form['subject'] = array('#type' => 'textfield', '#title' => t('Subject'), '#size' => 60, '#maxlength' => 50, '#required' => TRUE); - $form['message'] = array('#type' => 'textarea', '#title' => t('Message'), '#cols' => 60, '#rows' => 15, '#required' => TRUE); + $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' => ('Send me a copy.')); $form['submit'] = array('#type' => 'submit', '#value' => t('Send e-mail')); $output = drupal_get_form('contact_user_mail', $form); @@ -200,9 +200,9 @@ function contact_admin_edit($cid = NULL) { $edit['reply'] = $category->reply; } - $form['category'] = array('#type' => 'textfield', '#title' => t('Category'), '#size' => 60, '#maxlength' => 255, '#default_value' => $edit['category'], '#description' => t("Example: 'website feedback' or 'product information'."), '#required' => TRUE); - $form['recipients'] = array('#type' => 'textarea', '#title' => t('Recipients'), '#cols' => 60, '#rows' => 5, '#default_value' => $edit['recipients'], '#description' => t("Example: 'webmaster@yoursite.com' or 'sales@yoursite.com'. To specify multiple repecients, separate each e-mail address with a comma."), '#required' => TRUE); - $form['reply'] = array('#type' => 'textarea', '#title' => t('Auto-reply'), '#cols' => 60, '#rows' => 5, '#default_value' => $edit['reply'], '#description' => t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message.")); + $form['category'] = array('#type' => 'textfield', '#title' => t('Category'), '#maxlength' => 255, '#default_value' => $edit['category'], '#description' => t("Example: 'website feedback' or 'product information'."), '#required' => TRUE); + $form['recipients'] = array('#type' => 'textarea', '#title' => t('Recipients'), '#default_value' => $edit['recipients'], '#description' => t("Example: 'webmaster@yoursite.com' or 'sales@yoursite.com'. To specify multiple repecients, separate each e-mail address with a comma."), '#required' => TRUE); + $form['reply'] = array('#type' => 'textarea', '#title' => t('Auto-reply'), '#default_value' => $edit['reply'], '#description' => t("Optional auto-reply. Leave empty if you don't want to send the user an auto-reply message.")); $form['submit'] = array('#type' => 'submit', '#value' => t('Submit')); return drupal_get_form('contact_admin_edit', $form); @@ -256,14 +256,14 @@ function contact_mail_page() { if (count($categories) > 1) { $form['#token'] = $user->name . $user->mail; $form['contact_information'] = array('#type' => 'markup', '#value' => variable_get('contact_form_information', t('You can leave us a message using the contact form below.'))); - $form['name'] = array('#type' => 'textfield', '#title' => t('Your name'), '#size' => 60, '#maxlength' => 255, '#default_value' => $edit['name'], '#required' => TRUE); - $form['mail'] = array('#type' => 'textfield', '#title' => t('Your e-mail address'), '#size' => 60, '#maxlength' => 255, '#default_value' => $edit['mail'], '#required' => TRUE); - $form['subject'] = array('#type' => 'textfield', '#title' => t('Subject'), '#size' => 60, '#maxlength' => 255, '#default_value' => $edit['subject'], '#required' => TRUE); + $form['name'] = array('#type' => 'textfield', '#title' => t('Your name'), '#maxlength' => 255, '#default_value' => $edit['name'], '#required' => TRUE); + $form['mail'] = array('#type' => 'textfield', '#title' => t('Your e-mail address'), '#maxlength' => 255, '#default_value' => $edit['mail'], '#required' => TRUE); + $form['subject'] = array('#type' => 'textfield', '#title' => t('Subject'), '#maxlength' => 255, '#default_value' => $edit['subject'], '#required' => TRUE); if (count($categories) > 2) { $form['category'] = array('#type' => 'select', '#title' => t('Category'), '#size' => 60, '#maxlength' => 255, '#default_value' => $edit['category'], '#options' => $categories, '#required' => TRUE); } - $form['message'] = array('#type' => 'textarea', '#title' => t('Message'), '#cols' => 60, '#rows' => 5, '#default_value' => $edit['message'], '#required' => TRUE); - $form['copy'] = array('#type' => 'checkbox', '#title' => t('Send me a copy.'), '#default_value' => $edit['copy'], '#return_value' => 1); + $form['message'] = array('#type' => 'textarea', '#title' => t('Message'), '#default_value' => $edit['message'], '#required' => TRUE); + $form['copy'] = array('#type' => 'checkbox', '#title' => t('Send me a copy.'), '#default_value' => $edit['copy']); $form['submit'] = array('#type' => 'submit', '#value' => t('Send e-mail')); $output = drupal_get_form('contact_mail_page', $form); } |