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 %}
|
{% spaceless %}
|
||||||
{% block form %}
|
{% if name is null %}
|
||||||
{% if label %}
|
{% set name = "input" %}
|
||||||
<label for="{{ name }}">{{label}}</label>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<input
|
|
||||||
type="{{ type }}"
|
{% block before %}{% endblock %}
|
||||||
name="{{ name }}"
|
{% if options.label %}
|
||||||
id="{{ name }}"
|
<label for="{{atributes.id }}">{{ options.label }}</label>
|
||||||
{% for index, item in attr %}{{index}}="{{item}}" {% endfor %}
|
{% endif %}
|
||||||
|
<{{ name }}
|
||||||
|
{% for index, item in attributes %}{{index}}="{{item}}" {% endfor %}
|
||||||
|
{% if name == "input" %}
|
||||||
/>
|
/>
|
||||||
{% endblock %}
|
{% else %}
|
||||||
|
>
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
</{{ name }}>
|
||||||
|
{% endif %}
|
||||||
|
{% block after %}{% endblock %}
|
||||||
{% endspaceless %}
|
{% endspaceless %}
|
||||||
|
@ -1,17 +1,13 @@
|
|||||||
{% extends "@AdminPanel/form/_default.twig" %}
|
{% extends "@AdminPanel/form/_default.twig" %}
|
||||||
|
|
||||||
{% block form %}
|
{% set name = "select" %}
|
||||||
{% 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 %}
|
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
{% for choice in options.choices %}
|
||||||
|
{% if choice == options.value %}
|
||||||
|
<option selected>{{ choice }}</option>
|
||||||
|
{% else %}
|
||||||
|
<option>{{ choice }}</option>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,10 +1 @@
|
|||||||
{% extends "@AdminPanel/form/_default.twig" %}
|
{% 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" %}
|
{% 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 %}/>
|
{% block after %}
|
||||||
<datalist id="{{name}}_list">
|
<datalist id="{{ attributes.list }}">
|
||||||
{% for entity in entities %}
|
{% for entity in options.entities %}
|
||||||
|
{% if entity.name is not null %}
|
||||||
<option>{{entity.name}}</option>
|
<option>{{entity.name}}</option>
|
||||||
|
{% elseif entity.firstname is not null %}
|
||||||
|
<option>{{entity.firstname}}</option>
|
||||||
|
{% else %}
|
||||||
|
<option>{{entity.id}}</option>
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</datalist>
|
</datalist>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,9 +1 @@
|
|||||||
{% extends "@AdminPanel/form/_default.twig" %}
|
{% 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