Move implementations of hook_form_FORM_ID_alter() to farm_data_field.module.
This commit is contained in:
parent
d53d67d047
commit
b0cac436a4
|
@ -93,3 +93,25 @@ function farm_data_field_farm_fields_dynamic_instances() {
|
|||
// Return the array of field instance definitions.
|
||||
return $field_instances;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function farm_data_field_form_log_form_alter(&$form, &$form_state, $form_id) {
|
||||
|
||||
// Hide the data field in log forms.
|
||||
if (!empty($form['field_farm_data'])) {
|
||||
$form['field_farm_data']['#access'] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function farm_data_field_form_farm_asset_form_alter(&$form, &$form_state, $form_id) {
|
||||
|
||||
// Hide the data field in asset forms.
|
||||
if (!empty($form['field_farm_data'])) {
|
||||
$form['field_farm_data']['#access'] = FALSE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,28 +32,6 @@ function farm_fields_farm_access_perms($role) {
|
|||
return $perms;
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function farm_fields_form_log_form_alter(&$form, &$form_state, $form_id) {
|
||||
|
||||
// Hide the data field in log forms.
|
||||
if (!empty($form['field_farm_data'])) {
|
||||
$form['field_farm_data']['#access'] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_form_FORM_ID_alter().
|
||||
*/
|
||||
function farm_fields_form_farm_asset_form_alter(&$form, &$form_state, $form_id) {
|
||||
|
||||
// Hide the data field in asset forms.
|
||||
if (!empty($form['field_farm_data'])) {
|
||||
$form['field_farm_data']['#access'] = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Implements hook_field_default_field_instances_alter().
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue