lot of formfield corrections; form-adjustments; implementing of add/edit for most customer_* pages
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
{% macro form(form_data, action, title = "") %}
|
||||
{% macro form(form_data, formaction, title = "") %}
|
||||
|
||||
{% import "Froxlor/form/formfields.html.twig" as formfields %}
|
||||
|
||||
<form action="{{ action|default("") }}" method="post" enctype="application/x-www-form-urlencoded" class="form">
|
||||
<form action="{{ formaction|default("") }}" method="post" enctype="application/x-www-form-urlencoded" class="form">
|
||||
{% if title is not empty %}
|
||||
<h3 class="page-header">
|
||||
{% if form_data.image is not empty %}
|
||||
@@ -29,5 +29,20 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<!-- submit buttons -->
|
||||
<div class="card mb-3">
|
||||
<div class="card-body">
|
||||
<input type="hidden" name="s" value="{{ s }}"/>
|
||||
<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-center">
|
||||
<button type="reset" class="btn btn-warning">{{ lng('panel.cancel') }}</button>
|
||||
<button type="submit" class="btn btn-success">{{ lng('panel.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
{% endmacro %}
|
||||
|
||||
@@ -73,6 +73,9 @@
|
||||
{% if field.type == 'hidden' and field.display is defined %}
|
||||
<input type="text" readonly class="form-control-plaintext" value="{{ field.display }}">
|
||||
{% endif %}
|
||||
{% if field.note is defined and field.note is not empty %}
|
||||
<div class="invalid-feedback">{{ field.note|raw }}</div>
|
||||
{% endif %}
|
||||
{% if field.next_to is defined %}
|
||||
{% for nid, nfield in field.next_to %}
|
||||
{% if nfield.next_to_prefix is defined %}
|
||||
|
||||
34
templates/Froxlor/form/yesnoquestion.html.twig
Normal file
34
templates/Froxlor/form/yesnoquestion.html.twig
Normal file
@@ -0,0 +1,34 @@
|
||||
{% extends "Froxlor/userarea.html.twig" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form action="{{ action|default("") }}" method="post" enctype="application/x-www-form-urlencoded" class="form">
|
||||
|
||||
<div class="alert alert-warning" role="alert">
|
||||
<h4 class="alert-heading">{{ lng('panel.security_question') }}</h4>
|
||||
<p>{{ question|raw }}</p>
|
||||
{% if with_checkbox is defined and with_checkbox is iterable %}
|
||||
{% if with_checkbox.show %}
|
||||
<div class="form-check form-switch">
|
||||
<input class="form-check-input" type="checkbox" id="delete_userfiles" name="delete_userfiles" value="1">
|
||||
<label class="form-check-label" for="delete_userfiles">{{ with_checkbox.chk_text|raw }}</label>
|
||||
</div>
|
||||
{% else %}
|
||||
<input type="hidden" name="delete_userfiles" value="0"/>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<hr>
|
||||
<p class="mb-0">
|
||||
<input type="hidden" name="s" value="{{ s }}"/>
|
||||
<input type="hidden" name="send" value="send"/>
|
||||
{% for id,field in url_params %}
|
||||
<input type="hidden" name="{{ id }}" value="{{ field }}"/>
|
||||
{% endfor %}
|
||||
<button class="btn btn-danger" type="submit" name="submitbutton">{{ lng('panel.yes') }}</button>
|
||||
<a href="javascript:history.back(-1)" class="btn btn-secondary">{{ lng('panel.no') }}</a>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user