diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-05-17 21:33:59 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-05-17 21:33:59 +0000 |
commit | 99338b789671f836fa87622385b05a29ac65ed21 (patch) | |
tree | be2b766a9181bba1ba98b5a6bcd67e874a67fda8 /modules/user/user.module | |
parent | da7f952a4576da7bd33348c8cec7439fc32a2114 (diff) | |
download | brdo-99338b789671f836fa87622385b05a29ac65ed21.tar.gz brdo-99338b789671f836fa87622385b05a29ac65ed21.tar.bz2 |
- Patch #144676 by webchick and dww: form API-fied user settings.
Diffstat (limited to 'modules/user/user.module')
-rw-r--r-- | modules/user/user.module | 72 |
1 files changed, 63 insertions, 9 deletions
diff --git a/modules/user/user.module b/modules/user/user.module index 73672b741..0c6662acf 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -2452,15 +2452,69 @@ function user_admin_settings() { $form['registration']['user_registration_help'] = array('#type' => 'textarea', '#title' => t('User registration guidelines'), '#default_value' => variable_get('user_registration_help', ''), '#description' => t("This text is displayed at the top of the user registration form. It's useful for helping or instructing your users.")); // User e-mail settings. - $form['email'] = array('#type' => 'fieldset', '#title' => t('User e-mail settings')); - $form['email']['user_mail_welcome_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail'), '#default_value' => _user_mail_text('welcome_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.'); - $form['email']['user_mail_welcome_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail'), '#default_value' => _user_mail_text('welcome_body'), '#rows' => 15, '#description' => t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !login_uri, !edit_uri, !login_url.'); - $form['email']['user_mail_admin_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail (user created by administrator)'), '#default_value' => _user_mail_text('admin_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your welcome e-mail, which is sent to new member accounts created by an administrator.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.'); - $form['email']['user_mail_admin_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail (user created by administrator)'), '#default_value' => _user_mail_text('admin_body'), '#rows' => 15, '#description' => t('Customize the body of the welcome e-mail, which is sent to new member accounts created by an administrator.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !login_uri, !edit_uri, !login_url.'); - $form['email']['user_mail_approval_subject'] = array('#type' => 'textfield', '#title' => t('Subject of welcome e-mail (awaiting admin approval)'), '#default_value' => _user_mail_text('approval_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.'); - $form['email']['user_mail_approval_body'] = array('#type' => 'textarea', '#title' => t('Body of welcome e-mail (awaiting admin approval)'), '#default_value' => _user_mail_text('approval_body'), '#rows' => 15, '#description' => t('Customize the body of the awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !login_uri, !edit_uri, !login_url.'); - $form['email']['user_mail_pass_subject'] = array('#type' => 'textfield', '#title' => t('Subject of password recovery e-mail'), '#default_value' => _user_mail_text('pass_subject'), '#maxlength' => 180, '#description' => t('Customize the subject of your forgotten password e-mail.') .' '. t('Available variables are:') .' !username, !site, !login_url, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri.'); - $form['email']['user_mail_pass_body'] = array('#type' => 'textarea', '#title' => t('Body of password recovery e-mail'), '#default_value' => _user_mail_text('pass_body'), '#rows' => 15, '#description' => t('Customize the body of the forgotten password e-mail.') .' '. t('Available variables are:') .' !username, !site, !login_url, !uri, !uri_brief, !mailto, !login_uri, !edit_uri.'); + $form['email'] = array( + '#type' => 'fieldset', + '#title' => t('User e-mail settings'), + ); + // These email tokens are shared for all settings, so just define + // the list once to help ensure they stay in sync. + $email_token_help = t('Available variables are:') .' !username, !site, !password, !uri, !uri_brief, !mailto, !date, !login_uri, !edit_uri, !login_url.'; + $form['email']['user_mail_welcome_subject'] = array( + '#type' => 'textfield', + '#title' => t('Subject of welcome e-mail'), + '#default_value' => _user_mail_text('welcome_subject'), + '#maxlength' => 180, + '#description' => t('Customize the subject of your welcome e-mail, which is sent to new members upon registering.') .' '. $email_token_help + ); + $form['email']['user_mail_welcome_body'] = array( + '#type' => 'textarea', + '#title' => t('Body of welcome e-mail'), + '#default_value' => _user_mail_text('welcome_body'), + '#rows' => 15, + '#description' => t('Customize the body of the welcome e-mail, which is sent to new members upon registering.') .' '. $email_token_help, + ); + $form['email']['user_mail_admin_subject'] = array( + '#type' => 'textfield', + '#title' => t('Subject of welcome e-mail (user created by administrator)'), + '#default_value' => _user_mail_text('admin_subject'), + '#maxlength' => 180, + '#description' => t('Customize the subject of your welcome e-mail, which is sent to new member accounts created by an administrator.') .' '. $email_token_help, + ); + $form['email']['user_mail_admin_body'] = array( + '#type' => 'textarea', + '#title' => t('Body of welcome e-mail (user created by administrator)'), + '#default_value' => _user_mail_text('admin_body'), + '#rows' => 15, + '#description' => t('Customize the body of the welcome e-mail, which is sent to new member accounts created by an administrator.') .' '. $email_token_help, + ); + $form['email']['user_mail_approval_subject'] = array( + '#type' => 'textfield', + '#title' => t('Subject of welcome e-mail (awaiting admin approval)'), + '#default_value' => _user_mail_text('approval_subject'), + '#maxlength' => 180, + '#description' => t('Customize the subject of your awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. $email_token_help, + ); + $form['email']['user_mail_approval_body'] = array( + '#type' => 'textarea', + '#title' => t('Body of welcome e-mail (awaiting admin approval)'), + '#default_value' => _user_mail_text('approval_body'), + '#rows' => 15, + '#description' => t('Customize the body of the awaiting approval welcome e-mail, which is sent to new members upon registering.') .' '. $email_token_help, + ); + $form['email']['user_mail_pass_subject'] = array( + '#type' => 'textfield', + '#title' => t('Subject of password recovery e-mail'), + '#default_value' => _user_mail_text('pass_subject'), + '#maxlength' => 180, + '#description' => t('Customize the subject of your forgotten password e-mail.') .' '. $email_token_help, + ); + $form['email']['user_mail_pass_body'] = array( + '#type' => 'textarea', + '#title' => t('Body of password recovery e-mail'), + '#default_value' => _user_mail_text('pass_body'), + '#rows' => 15, + '#description' => t('Customize the body of the forgotten password e-mail.') .' '. $email_token_help, + ); // User signatures. $form['signatures'] = array( |