function _user_import_edit_template_fields in User Import 5.2
Same name and namespace in other branches
- 8 supported/user_import.inc \_user_import_edit_template_fields()
- 5 supported/user_import.inc \_user_import_edit_template_fields()
- 6.4 supported/user_import.inc \_user_import_edit_template_fields()
- 6.2 supported/user_import.inc \_user_import_edit_template_fields()
- 7.3 supported/user_import.inc \_user_import_edit_template_fields()
- 7 supported/user_import.inc \_user_import_edit_template_fields()
- 7.2 supported/user_import.inc \_user_import_edit_template_fields()
1 call to _user_import_edit_template_fields()
- user_import_user_import_form_fieldset in supported/
user_import.inc - Implementation of hook_user_import_form_fieldsets(). Add fieldsets to an import settings form.
File
- supported/
user_import.inc, line 149
Code
function _user_import_edit_template_fields(&$form, $import) {
// settings template update controls
if (empty($import['name'])) {
// new settings template save controls
$form['save'] = array(
'#type' => 'fieldset',
'#title' => t('Save Settings'),
'#description' => t('Save settings for re-use on other imports.'),
'#weight' => 90,
'#collapsible' => TRUE,
'#collapsed' => FALSE,
);
$form['save']['name'] = array(
'#type' => 'textfield',
'#title' => t('Settings Name'),
'#size' => 26,
'#maxlength' => 25,
'#description' => t('Name to identify these settings by.'),
);
$form['save'][] = array(
'#type' => 'submit',
'#value' => t('Save'),
);
}
else {
$form['save'] = array(
'#type' => 'fieldset',
'#title' => t('Saved Settings'),
'#description' => t("If changes have neen made to the settings since they where last saved you can update the saved template, or save them as a new template."),
'#weight' => 90,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['save']['name'] = array(
'#type' => 'value',
'#value' => $import['name'],
);
$form['save']['update'] = array(
'#type' => 'fieldset',
'#title' => t('Update'),
'#description' => t("Update '%name' settings template", array(
'%name' => $import['name'],
)),
);
$form['save']['update']['submit'] = array(
'#type' => 'submit',
'#value' => t('Update'),
);
$form['save']['new'] = array(
'#type' => 'fieldset',
'#title' => t('Create New'),
'#description' => t("Save as new settings template"),
);
$form['save']['new']['new_name'] = array(
'#type' => 'textfield',
'#title' => t('Save As New'),
'#size' => 30,
'#maxlength' => 25,
'#description' => t('Name to identify these settings by.'),
);
$form['save']['new'][] = array(
'#type' => 'submit',
'#value' => t('Save As New'),
);
}
return;
}