5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-15 04:41:43 +00:00

select2+bootstrap4+validacion

This commit is contained in:
f 2018-06-19 14:33:13 -03:00
parent d119c9a2fb
commit c3cdd40195
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
3 changed files with 35 additions and 1 deletions

View file

@ -2,7 +2,7 @@
@import "bootstrap-markdown/css/bootstrap-markdown.min"; @import "bootstrap-markdown/css/bootstrap-markdown.min";
@import "font-awesome"; @import "font-awesome";
@import "select2/dist/css/select2"; @import "select2/dist/css/select2";
@import "select2-bootstrap-theme/dist/select2-bootstrap.min"; @import "select2-theme-bootstrap4/dist/select2-bootstrap";
@import "dragula-with-animation/dist/dragula"; @import "dragula-with-animation/dist/dragula";
$footer-height: 60px; $footer-height: 60px;
@ -111,3 +111,32 @@ textarea.post-content {
.d-none, .d-block { .d-none, .d-block {
transition: all 3s; transition: all 3s;
} }
/* Select2 Bootstrap4 Validation */
.was-validated {
.form-control {
&:invalid {
~ .select2-container--bootstrap {
border: 1px solid #dc3545;
border-radius: 0.25rem;
.select2-dropdown {
border: 1px solid #dc3545;
border-radius: 0.25rem;
}
}
}
&:valid {
~ .select2-container--bootstrap {
border: 1px solid #28a745;
border-radius: 0.25rem;
.select2-dropdown {
border: 1px solid #28a745;
border-radius: 0.25rem;
}
}
}
}
}

View file

@ -11,6 +11,7 @@
"popper.js": "^1.12.9", "popper.js": "^1.12.9",
"select2": "4.0.5", "select2": "4.0.5",
"select2-bootstrap-theme": "https://github.com/angel-vladov/select2-bootstrap-theme", "select2-bootstrap-theme": "https://github.com/angel-vladov/select2-bootstrap-theme",
"select2-theme-bootstrap4": "^0.2.0-beta.2",
"table-dragger": "^1.0.2" "table-dragger": "^1.0.2"
} }
} }

View file

@ -137,6 +137,10 @@ rx@^4.1.0:
version "0.1.0-beta.10" version "0.1.0-beta.10"
resolved "https://github.com/angel-vladov/select2-bootstrap-theme#4fb604838e79150161fc636dbeb3b3022c034cda" resolved "https://github.com/angel-vladov/select2-bootstrap-theme#4fb604838e79150161fc636dbeb3b3022c034cda"
select2-theme-bootstrap4@^0.2.0-beta.2:
version "0.2.0-beta.2"
resolved "https://registry.yarnpkg.com/select2-theme-bootstrap4/-/select2-theme-bootstrap4-0.2.0-beta.2.tgz#4295be07585939d6094b37ce65168d77be99c24b"
select2@4.0.5: select2@4.0.5:
version "4.0.5" version "4.0.5"
resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.5.tgz#7aac50692561985b34d3b82ec55e226f8960d40a" resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.5.tgz#7aac50692561985b34d3b82ec55e226f8960d40a"