style(association): modifie le layout_template de CreateForm
Parent
f32bea352e
révision
65517fadeb
|
@ -60,3 +60,15 @@
|
|||
.input-group .search-input {
|
||||
border-color: $white;
|
||||
}
|
||||
|
||||
// Make the research intended fields stand out from the others
|
||||
// Only association creation or update forms are concerned
|
||||
.research-data-fieldset {
|
||||
padding: 1rem;
|
||||
margin-top: 1rem;
|
||||
border: 1px solid $info;
|
||||
|
||||
&__legend {
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@ class CreateForm(CustomTapeformMixin, TapeformFieldsetsMixin, forms.ModelForm):
|
|||
for g in models.ActivityFieldGroup.objects.all()
|
||||
]
|
||||
|
||||
layout_template = (
|
||||
"association/forms/layouts/association_informations_form.html"
|
||||
)
|
||||
|
||||
fieldsets = [
|
||||
{
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
{% extends form.base_layout_template %}
|
||||
{% load tapeforms %}
|
||||
|
||||
{% block visible_fields %}
|
||||
{% csrf_token %}
|
||||
{% for fieldset in form.get_fieldsets %}
|
||||
<div class="{{ fieldset.extra.css_class }}">
|
||||
<fieldset>
|
||||
{% form fieldset %}
|
||||
</fieldset>
|
||||
{% if fieldset.extra.css_class == "research-data-fieldset" %}
|
||||
<div class="research-data-fieldset__legend">
|
||||
{{ fieldset.extra.legend }}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endblock %}
|
Chargement…
Référencer dans un nouveau ticket