Commit 5e153ae5 authored by liquidcms's avatar liquidcms Committed by Joel Muzzerall
Browse files

Issue #1781774 by liquidcms: Added link to field collection manage fields from...

Issue #1781774 by liquidcms: Added link to field collection manage fields from node manage fields page.
parent 09641997
......@@ -32,6 +32,26 @@ function field_collection_form_alter(&$form, &$form_state) {
}
}
/**
* Implements hook_form_FORM_ID_alter() for field_ui_field_overview_form().
*
* Make the names of the field collection fields into links to edit the fields
* for that field collection on the host's field edit page.
*/
function field_collection_form_field_ui_field_overview_form_alter(&$form, &$form_state) {
if (count($form['#fields'])) {
foreach($form['fields'] as $fieldname => $field) {
if (!isset($field['type']['#title'])) {
continue;
}
if ($field['type']['#title'] == 'Field collection') {
$form['fields'][$fieldname]['field_name']['#markup'] =
l($form['fields'][$fieldname]['field_name']['#markup'], 'admin/structure/field-collections/' . str_replace('_', '-', $fieldname) . '/fields');
}
}
}
}
/**
* Implements hook_ctools_plugin_directory().
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment