Link birth quick form to assets and logs created by it.
This commit is contained in:
parent
707295d2a8
commit
9895a39d89
|
@ -336,6 +336,9 @@ function farm_livestock_birth_form_submit($form, &$form_state) {
|
|||
// Add it to the array.
|
||||
$children[] = $child_asset;
|
||||
|
||||
// Link the asset to this quick form.
|
||||
farm_quick_entity_link('farm_livestock_birth_form', 'farm_asset', $child_asset);
|
||||
|
||||
// Set a message.
|
||||
$label = entity_label('farm_asset', $child_asset);
|
||||
$uri = entity_uri('farm_asset', $child_asset);
|
||||
|
@ -389,6 +392,9 @@ function farm_livestock_birth_form_submit($form, &$form_state) {
|
|||
// Save the log.
|
||||
$log_wrapper->save();
|
||||
|
||||
// Link the log to the quick form.
|
||||
farm_quick_entity_link('farm_livestock_birth_form', 'log', $log);
|
||||
|
||||
// Set a message linking to the mother animal.
|
||||
$label = entity_label('farm_asset', $parents['mother']);
|
||||
$uri = entity_uri('farm_asset', $parents['mother']);
|
||||
|
|
Loading…
Reference in New Issue