select2+bootstrap4+validacion
This commit is contained in:
parent
d119c9a2fb
commit
c3cdd40195
3 changed files with 35 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
@import "bootstrap-markdown/css/bootstrap-markdown.min";
|
||||
@import "font-awesome";
|
||||
@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";
|
||||
|
||||
$footer-height: 60px;
|
||||
|
@ -111,3 +111,32 @@ textarea.post-content {
|
|||
.d-none, .d-block {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
"popper.js": "^1.12.9",
|
||||
"select2": "4.0.5",
|
||||
"select2-bootstrap-theme": "https://github.com/angel-vladov/select2-bootstrap-theme",
|
||||
"select2-theme-bootstrap4": "^0.2.0-beta.2",
|
||||
"table-dragger": "^1.0.2"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -137,6 +137,10 @@ rx@^4.1.0:
|
|||
version "0.1.0-beta.10"
|
||||
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:
|
||||
version "4.0.5"
|
||||
resolved "https://registry.yarnpkg.com/select2/-/select2-4.0.5.tgz#7aac50692561985b34d3b82ec55e226f8960d40a"
|
||||
|
|
Loading…
Reference in a new issue