summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Phillips2006-08-18 16:06:07 (GMT)
committer Chad Phillips2006-08-18 16:06:07 (GMT)
commit967880f1a17378b3a1416a36d24a97111d14dc4b (patch)
tree925195b4930252a7ab5ba56a0160ef8c21ba6c2c
parentb6c1f6bed70c505dbadf03e63ccc1076ed531912 (diff)
code cleanup and grammer on settings page.
-rwxr-xr-xlogintoboggan.module21
1 files changed, 12 insertions, 9 deletions
diff --git a/logintoboggan.module b/logintoboggan.module
index b04e640..ab5e947 100755
--- a/logintoboggan.module
+++ b/logintoboggan.module
@@ -548,6 +548,9 @@ function _logintoboggan_toggleboggan ($form) {
function logintoboggan_main_settings() {
$version .= str_replace(array('$Re'.'vision:', '$Da'.'te:', '$'), array('', '', ''), '<p style="font-size:x-small">Login Toboggan version: <b>$Revision$</b>, $Date$</p>');
+ $_disabled = t('disabled');
+ $_enabled = t('enabled');
+
$form['login'] = array('#type' => 'fieldset',
'#title' => t('Login'),
'#prefix' => $version,
@@ -556,8 +559,8 @@ function logintoboggan_main_settings() {
$form['login']['login_with_mail'] = array('#type' => 'radios',
'#title' => t('Allow users to login using their e-mail address'),
'#default_value' => variable_get('login_with_mail', 0),
- '#options' => array(t('disabled'), t('enabled')),
- '#description' => t('Users will be able to enter EITHER their username OR their e-mail address to log in. note: This will disallow users from registering using an e-mail address as their username.'),
+ '#options' => array($_disabled, $_enabled),
+ '#description' => t('Users will be able to enter EITHER their username OR their e-mail address to log in. NOTE: This will disallow users from registering using an e-mail address as their username.'),
);
$form['registration'] = array('#type' => 'fieldset',
@@ -567,15 +570,15 @@ function logintoboggan_main_settings() {
$form['registration']['email_reg_confirm'] = array('#type' => 'radios',
'#title' => t('Use two e-mail fields on registration form'),
'#default_value' => variable_get('email_reg_confirm', 0),
- '#options' => array(t('disabled'), t('enabled')),
+ '#options' => array($_disabled, $_enabled),
'#description' => t('User will have to type the same e-mail address into both fields. This helps to confirm that they\'ve typed the correct address.'),
);
$form['registration']['reg_passwd_set'] = array('#type' => 'radios',
'#title' => t('Allow user to set their password during registration'),
'#default_value' => variable_get('reg_passwd_set', 0),
- '#options' => array(t('Disabled'), t('Set password & Immediate login')),
- '#description' => t('This will allow users to choose their initial password when registering. If \'Set password & Immediate login\' is selected, users will be assigned to the role below and logged in immediately. They will not be assigned to the "authenticated user" role until they confirm their e-mail address by following the link in their registration e-mail. It is HIGHLY recommended that you set up a "pre-authorized" role with limited permissions for this purpose. <br />NOTE: If you enable either of this feature, you should edit the !settings--more help in writing the e-mail message can be found at !help.', array('!settings' => l('user e-mail welcome message', 'admin/user/settings'), '!help' => l('logintoboggan help', 'admin/help/logintoboggan'))),
+ '#options' => array($_disabled, t('Set password & Immediate login')),
+ '#description' => t('This will allow users to choose their initial password when registering. If \'Set password & Immediate login\' is selected, users will be assigned to the role below and logged in immediately. They will not be assigned to the "authenticated user" role until they confirm their e-mail address by following the link in their registration e-mail. It is HIGHLY recommended that you set up a "pre-authorized" role with limited permissions for this purpose. <br />NOTE: If you enable this feature, you should edit the !settings--more help in writing the e-mail message can be found at !help.', array('!settings' => l('user e-mail welcome message', 'admin/user/settings'), '!help' => l('logintoboggan help', 'admin/help/logintoboggan'))),
);
// Grab the roles that can be used for pre-auth. Remove the anon role, as it's not a valid choice.
@@ -585,7 +588,7 @@ function logintoboggan_main_settings() {
'#title' => t('Non-authenticated role'),
'#options' => $roles,
'#default_value' => variable_get('toboggan_role', 2),
- '#description' => t('If "Set password & Immediate login" is selected, users will be able to login before their e-mail address has been authenticated. Therefore, you must choose a role for new non-authenticated users. Users will be removed from this role and assigned to the "authenticated user" once they follow the link in their welcome e-mail. <a href="!url">Add new roles</a>.', array('!url' => url('admin/user/roles'))),
+ '#description' => t('If "Set password & Immediate login" is selected, users will be able to login before their e-mail address has been authenticated. Therefore, you must choose a role for new non-authenticated users. Users will be removed from this role and assigned to the "authenticated user" role once they follow the link in their welcome e-mail. <a href="!url">Add new roles</a>.', array('!url' => url('admin/user/roles'))),
);
$form['registration']['redirect'] = array(
@@ -599,7 +602,7 @@ function logintoboggan_main_settings() {
'#type' => 'textfield',
'#title' => t('Redirect path on Registration'),
'#default_value' => variable_get('toboggan_redirect_on_register', ''),
- '#description' => t('Normally, after a user registers a new account, they will be taken to the front page, or to their user page if you specify <cite>Immediate login</cite> above. Leave this setting blank if you wish to keep the default behavior. If you wish the user to go to a page of your choosing, then enter the path for it here. For instance, you may redirect them to a static page such as <cite>node/35</cite>, or to the <cite>&lt;front&gt;</cite> page. <em>Note: this feature will not work if you have the user password creation feature disabled.</em>'),
+ '#description' => t('Normally, after a user registers a new account, they will be taken to the front page, or to their user page if you specify <cite>Immediate login</cite> above. Leave this setting blank if you wish to keep the default behavior. If you wish the user to go to a page of your choosing, then enter the path for it here. For instance, you may redirect them to a static page such as <cite>node/35</cite>, or to the <cite>&lt;front&gt;</cite> page. <em>NOTE: this feature will not work if you have the user password creation feature disabled.</em>'),
);
$form['registration']['redirect']['toboggan_redirect_on_confirm'] = array(
@@ -621,7 +624,7 @@ function logintoboggan_main_settings() {
else {
$disabled = $site403;
}
- $options = array($disabled => t('disabled'), 'toboggan/denied' => t('enabled'));
+ $options = array($disabled => $_disabled, 'toboggan/denied' => $_enabled);
$form['other']['site_403'] = array(
'#type' => 'radios',
@@ -633,7 +636,7 @@ function logintoboggan_main_settings() {
$form['other']['login_successful'] = array(
'#type' => 'radios',
'#title' => t('Display login successful message'),
- '#options' => array(t('disabled'), t('enabled')),
+ '#options' => array($_disabled, $_enabled),
'#default_value' => variable_get('login_successful', 0),
'#description' => t('If enabled, users will receive a \'Login successful\' message upon login.')
);