Split form
parent
1173b45e43
commit
29a5c80703
|
@ -10,6 +10,7 @@ services:
|
|||
|
||||
backend:
|
||||
build: .
|
||||
image: registry.k0.hswaw.net/informatic/covid-formity
|
||||
ports:
|
||||
- 5000:5000
|
||||
volumes:
|
||||
|
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
|
@ -11,18 +11,18 @@ None
|
|||
{% macro format_currency_raw(amount, precision=0) -%}
|
||||
{{ ("%%.%sf" | format(precision) | format(amount/100)) }}SOG
|
||||
{%- endmacro %}
|
||||
{% macro render_field(field, prefix=None, suffix=None, layout=True, label=True) %}
|
||||
{% macro render_field(field, prefix=None, suffix=None, layout=True, label=True, split=3) %}
|
||||
{% if field.type == 'HiddenField' or field.type == 'CSRFTokenField' %}
|
||||
{{ field(**kwargs) }}
|
||||
{% else %}
|
||||
{% if layout %}
|
||||
<div class="form-group{% if field.errors %} has-error{% endif %}">
|
||||
{% if field.type == 'BooleanField' %}
|
||||
<div class="col-md-3"></div>
|
||||
<div class="col-md-{{ split }}"></div>
|
||||
{% elif label %}
|
||||
{{ field.label(class_='col-md-3 control-label' + (' control-label-required' if field.flags.required else '')) }}
|
||||
{{ field.label(class_='col-md-%s control-label' % (split,) + (' control-label-required' if field.flags.required else '')) }}
|
||||
{% endif %}
|
||||
<div class="col-md-9">
|
||||
<div class="col-md-{{ 12 - split }}">
|
||||
{% endif %}
|
||||
|
||||
{{ render_field_inner(field, prefix, suffix, label=label, **kwargs) }}
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
|
||||
<div class="row">
|
||||
<hr>
|
||||
<footer class="row"><big>made by <a href="https://wiki.hackerspace.pl/people:informatic:start">inf</a></big></footer>
|
||||
<footer class="row text-center text-muted"><big>made by volunteers at <a href="https://hackerspace.pl/">Warsaw Hackerspace</a></big> & also wash your motherfucking hands</footer>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block content %}
|
||||
<div class="row">
|
||||
<div class="col-md-2">
|
||||
<img src="/static/img/hsyrenka-clean.svg" alt="Warszawski Hackerspace" class="img-responsive" />
|
||||
<img src="/static/img/hsyrenka-clean.svg" alt="Warszawski Hackerspace" class="img-responsive center-block" style="max-width: 200px"/>
|
||||
</div>
|
||||
<div class="col-md-10">
|
||||
<h1>Awaryjna produkcja przyłbic ochronnych</h1>
|
||||
|
@ -18,14 +18,32 @@ Jeśli nie jesteś szpitalem lub inną placówką medyczną to prosimy nie wype
|
|||
</p>
|
||||
<p>Link do wiki projektu: <a href="https://wiki.hackerspace.pl/projects:covid-19">https://wiki.hackerspace.pl/projects:covid-19</a></p>
|
||||
<p class="text-danger">DO UŻYTKU TYLKO W SYTUACJI KRYZYSOWEJ GDY NIE MA ŻADNYCH ALTERNATYW, PRODUKOWANE BEZ ATESTÓW, CERTYFIKATÓW I STERYLIZACJI</p>
|
||||
<p class="text-warning">Jeśli organizujesz jakąś podobną akcję, koniecznie się <a href="mailto:covidAThackerspaceDOTpl">z nami skontaktuj</a>, będzia łatwiej jeśli skoordynujemy działania.</p>
|
||||
<p class="text-warning">Jeśli organizujesz jakąś podobną akcję, koniecznie <a href="mailto:covidAThackerspaceDOTpl">skontaktuj się z nami</a>, będzie łatwiej jeśli skoordynujemy działania.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form action="" method="POST" class="form-horizontal clearfix">
|
||||
{% for field in form %}
|
||||
{{ render_field(field) }}
|
||||
{% endfor %}
|
||||
{{ render_field(form.entity_info) }}
|
||||
{{ render_field(form.full_name) }}
|
||||
{{ render_field(form.phone_number) }}
|
||||
{{ render_field(form.email) }}
|
||||
{{ render_field(form.extra) }}
|
||||
{{ render_field(form.csrf_token) }}
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<h3>Szybki do przyłbic</h3>
|
||||
{{ render_field(form.faceshield_front_required, split=6) }}
|
||||
{{ render_field(form.faceshield_model, split=6) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="well well-sm">
|
||||
<h3>Pełne przyłbice</h3>
|
||||
{{ render_field(form.faceshield_full_required, split=6) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{ render_submit('Wyślij') }}
|
||||
</form>
|
||||
<p class="text-muted">Wypełniając powyższy formularz wyrażasz zgodę na kontakt w sprawie produkcji
|
||||
|
|
Loading…
Reference in New Issue