summaryrefslogtreecommitdiff
path: root/modules/profile
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-03-07 08:05:02 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-03-07 08:05:02 +0000
commit7bc4ca4fdad9616ba1a9ff0b0a707562fd1b5b4f (patch)
tree294fea6081e50fe528d518fc4707d8bcb2a149db /modules/profile
parent9703e5d6e24fb8df2778c5d687128f90079aa023 (diff)
downloadbrdo-7bc4ca4fdad9616ba1a9ff0b0a707562fd1b5b4f.tar.gz
brdo-7bc4ca4fdad9616ba1a9ff0b0a707562fd1b5b4f.tar.bz2
#682486 by Bojhan: Clean-ups to profile page configuration form.
Diffstat (limited to 'modules/profile')
-rw-r--r--modules/profile/profile.admin.inc25
1 files changed, 11 insertions, 14 deletions
diff --git a/modules/profile/profile.admin.inc b/modules/profile/profile.admin.inc
index 72708a55a..d6e535598 100644
--- a/modules/profile/profile.admin.inc
+++ b/modules/profile/profile.admin.inc
@@ -180,7 +180,7 @@ function profile_field_form($form, &$form_state, $arg = NULL) {
drupal_not_found();
return;
}
- drupal_set_title(t('edit %title', array('%title' => $edit['title'])), PASS_THROUGH);
+ drupal_set_title(t('Edit %title', array('%title' => $edit['title'])), PASS_THROUGH);
$form['fid'] = array('#type' => 'value',
'#value' => $fid,
);
@@ -198,7 +198,7 @@ function profile_field_form($form, &$form_state, $arg = NULL) {
return;
}
$type = $arg;
- drupal_set_title(t('add new %type', array('%type' => $types[$type])), PASS_THROUGH);
+ drupal_set_title(t('Add new %type', array('%type' => $types[$type])), PASS_THROUGH);
$edit = array('name' => 'profile_');
$form['type'] = array('#type' => 'value', '#value' => $type);
}
@@ -212,30 +212,27 @@ function profile_field_form($form, &$form_state, $arg = NULL) {
'required' => '',
'register' => '',
);
- $form['fields'] = array('#type' => 'fieldset',
- '#title' => t('Field settings'),
- );
- $form['fields']['category'] = array('#type' => 'textfield',
+ $form['category'] = array('#type' => 'textfield',
'#title' => t('Category'),
'#default_value' => $edit['category'],
'#autocomplete_path' => 'admin/config/people/profile/autocomplete',
'#description' => t('The category the new field should be part of. Categories are used to group fields logically. An example category is "Personal information".'),
'#required' => TRUE,
);
- $form['fields']['title'] = array('#type' => 'textfield',
+ $form['title'] = array('#type' => 'textfield',
'#title' => t('Title'),
'#default_value' => $edit['title'],
'#description' => t('The title of the new field. The title will be shown to the user. An example title is "Favorite color".'),
'#required' => TRUE,
);
- $form['fields']['name'] = array('#type' => 'textfield',
+ $form['name'] = array('#type' => 'textfield',
'#title' => t('Form name'),
'#default_value' => $edit['name'],
'#description' => t('The name of the field. The form name is not shown to the user but used internally in the HTML code and URLs.
Unless you know what you are doing, it is highly recommended that you prefix the form name with <code>profile_</code> to avoid name clashes with other fields. Spaces or any other special characters except dash (-) and underscore (_) are not allowed. An example name is "profile_favorite_color" or perhaps just "profile_color".'),
'#required' => TRUE,
);
- $form['fields']['explanation'] = array('#type' => 'textarea',
+ $form['explanation'] = array('#type' => 'textarea',
'#title' => t('Explanation'),
'#default_value' => $edit['explanation'],
'#description' => t('An optional explanation to go with the new field. The explanation will be shown to the user.'),
@@ -247,7 +244,7 @@ Unless you know what you are doing, it is highly recommended that you prefix the
'#description' => t('A list of all options. Put each option on a separate line. Example options are "red", "blue", "green", etc.'),
);
}
- $form['fields']['visibility'] = array('#type' => 'radios',
+ $form['visibility'] = array('#type' => 'radios',
'#title' => t('Visibility'),
'#default_value' => isset($edit['visibility']) ? $edit['visibility'] : PROFILE_PUBLIC,
'#options' => array(PROFILE_HIDDEN => t('Hidden profile field, only accessible by administrators, modules and themes.'), PROFILE_PRIVATE => t('Private field, content only available to privileged users.'), PROFILE_PUBLIC => t('Public field, content shown on profile page but not used on member list pages.'), PROFILE_PUBLIC_LISTINGS => t('Public field, content shown on profile page and on member list pages.')),
@@ -266,21 +263,21 @@ Unless you know what you are doing, it is highly recommended that you prefix the
'#description' => t('To enable browsing this field by value, enter a title for the resulting page. An example page title is "People who are employed" . This is only applicable for a public field.'),
);
}
- $form['fields']['weight'] = array('#type' => 'weight',
+ $form['weight'] = array('#type' => 'weight',
'#title' => t('Weight'),
'#default_value' => $edit['weight'],
'#description' => t('The weights define the order in which the form fields are shown. Lighter fields "float up" towards the top of the category.'),
);
- $form['fields']['autocomplete'] = array('#type' => 'checkbox',
+ $form['autocomplete'] = array('#type' => 'checkbox',
'#title' => t('Form will auto-complete while user is typing.'),
'#default_value' => $edit['autocomplete'],
'#description' => t('For security, auto-complete will be disabled if the user does not have access to user profiles.'),
);
- $form['fields']['required'] = array('#type' => 'checkbox',
+ $form['required'] = array('#type' => 'checkbox',
'#title' => t('The user must enter a value.'),
'#default_value' => $edit['required'],
);
- $form['fields']['register'] = array('#type' => 'checkbox',
+ $form['register'] = array('#type' => 'checkbox',
'#title' => t('Visible in user registration form.'),
'#default_value' => $edit['register'],
);