Add actions to Relation Manage Form
0
If you want to modify the Relation behavior default Manage Form, just copy the original partial (from modules/backend/behaviors/relationcontroller/partials/_manage_form.php
) to your controller's partial folder, prefixing "_relation" to the original partial name.
Modify to your liking. An example to add a "delete" action is shown below:
<button
type="button"
class="oc-icon-trash-o btn-icon danger m-l-lg"
data-request="onRelationButtonDelete"
data-request-data="checked:[<?= $relationManageId ?>]"
data-request-confirm="<?= e(trans('backend::lang.relation.delete_confirm')) ?>"
data-request-success="$(this).trigger('close.oc.popup')">
</button>
Starting with Winter v2.1.4, you will be able to override only the following partials:
- _manage_form_footer_create.php
- _manage_form_footer_update.php
- _manage_pivot_footer.php
- _pivot_form_footer.php
There are no comments yet
Be the first one to comment