mirror of
https://github.com/Aviortheking/DeltaCMS.git
synced 2025-04-22 19:02:12 +00:00
Changed Twig templates
Changed twig template to reflect changes in precedent commit
This commit is contained in:
parent
cacdc2c3d6
commit
64a836c0e4
@ -1,14 +1,20 @@
|
||||
{# Default label if type is not found #}
|
||||
{% spaceless %}
|
||||
{% block form %}
|
||||
{% if label %}
|
||||
<label for="{{ name }}">{{label}}</label>
|
||||
{% if name is null %}
|
||||
{% set name = "input" %}
|
||||
{% endif %}
|
||||
<input
|
||||
type="{{ type }}"
|
||||
name="{{ name }}"
|
||||
id="{{ name }}"
|
||||
{% for index, item in attr %}{{index}}="{{item}}" {% endfor %}
|
||||
|
||||
{% block before %}{% endblock %}
|
||||
{% if options.label %}
|
||||
<label for="{{atributes.id }}">{{ options.label }}</label>
|
||||
{% endif %}
|
||||
<{{ name }}
|
||||
{% for index, item in attributes %}{{index}}="{{item}}" {% endfor %}
|
||||
{% if name == "input" %}
|
||||
/>
|
||||
{% endblock %}
|
||||
{% else %}
|
||||
>
|
||||
{% block content %}{% endblock %}
|
||||
</{{ name }}>
|
||||
{% endif %}
|
||||
{% block after %}{% endblock %}
|
||||
{% endspaceless %}
|
||||
|
@ -1,17 +1,13 @@
|
||||
{% extends "@AdminPanel/form/_default.twig" %}
|
||||
|
||||
{% block form %}
|
||||
{% if label %}
|
||||
<label for="{{ name }}">{{ label }}</label>
|
||||
{% endif %}
|
||||
<select name="{{ name }}" id="{{ name }}" {% for index, item in attr %}{{index}}="{{item}}" {% endfor %}>
|
||||
{% for choice in choices %}
|
||||
{% if loop.index0 == value %}
|
||||
<option value="{{ loop.index0 }}" selected>{{ choice }}</option>
|
||||
{% else %}
|
||||
<option value="{{ loop.index0 }}">{{ choice }}</option>
|
||||
{% endif %}
|
||||
{% set name = "select" %}
|
||||
|
||||
{% block content %}
|
||||
{% for choice in options.choices %}
|
||||
{% if choice == options.value %}
|
||||
<option selected>{{ choice }}</option>
|
||||
{% else %}
|
||||
<option>{{ choice }}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
{% endblock %}
|
||||
|
@ -1,10 +1 @@
|
||||
{% extends "@AdminPanel/form/_default.twig" %}
|
||||
{% block form %}
|
||||
<input
|
||||
type="date"
|
||||
name="{{name}}"
|
||||
id="{{name}}"
|
||||
{% if value is not null %}value="{{value|date("Y-m-d")}}"{% endif %}
|
||||
{% for index, item in attr %}{{index}}="{{item}}" {% endfor %}
|
||||
/>
|
||||
{% endblock %}
|
||||
|
@ -1,13 +1,15 @@
|
||||
{% extends "@AdminPanel/form/_default.twig" %}
|
||||
{% block form %}
|
||||
{% if label %}
|
||||
<label for="{{name}}">{{label}}</label>
|
||||
{% endif %}
|
||||
|
||||
<input type="text" name="{{name}}" id="{{name}}" list="{{name}}_list" {% for index, item in attr %}{{index}}="{{item}}" {% endfor %}/>
|
||||
<datalist id="{{name}}_list">
|
||||
{% for entity in entities %}
|
||||
{% block after %}
|
||||
<datalist id="{{ attributes.list }}">
|
||||
{% for entity in options.entities %}
|
||||
{% if entity.name is not null %}
|
||||
<option>{{entity.name}}</option>
|
||||
{% elseif entity.firstname is not null %}
|
||||
<option>{{entity.firstname}}</option>
|
||||
{% else %}
|
||||
<option>{{entity.id}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</datalist>
|
||||
</datalist>
|
||||
{% endblock %}
|
||||
|
@ -1,9 +1 @@
|
||||
{% extends "@AdminPanel/form/_default.twig" %}
|
||||
|
||||
{% block form %}
|
||||
|
||||
{% if label %}
|
||||
<label for="{{name}}" />{{label}}</label>
|
||||
{% endif %}
|
||||
<input {% if value is not null %}value="{{value}}"{% endif %} type="text" name="{{name}}" id="{{name}}" {% for index, item in attr %}{{index}}="{{item}}" {% endfor %}/>
|
||||
{% endblock %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user