mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
IMPR: Minor form updates
This commit is contained in:
parent
d1c6bcc8bf
commit
eeab0fceb3
@ -33,7 +33,12 @@ const submitForm = (e) => {
|
|||||||
.then(async (resp) => {
|
.then(async (resp) => {
|
||||||
const body = resp.text().then((html) => {
|
const body = resp.text().then((html) => {
|
||||||
try {
|
try {
|
||||||
const json = JSON.parse(html)
|
let json = JSON.parse(html)
|
||||||
|
|
||||||
|
if (typeof json.MainContent !== undefined) {
|
||||||
|
json = JSON.parse(json.MainContent)
|
||||||
|
}
|
||||||
|
|
||||||
console.log(`${NAME}: JSON response`)
|
console.log(`${NAME}: JSON response`)
|
||||||
const status = json.status === 'good' ? 'success' : 'error'
|
const status = json.status === 'good' ? 'success' : 'error'
|
||||||
|
|
||||||
@ -83,7 +88,7 @@ const formInit = (form) => {
|
|||||||
const init = () => {
|
const init = () => {
|
||||||
console.log(`${NAME}: init`)
|
console.log(`${NAME}: init`)
|
||||||
|
|
||||||
document.querySelectorAll('#MainContent form:not(.legacy)').forEach(formInit)
|
document.querySelectorAll('#MainContent form:not(.legacy),.ajax-form').forEach(formInit)
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener(`${Events.LODEDANDREADY}`, init)
|
window.addEventListener(`${Events.LODEDANDREADY}`, init)
|
||||||
|
@ -38,6 +38,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.form__field input.password {
|
||||||
|
@extend .form-control;
|
||||||
|
}
|
||||||
|
|
||||||
.form__fieldset {
|
.form__fieldset {
|
||||||
margin-bottom: -1rem;
|
margin-bottom: -1rem;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
.alert {
|
.alert {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
|
||||||
.alert__container {
|
.alert__container {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
@ -27,3 +28,7 @@
|
|||||||
display: flex !important;
|
display: flex !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.alert-bad {
|
||||||
|
@extend .alert-danger;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user