Skip to content
Snippets Groups Projects
Commit 9df4fda2 authored by Tomi Valentová's avatar Tomi Valentová
Browse files

add form page

parent 27e092e9
No related branches found
No related tags found
1 merge request!29Feat/redesign
Pipeline #18960 passed
Showing
with 131 additions and 18 deletions
<div class="checkbox form-field__control flex items-center {{ classes }}"> <div class="form__checkbox flex items-center {{ classes }}">
<input type="checkbox" id="checkbox_1"> <input type="form__checkbox" id="{{ id }}">
<label for="checkbox_1">{{ label }}</label> <label for="{{ id }}">{{ label }}</label>
</div> </div>
context: context:
classes: '' classes: ''
label: 'Souhlasím se zpracováním osobních údajů' label: 'Souhlasím se zpracováním osobních údajů'
id: 'checkbox_1'
\ No newline at end of file
{% extends "patterns/atoms/form_fields/form_input.html" %}
{% block type %}date{% endblock %}
\ No newline at end of file
context:
label: 'Datum narození'
placeholder: ''
hint: ''
is_required: true
id: 'date_1'
\ No newline at end of file
{% extends "patterns/atoms/form_fields/form_input.html" %}
{% block type %}datetime-local{% endblock %}
\ No newline at end of file
context:
label: 'Datum a čas poslední injekce'
placeholder: ''
hint: ''
is_required: true
id: 'datetime_1'
\ No newline at end of file
{% extends "patterns/atoms/form_fields/form_input.html" %}
{% block type %}email{% endblock %}
\ No newline at end of file
context:
label: 'Registrační email'
placeholder: 'info@pirati.cz'
hint: ''
id: 'email_1'
\ No newline at end of file
<div class="flex flex-col gap-2 max-w-min"> <div class="flex flex-col gap-2 items-start">
{% if label %} {% if label %}
<div> <div>
<label for="{{ id }}" class="leading-5"> <label for="{{ id }}" class="leading-5">
...@@ -11,12 +11,11 @@ ...@@ -11,12 +11,11 @@
</div> </div>
{% endif %} {% endif %}
<div class="flex gap-2"> <div class="flex w-full gap-2">
<input <input
type="text" type="{% block type %}text{% endblock %}"
class=" class="
form-field__control py-3 px-3 w-full lg:w-96
py-3 px-3
{% block color_classes %} {% block color_classes %}
bg-grey-100 border border-grey-200 bg-grey-100 border border-grey-200
......
context: context:
placeholder: 'Registrační email' placeholder: 'Pirát Pepa'
hint: '' hint: 'Hlavně žádné osobní údaje.'
name: 'example' name: 'example'
is_required: false is_required: true
extra_classes: '' extra_classes: ''
label: '' label: 'Jméno'
\ No newline at end of file
{% extends 'patterns/atoms/form_fields/form_input.html' %} {% extends 'patterns/atoms/form_fields/form_input.html' %}
{% block color_classes %} {% block color_classes %}
text-input bg-white border-none form__text-input bg-white border-none
{% endblock %} {% endblock %}
{% extends "patterns/atoms/form_fields/form_select.html" %}
{% block select_attrs %}multiple{% endblock %}
{% block wrapper_classes %}
form__select form__multiselect w-full lg:w-96
{% endblock %}
\ No newline at end of file
{% extends "patterns/atoms/form_fields/form_input.html" %}
{% block type %}tel{% endblock %}
\ No newline at end of file
context:
label: 'Telefon'
placeholder: '+420 666 666 666'
hint: ''
is_required: false
id: 'phone_1'
\ No newline at end of file
<div class="flex flex-col gap-2 items-start">
{% if label %}
<div>
<label for="{{ id }}" class="leading-5">
{{ label }}
</label>
{% if is_required %}
<span class="text-red-600">*</span>
{% endif %}
</div>
{% endif %}
<div class="flex flex-col gap-1">
{% for option in options %}
<div class="flex gap-3">
<input type="radio" id="{{ option.id }}" name="{{ id }}" value="{{ option.text }}">
<label for="{{ option.id }}">{{ option.text }}</label>
</div>
{% endfor %}
</div>
</div>
\ No newline at end of file
context:
label: 'Radio boxík'
options:
-
id: 'option-1'
text: 'Option 1'
-
id: 'option-2'
text: 'Option 2'
-
id: 'option-3'
text: 'Option 3'
classes: ''
id: 'radio_1'
is_required: true
<div class="flex flex-col"> <div class="flex flex-col gap-2 items-start">
{% if label %} {% if label %}
<label for="{{ id }}"> <label for="{{ id }}">
{{ label }} {{ label }}
...@@ -9,12 +9,25 @@ ...@@ -9,12 +9,25 @@
</label> </label>
{% endif %} {% endif %}
<div class="select max-w-72"> <div
class="
{% block wrapper_classes %}
form__select w-full lg:w-96
{% endblock %}
"
>
<select <select
class="select__control form-field__control {{ classes }}" class="
select__control
{% block classes %}
{{ classes }}
{% endblock %}
"
value="" value=""
id="{{ id }}" id="{{ id }}"
name="{{ id }}" name="{{ id }}"
{% block select_attrs %}{% endblock %}
> >
{% for option in options %} {% for option in options %}
<option>{{ option }}</option> <option>{{ option }}</option>
......
context: context:
label: '' label: 'Vybírací boxík'
options: options:
- 'Option 1' - 'Option 1'
- 'Option 2' - 'Option 2'
...@@ -8,5 +8,5 @@ context: ...@@ -8,5 +8,5 @@ context:
- 'Option 5' - 'Option 5'
- 'Option 6' - 'Option 6'
classes: '' classes: ''
id: 'example2' id: 'select_1'
is_required: true is_required: true
<div class="flex flex-col items-start gap-2 {{ classes }}">
<label for="{{ id }}">
{{ label }}
{% if is_required %}
<span class="text-red-600">*</span>
{% endif %}
</label>
<textarea
class="
form__text-input resize-none
w-full lg:w-96
"
id="{{ id }}"
></textarea>
</div>
context:
classes: ''
label: 'Smluvní podmínky'
id: 'textarea_1'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment