all contrib module security updates done
This commit is contained in:
@@ -14,20 +14,16 @@ function title_form_field_ui_overview(&$form, &$form_state) {
|
||||
if (!empty($entity_info['field replacement'])) {
|
||||
$field_replacement_info = $entity_info['field replacement'];
|
||||
$admin_path = _field_ui_bundle_admin_path($form['#entity_type'], $form['#bundle']);
|
||||
$form['fields']['#header'][6]['colspan'] += 1;
|
||||
|
||||
foreach (element_children($form['fields']) as $field_name) {
|
||||
if (isset($field_replacement_info[$field_name])) {
|
||||
$form['fields'][$field_name]['field_replacement'] = array(
|
||||
$form['fields'][$field_name]['delete'] = array(
|
||||
'#type' => 'link',
|
||||
'#title' => t('replace'),
|
||||
'#href' => $admin_path . '/fields/replace/' . $field_name,
|
||||
'#options' => array('attributes' => array('title' => t('Replace %field with a customizable field instance that can be translated.', array('%field' => $field_name)))),
|
||||
);
|
||||
}
|
||||
else {
|
||||
$form['fields'][$field_name]['field_replacement'] = array();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +56,7 @@ function title_field_replacement_form($form, $form_state, $entity_type, $bundle,
|
||||
}
|
||||
|
||||
/**
|
||||
* Process field replacement form subissions.
|
||||
* Process field replacement form submissions.
|
||||
*/
|
||||
function title_field_replacement_form_submit($form, &$form_state) {
|
||||
if ($form_state['values']['enabled'] != $form['enabled']['#default_value']) {
|
||||
@@ -76,13 +72,31 @@ function title_field_replacement_form_submit($form, &$form_state) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Form settings for automated title_field attachement.
|
||||
* Form settings for automated title_field attachment.
|
||||
*/
|
||||
function title_admin_settings_form() {
|
||||
$form['tabs'] = array(
|
||||
'#type' => 'vertical_tabs',
|
||||
);
|
||||
|
||||
$form['settings']['title_general'] = array(
|
||||
'#type' => 'fieldset',
|
||||
'#collapsible' => TRUE,
|
||||
'#collapsed' => TRUE,
|
||||
'#tree' => TRUE,
|
||||
'#group' => 'tabs',
|
||||
'#title' => t('General'),
|
||||
);
|
||||
|
||||
$general = variable_get('title_general', array('maxlength' => 255));
|
||||
$form['settings']['title_general']['maxlength'] = array(
|
||||
'#type' => 'textfield',
|
||||
'#title' => t('Default maximum field length'),
|
||||
'#description' => t('The default maximum length for the title field. This setting will have no effect once a title field for a specific entity type has been created, because the maximum field length is a global field setting and the databases tables will already have been created with a specific length.'),
|
||||
'#element_validate' => array('element_validate_integer_positive'),
|
||||
'#default_value' => $general['maxlength'],
|
||||
);
|
||||
|
||||
foreach (entity_get_info() as $entity_type => $info) {
|
||||
if (empty($info['field replacement'])) {
|
||||
continue;
|
||||
@@ -94,7 +108,7 @@ function title_admin_settings_form() {
|
||||
'#collapsed' => TRUE,
|
||||
'#tree' => TRUE,
|
||||
'#group' => 'tabs',
|
||||
'#title' => $info['label'],
|
||||
'#title' => check_plain($info['label']),
|
||||
);
|
||||
|
||||
$options = array();
|
||||
|
||||
Reference in New Issue
Block a user