Commit fa499fda authored by Sebastian Castro's avatar Sebastian Castro

Fixs checkbox default value and style

parent c094f2e3
<style>
{# Main #}
#element-form-title { background-color: {{ contentBgd }}; }
.gogo-load-css #page-content.element-form section { background-color: {{ contentBgd }}; }
#element-form-title { background-color: {{ contentBgd }}; }
.gogo-load-css #page-content.element-form section { background-color: {{ contentBgd }}; }
{# Taxonomy field #}
.gogo-load-css .option-field .option-field-delete i:hover { color: {{ primary }} !important; }
......@@ -30,12 +30,12 @@
border: 2px solid {{ primary }};
background-color: {{ primary }};
}
.gogo-load-css .main-options-container label.main-option-radio-label:before
.gogo-load-css .main-options-container label.main-option-radio-label:before
{
border: 2px solid {{ textSoft }};
}
}
{# Input #}
{# Input #}
.gogo-load-css input:focus:not(.invalid):not([readonly]):not([type=submit]), .gogo-load-css textarea:focus:not(.invalid):not([readonly]) {
border-color: {{ textSoft }} !important;
box-shadow: 0 1px 0 0 {{ textSoft }} !important;
......@@ -49,14 +49,16 @@
box-shadow: none !important;
}
.gogo-load-css [type=radio]:not(:checked)+label:before { border-color: {{ disable }}; }
{% set placeholderFocusColor = disable ~ '!important' %}
.gogo-load-css input::-webkit-input-placeholder { color: {{ placeholderFocusColor }}; }
.gogo-load-css input::-moz-placeholder { color: {{ placeholderFocusColor }}; }
.gogo-load-css input:-ms-input-placeholder { color: {{ placeholderFocusColor }}; }
.gogo-load-css input:-moz-placeholder { color: {{ placeholderFocusColor }}; }
{# Input Label #}
.gogo-load-css #page-content.element-form label { color: {{ textSoft }}; }
{# Input Label #}
.gogo-load-css #page-content.element-form label { color: {{ textSoft }}; }
.gogo-load-css label.gogo-form-label { color: {{ disable }} !important }
.gogo-load-css input:focus:not(.invalid) + label.gogo-form-label, .gogo-load-css textarea:focus:not(.invalid) + label.gogo-form-label { color: {{ text }} !important; }
.gogo-load-css input.invalid + label.gogo-form-label, .gogo-load-css textarea.invalid + label.gogo-form-label { color: {{ error }} !important; }
......@@ -66,10 +68,10 @@
.gogo-load-css label.gogo-form-label.active {
color: {{ textSoft }} !important;
}
}
{# Input Icon #}
.gogo-load-css .input-field i.prefix { color: {{ disable }}; }
{# Input Icon #}
.gogo-load-css .input-field i.prefix { color: {{ disable }}; }
.gogo-load-css .input-field i.prefix.active { color: {{ text }}; }
.gogo-load-css .input-field i.prefix.valid { color: {{ textSoft }}; }
.gogo-load-css .input-field i.prefix.invalid { color: {{ error }}; }
......@@ -113,8 +115,8 @@
.gogo-load-css .open-hours-container.impair { background-color: {{ contentBgdSoft }}; }
{# Error #}
label .error, .input-field.error .prefix,
.gogo-load-css #input-address-field.error:after, #input-address-field.error #input-address:after, h1.error, h2.error, label.error
label .error, .input-field.error .prefix,
.gogo-load-css #input-address-field.error:after, #input-address-field.error #input-address:after, h1.error, h2.error, label.error
{ color: {{ error }} !important; }
.mandatory-asterisk:after { color: {{ secondary }}; }
.input-field.error.select-input.invalid-required input {
......
......@@ -3,15 +3,15 @@
@import 'vendors/timepicki';
@import 'vendors/bootstrap-datepicker3';
.gogo-load-css
.gogo-load-css
{
@import "components/element-form/category-field";
label { color: inherit; }
label.gogo-form-label {
label.gogo-form-label {
&.active {
&.active {
font-weight: bold;
.more { display: none; }
}
......@@ -43,7 +43,7 @@
}
.mandatory-asterisk:after {
content: "*";
margin-left: 5px;
margin-left: 5px;
position: absolute;
top: 1px;
font-size: .9rem;
......@@ -57,17 +57,36 @@
margin-left: 3rem;
width: calc(100% - 3rem);
}
.field-checkbox-group, .field-checkbox-group { margin-top: 10px; }
.checkbox-radio-group {
margin-bottom: 25px;
.checkbox-radio-group-label { font-weight: bold; font-size: .9rem; position: relative; }
.label-container { margin-bottom: 15px; }
.checkbox-container {
label { padding-left: 42px; }
label:after, label:before { left: 2px; }
}
&.invalid-required {
label .error { display: inline-block; }
}
}
.checkbox-container { margin-bottom: 10px; }
}
.checkbox-container {
margin-bottom: 10px;
margin-top: 15px;
[type=checkbox]+label:before {
top: 1px;
left: 5px;
}
[type=checkbox]:checked+label:before {
left: 2px;
top: -4px;
}
}
.character-counter { margin-top: -10px; }
textarea ~ .character-counter { margin-top: -15px; }
......@@ -133,7 +152,7 @@
font-size: .8rem;
font-style: normal;
}
}
}
@media #{$small-only} {
h2 { text-align: left}
......@@ -180,7 +199,7 @@
margin-bottom: .5rem;
font-style: italic;
text-align: center;
}
}
// ---------------------------------------
// MAP
......@@ -226,7 +245,7 @@
.btn-geolocalize, .btn-geolocalize-help
{
margin-top: .5rem;
margin-top: .5rem;
@media screen and (min-width: 600px) { float: right; width: auto; margin-top: 1rem; }
width: 60%;
font-size: .9rem;
......@@ -237,8 +256,8 @@
.btn-geolocalize-help {
margin-right: 5px;
@media screen and (max-width: 600px){
width: calc(39% - 15px);
@media screen and (max-width: 600px){
width: calc(39% - 15px);
margin-right: 0;
margin-left: 10px;
}
......@@ -276,7 +295,7 @@
}
}
#section_vos_infos
#section_vos_infos
{
margin-bottom: 0;
}
......@@ -305,7 +324,7 @@
.second-line-slot {
display: none !important;
@include transition(all 1s);
opacity: 0;
opacity: 0;
height: 0;
}
......@@ -349,7 +368,7 @@
.redo-time-slot-button { line-height: 3rem; }
}
......
<div class="checkbox-container">
<input type="checkbox" name="data[{{ field.name }}]" id="{{ field.name }}"
<div class="checkbox-container">
<input type="checkbox" name="data[{{ field.name }}]" id="{{ field.name }}"
{% if field.required|default(false) %}class="required"{% endif %}
{% if elementValue or not elementValue and field.values[0].selected is defined %}checked="checked"{% endif %}/>
{% if elementValue or not elementValue and field.defaultvalue == "yes" %}checked="checked"{% endif %}/>
<label for="{{ field.name }}" class="to-html">{{ field.label|raw }}</label>
</div>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment