62 lines
2.1 KiB
HTML
62 lines
2.1 KiB
HTML
{% load widget_tweaks %} {% load i18n %}
|
|
<style>
|
|
.condition-highlight {
|
|
background-color: #ffa5000f;
|
|
}
|
|
</style>
|
|
{% if form.verbose_name %}
|
|
<div class="oh-modal__dialog-header">
|
|
<h2 class="oh-modal__dialog-title" id="createTitle">
|
|
{{form.verbose_name}}
|
|
</h2>
|
|
<button type="button" class="oh-modal__close--custom" onclick="$(this).closest('.oh-modal--show').removeClass('oh-modal--show')" aria-label="Close" {{form.close_button_attrs|safe}}>
|
|
<ion-icon name="close-outline" role="img" class="md hydrated" aria-label="close outline"></ion-icon>
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
<div class="oh-modal__dialog-body">
|
|
<div class="oh-general__tab-target oh-profile-section" id="personal">
|
|
<div class="oh-profile-section__card row">
|
|
<div class="row">
|
|
<div class="col-12">{{ form.non_field_errors }}</div>
|
|
{% for field in form.visible_fields %}
|
|
<div class="col-12 col-md-6">
|
|
<div class="oh-label__info" for="id_{{ field.name }}">
|
|
<label class="oh-label" for="id_{{ field.name }}"
|
|
>{% trans field.label %}</label
|
|
>
|
|
{% if field.help_text != '' %}
|
|
<span
|
|
class="oh-info mr-2"
|
|
title="{{ field.help_text|safe }}"
|
|
></span>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if field.field.widget.input_type == 'checkbox' %}
|
|
<div class="oh-switch" style="width: 30px">
|
|
{{ field|add_class:'oh-switch__checkbox' }}
|
|
</div>
|
|
{% else %}
|
|
<div id="dynamic_field_{{field.name}}">
|
|
{{ field|add_class:'form-control' }} {% endif %} {{ field.errors }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
{% for field in form.hidden_fields %} {{ field }} {% endfor %}
|
|
|
|
<div class="d-flex flex-row-reverse">
|
|
<button
|
|
type="submit"
|
|
class="oh-btn oh-btn--secondary mt-2 mr-0 pl-4 pr-5 oh-btn--w-100-resp"
|
|
{{form.submit_button_attrs|safe}}
|
|
>
|
|
{% trans 'Save' %}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|