feat(main): Groups and blocks
This commit is contained in:
+6
-6
@@ -1,25 +1,25 @@
|
||||
{% import '@PrestaShop/Admin/macros.html.twig' as ps %}
|
||||
{% form_theme customHtmlForm '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
{% form_theme customHtmlBlockForm '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block customhtml_form_block %}
|
||||
{% block customhtmlblock_form_block %}
|
||||
<div class="card">
|
||||
{{ form_start(customHtmlForm) }}
|
||||
{{ form_start(customHtmlBlockForm) }}
|
||||
<div class="card-header">
|
||||
<h3 class="card-header-title">
|
||||
{{ 'Custom HTML Block'|trans({}, 'Modules.Wscustomhtml.Admin') }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_rest(customHtmlForm) }}
|
||||
{{ form_rest(customHtmlBlockForm) }}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="{{ path('customhtml_index') }}" class="btn btn-outline-secondary">
|
||||
<a href="{{ path('customhtmlblock_index') }}" class="btn btn-outline-secondary">
|
||||
{{ 'Cancel'|trans({}, 'Admin.Actions') }}
|
||||
</a>
|
||||
<button class="btn btn-primary float-right">
|
||||
{{ 'Save'|trans({}, 'Admin.Actions') }}
|
||||
</button>
|
||||
</div>
|
||||
{{ form_end(customHtmlForm) }}
|
||||
{{ form_end(customHtmlBlockForm) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,30 @@
|
||||
{% import '@PrestaShop/Admin/macros.html.twig' as ps %}
|
||||
{% form_theme customHtmlGroupForm '@PrestaShop/Admin/TwigTemplateForm/prestashop_ui_kit.html.twig' %}
|
||||
|
||||
{% block customhtmlgroup_form_block %}
|
||||
<div class="card">
|
||||
{{ form_start(customHtmlGroupForm) }}
|
||||
<div class="card-header">
|
||||
<h3 class="card-header-title">
|
||||
{{ 'Custom HTML Group'|trans({}, 'Modules.Wscustomhtml.Admin') }}
|
||||
</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{{ form_rest(customHtmlGroupForm) }}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a href="{{ path('customhtmlgroup_index') }}" class="btn btn-outline-secondary">
|
||||
{{ 'Cancel'|trans({}, 'Admin.Actions') }}
|
||||
</a>
|
||||
{% if idCustomHtmlGroup is defined %}
|
||||
<a href="{{ path('customhtmlblock_create', {'idGroup': idCustomHtmlGroup}) }}" class="btn btn-outline-primary">
|
||||
{{ 'Add block'|trans({}, 'Modules.Wscustomhtml.Admin') }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<button class="btn btn-primary float-right">
|
||||
{{ 'Save'|trans({}, 'Admin.Actions') }}
|
||||
</button>
|
||||
</div>
|
||||
{{ form_end(customHtmlGroupForm) }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
+2
-4
@@ -1,8 +1,8 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% block customhtml_edit_form %}
|
||||
{% include '@Modules/ws_customhtml/views/templates/admin/form/blocks/form.html.twig' %}
|
||||
{% block customhtmlblock_create_form %}
|
||||
{% include '@Modules/ws_customhtml/views/templates/admin/form/blocks/block_form.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
window.prestashop.component.initComponents([
|
||||
'TranslatableField',
|
||||
'TinyMCEEditor',
|
||||
'TranslatableInput',
|
||||
]);
|
||||
});
|
||||
</script>
|
||||
+2
-4
@@ -1,8 +1,8 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% block customhtml_create_form %}
|
||||
{% include '@Modules/ws_customhtml/views/templates/admin/form/blocks/form.html.twig' %}
|
||||
{% block customhtmlblock_edit_form %}
|
||||
{% include '@Modules/ws_customhtml/views/templates/admin/form/blocks/block_form.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -11,9 +11,7 @@
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
window.prestashop.component.initComponents([
|
||||
'TranslatableField',
|
||||
'TinyMCEEditor',
|
||||
'TranslatableInput',
|
||||
]);
|
||||
});
|
||||
</script>
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% block customhtmlgroup_create_form %}
|
||||
{% include '@Modules/ws_customhtml/views/templates/admin/form/blocks/group_form.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,7 @@
|
||||
{% extends '@PrestaShop/Admin/layout.html.twig' %}
|
||||
|
||||
{% block content %}
|
||||
{% block customhtmlgroup_edit_form %}
|
||||
{% include '@Modules/ws_customhtml/views/templates/admin/form/blocks/group_form.html.twig' %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user