Merge branch '0.11-dev' of github.com:Froxlor/Froxlor into 0.11-dev
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% macro form(form_data, formaction, title = "", hiddenid = "") %}
|
||||
{% macro form(form_data, formaction, title = "", hiddenid = "", nosubmit = false) %}
|
||||
|
||||
{% import "Froxlor/form/formfields.html.twig" as formfields %}
|
||||
|
||||
@@ -21,25 +21,27 @@
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<!-- submit buttons -->
|
||||
<div>
|
||||
{% if hiddenid is not empty %}
|
||||
<input type="hidden" name="id" value="{{ hiddenid }}"/>
|
||||
{% endif %}
|
||||
<input type="hidden" name="page" value="{{ page }}"/>
|
||||
<input type="hidden" name="action" value="{{ action }}"/>
|
||||
<input type="hidden" name="send" value="send"/>
|
||||
|
||||
<div class="col-12 text-end">
|
||||
{% if form_data.buttons is defined and form_data.buttons is iterable %}
|
||||
{% for btn in form_data.buttons %}
|
||||
<button type="{{ btn.type|default("submit") }}" class="btn {{ btn.class|default(" btn-primary") }}">{{ btn.label }}</button>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<button type="reset" class="btn btn-outline-secondary">{{ lng('panel.cancel') }}</button>
|
||||
<button type="submit" class="btn btn-primary">{{ lng('panel.save') }}</button>
|
||||
{% if nosubmit == false %}
|
||||
<!-- submit buttons -->
|
||||
<div>
|
||||
{% if hiddenid is not empty %}
|
||||
<input type="hidden" name="id" value="{{ hiddenid }}"/>
|
||||
{% endif %}
|
||||
<input type="hidden" name="page" value="{{ page }}"/>
|
||||
<input type="hidden" name="action" value="{{ action }}"/>
|
||||
<input type="hidden" name="send" value="send"/>
|
||||
|
||||
<div class="col-12 text-end">
|
||||
{% if form_data.buttons is defined and form_data.buttons is iterable %}
|
||||
{% for btn in form_data.buttons %}
|
||||
<button type="{{ btn.type|default("submit") }}" class="btn {{ btn.class|default(" btn-primary") }}">{{ btn.label }}</button>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<button type="reset" class="btn btn-outline-secondary">{{ lng('panel.cancel') }}</button>
|
||||
<button type="submit" class="btn btn-primary">{{ lng('panel.save') }}</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
|
||||
<div class="row mb-2">
|
||||
<textarea cols="12" rows="4" readonly class="form-control w-100">`which php` {{ basedir }}install/scripts/config-services.php --froxlor-dir={{ basedir }} --apply={{ params_filename }}
|
||||
<textarea cols="12" rows="4" readonly class="form-control w-100">{{ basedir }}bin/froxlor-cli froxlor:config-services --apply={{ params_filename }}
|
||||
rm {{ params_filename }}</textarea>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
{% extends "Froxlor/settings/index.html.twig" %}
|
||||
|
||||
{% block actions %}
|
||||
<a class="btn btn-outline-primary" href="{{ linker({'section':'settings','page':'overview','part':'all'}) }}">
|
||||
<i class="fa-solid fa-grip me-1"></i>
|
||||
{{ lng('admin.configfiles.overview') }}
|
||||
</a>
|
||||
<a class="btn btn-outline-secondary" href="{{ linker({'section':'settings','page':'importexport'}) }}">
|
||||
<i class="fa-solid fa-file-import me-1"></i>
|
||||
{{ lng('admin.configfiles.importexport') }}
|
||||
</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block settings %}
|
||||
|
||||
{% import "Froxlor/form/formfields.html.twig" as formfields %}
|
||||
|
||||
@@ -11,9 +11,14 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block actions %}
|
||||
<a class="btn btn-outline-primary" href="{{ linker({'section':'settings','page':'overview','part':'all'}) }}">
|
||||
<i class="fa-solid fa-grip me-1"></i>
|
||||
{{ lng('admin.configfiles.overview') }}
|
||||
<a class="btn btn-outline-secondary" href="{{ linker({'section':'settings','page':'toggleSettingsMode'}) }}" title="{{ lng('panel.settingsmodetoggle') }}">
|
||||
{% if get_setting('panel.settings_mode') == 0 %}
|
||||
<i class="fa-solid fa-maximize me-1"></i>
|
||||
{{ lng('panel.settingsmode') }}: {{ lng('panel.settingsmodebasic') }}
|
||||
{% else %}
|
||||
<i class="fa-solid fa-minimize me-1"></i>
|
||||
{{ lng('panel.settingsmode') }}: {{ lng('panel.settingsmodeadvanced') }}
|
||||
{% endif %}
|
||||
</a>
|
||||
<a class="btn btn-outline-secondary" href="{{ linker({'section':'settings','page':'importexport'}) }}">
|
||||
<i class="fa-solid fa-file-import me-1"></i>
|
||||
|
||||
@@ -31,27 +31,45 @@
|
||||
|
||||
{% macro link(data) %}
|
||||
{% apply spaceless %}
|
||||
<a href="{{ data.href }}" {% if data.class is defined %} class="{{ data.class }}" {% endif %} {% if data.target is defined %} target="{{ data.target }}" {% endif %}{% if data.title is defined %} title="{{ data.title }}" {% endif %}>
|
||||
{% if data.icon is defined %}
|
||||
<i class="{{ data.icon }}"></i>
|
||||
{% endif %}
|
||||
{% if data.text is defined %}
|
||||
{{ data.text }}
|
||||
{% endif %}
|
||||
</a>
|
||||
<a href="{{ data.href }}" {% if data.class is defined %} class="{{ data.class }}" {% endif %} {% if data.target is defined %} target="{{ data.target }}" {% endif %} {% if data.title is defined %} title="{{ data.title }}" {% endif %}>
|
||||
{% if data.icon is defined %}
|
||||
<i class="{{ data.icon }}"></i>
|
||||
{% endif %}
|
||||
{% if data.text is defined %}
|
||||
{{ data.text }}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
{% macro button(data) %}
|
||||
{% apply spaceless %}
|
||||
<a class="{% if data.class is defined %}btn btn-sm {{ data.class }}{% else %}btn btn-sm btn-outline-secondary{% endif %}" href="{{ data.href }}" {% if data.target is defined %} target="{{ data.target }}" {% endif %}{% if data.title is defined %} title="{{ data.title }}" {% endif %}>
|
||||
{% if data.icon is defined %}
|
||||
<i class="{{ data.icon }}"></i>
|
||||
{% endif %}
|
||||
{% if data.text is defined %}
|
||||
{{ data.text }}
|
||||
{% endif %}
|
||||
</a>
|
||||
<a class="{% if data.class is defined %}btn btn-sm {{ data.class }}{% else %}btn btn-sm btn-outline-secondary{% endif %}" {% if data.modal is defined and data.modal is iterable %} data-bs-toggle="modal" role="button" href="#{{ data.modal.id }}" {% else %} href="{{ data.href }}" {% endif %} {% if data.target is defined %} target="{{ data.target }}" {% endif %} {% if data.title is defined %} title="{{ data.title }}" {% endif %}>
|
||||
{% if data.icon is defined %}
|
||||
<i class="{{ data.icon }}"></i>
|
||||
{% endif %}
|
||||
{% if data.text is defined %}
|
||||
{{ data.text }}
|
||||
{% endif %}
|
||||
</a>
|
||||
{% if data.modal is defined and data.modal is iterable %}
|
||||
<div class="modal fade" id="{{ data.modal.id }}" aria-hidden="true" aria-labelledby="{{ data.modal.id }}Label" tabindex="-1">
|
||||
<div class="modal-dialog {{ data.modal.size|default('modal-xl') }} modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="{{ data.modal.id }}Label">{{ data.modal.title }}</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="{{ lng('panel.modalclose') }}"></button>
|
||||
</div>
|
||||
<div class="modal-body text-start">
|
||||
{{ data.modal.body|raw }}
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-primary" data-bs-dismiss="modal">{{ lng('panel.modalclose') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endapply %}
|
||||
{% endmacro %}
|
||||
|
||||
|
||||
2
templates/Froxlor/user/inline-form.html.twig
Normal file
2
templates/Froxlor/user/inline-form.html.twig
Normal file
@@ -0,0 +1,2 @@
|
||||
{% import "Froxlor/form/form.html.twig" as form %}
|
||||
{{ form.form(formdata, formaction|default('#'), formdata.title, editid|default(''), true) }}
|
||||
Reference in New Issue
Block a user