bootstrap styles in forms fields

This commit is contained in:
Mathieu Jaumotte 2021-03-23 09:41:11 +01:00
parent b327a3fbfa
commit 50727fc4b0
6 changed files with 74 additions and 48 deletions

View File

@ -1 +1,7 @@
{% if text is not empty %}{{ text|nl2br }}{% else %}<span class="custom_fields_text empty">{{ 'None'|trans }}</span>{% endif %}
{% if text is not empty %}
{% apply markdown_to_html %}
{{ text|raw }}
{% endapply %}
{% else %}
<span class="custom_fields_text empty">{{ 'None'|trans }}</span>
{% endif %}

View File

@ -11,11 +11,29 @@ h1, h2, .h1, .h2 {
}
.chill-user-quote {
border-left: 10px solid #eec84a;
border-left: 10px solid $yellow;
margin: 1.5em 10px;
padding: .5em 10px;
padding: .5em 15px;
quotes: "\201C" "\201D" "\2018" "\2019";
background-color: #e6e6e6;
background-color: $gray-100;
blockquote {
border-left: 0.4em solid $gray-400;
padding-left: 0.9em;
margin-left: 0.9em;
font-style: italic;
}
}
form fieldset {
margin-top: 1em;
& > legend {
font-size: 1.438em;
font-weight: 700;
width: 100%;
border-bottom: 3px solid $gray-200;
margin-bottom: 1em;
h2 {
}
}
}
div.chill_address {
@ -79,7 +97,7 @@ nav.navbar {
font-family: Open Sans;
font-weight: 300;
clear: both;
color: #fff;
color: $white;
font-size: .9em;
line-height: 1.5em;
margin: auto;

View File

@ -10,7 +10,7 @@
*/
$white: #fff !default;
$gray-100: #f8f9fa !default;
$gray-100: #f3f3f3 !default;
$gray-200: #e6e6e6 !default;
$gray-300: #dee2e6 !default;
$gray-400: #ced4da !default;

View File

@ -19,33 +19,35 @@
{% block form_row %}
{% apply spaceless %}
{% if form.vars.hideLabel is not defined or form.vars.hideLabel == false %}
<div class="container-fluid">
<div class="{% apply spaceless %}
{% if attr.class is defined and ('cf-title' in attr.class or 'cf-fields' in attr.class ) %}
grid-12
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
grid-2 grid-mobile-4 grid-tablet-4 mobile-clear tablet-clear
{% else %}
grid-4 clear
<div class="container-fluid mb-2">
<div class="row">
<div class="{% apply spaceless %}
{% if attr.class is defined and ('cf-title' in attr.class or 'cf-fields' in attr.class ) %}
col-12
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
col-2 col-mobile-4 col-tablet-4 mobile-clear tablet-clear
{% else %}
col-4 clear
{% endif %}
{% endapply %}">
{% if attr.class is not defined or ('cf-title' not in attr.class and 'cf-fields' not in attr.class ) %}
{{ form_label(form) }}
{% endif %}
{% endapply %}">
{% if attr.class is not defined or ('cf-title' not in attr.class and 'cf-fields' not in attr.class ) %}
{{ form_label(form) }}
{% endif %}
</div>
<div class="{% apply spaceless %}
{% if attr.class is defined and 'cf-title' in attr.class %}
grid-12
{% elseif attr.class is defined and 'cf-fields' in attr.class %}
grid-12 parent
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
grid-2 grid-mobile-8 grid-tablet-8 multiple-cf-inline
{% else %}
grid-8
{% endif %}
{% endapply %}">
{{ form_widget(form) }}
{{ form_errors(form) }}
</div>
<div class="{% apply spaceless %}
{% if attr.class is defined and 'cf-title' in attr.class %}
col-12
{% elseif attr.class is defined and 'cf-fields' in attr.class %}
col-12 parent
{% elseif attr.class is defined and 'multiple-cf-inline' in attr.class %}
col-2 col-mobile-8 col-tablet-8 multiple-cf-inline
{% else %}
col-8
{% endif %}
{% endapply %}">
{{ form_widget(form) }}
{{ form_errors(form) }}
</div>
</div>
</div>
{% else %}
@ -62,7 +64,6 @@
{{ form_widget(child) }}
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
</span>
<br/>
{% endfor %}
</div>
<script type="text/javascript">
@ -84,16 +85,17 @@
</div>
{%- else -%}
<div class="container-fluid">
<div class="grid-6 grid-tablet-12 gid-mobile-12 no-gutter">
<span class="inline-choice">
{{ form_widget(child) }}
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
</span>
<div class="row">
<div class="col-6 col-tablet-12 gid-mobile-12 no-gutter">
<span class="inline-choice">
{{ form_widget(child) }}
{{ form_label(child, '', {'label_attr': { 'class' : 'inline'} }) }}
</span>
</div>
<div class="col-6 col-tablet-12 gid-mobile-12 no-gutter">
{{ form_widget(form._other, {'attr': {'class': 'input-text-other-value'} }) }}
</div>
</div>
<div class="grid-6 grid-tablet-12 gid-mobile-12 no-gutter">
{{ form_widget(form._other, {'attr': {'class': 'input-text-other-value'} }) }}
</div>
</div>
{%- endif -%}
{% endfor %}

View File

@ -125,15 +125,15 @@
{{ form_rest(form) }}
<ul class="grid-12 sticky-form-buttons record_actions ">
<li class="cancel">
<a href="{{ path('chill_person_view', {'person_id' : person.id}) }}" class="sc-button grey center margin-5">
<ul class="col-12 list-inline sticky-form-buttons record_actions ">
<li class="list-inline-item justify-content-start">
<a href="{{ path('chill_person_view', {'person_id' : person.id}) }}" class="btn btn-secondary">
<i class="fa fa-arrow-left"></i>
{{ 'Return'|trans }}
</a>
</li>
<li>
<button class="sc-button bt-save" type="submit">{{ 'Save'|trans }}</button>
<li class="list-inline-item justify-content-end">
<button class="btn btn-success" type="submit">{{ 'Save'|trans }}</button>
</li>
</ul>

View File

@ -124,7 +124,7 @@
{% endblock %}
{% block layout_wvm_content %}
<div class="container-fluid mt-3 content">
<div class="mt-3 content">
{% block personcontent %}<!-- block personcontent empty -->{%endblock%}
</div>
{% endblock %}