Repository navigation
refactor: migrate config form to Twig template - #340
giovanny07 wants to merge 1 commit into
Conversation
| <h3 class="card-title">{{ __('Tag Management', 'tag') }}</h3> | ||
| </div> | ||
|
|
||
| <form method="post" action="{{ form_action }}"> |
There was a problem hiding this comment.
With Twig, you don’t need to manually handle the <form> DOM.
You simply need to add the following line at the top of your file:
{% extends "pages/setup/general/base_form.html.twig" %}This will automatically manage the form structure, including the “Save” button.
There was a problem hiding this comment.
Thanks @stonebuzz, sorry for the delay. The template now extends pages/setup/general/base_form.html.twig and only fills the config_fields block, so the form, CSRF handling and Save button come from core. I also rebased on main to clear the conflicts. Checked on GLPI 12.0.0: the tab renders and saving tags_location persists.
|
There has been no activity on this pull request for 90 days and therefore it is considered stale and will be closed automatically in 14 days. Feel free to add a comment or push new commits to keep it open. |
ec7baae to
f46fe0d
Compare
Replaces the raw HTML
echostatements inPluginTagConfig::showConfigForm()with a Twig template (templates/forms/config.html.twig) using Bootstrap 5 card layout andfields_macros, consistent with the rest of the plugin'sGLPI 11 forms.
No functional changes — only presentation layer refactor.