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) => {
|
||||
const body = resp.text().then((html) => {
|
||||
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`)
|
||||
const status = json.status === 'good' ? 'success' : 'error'
|
||||
|
||||
@ -83,7 +88,7 @@ const formInit = (form) => {
|
||||
const 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)
|
||||
|
@ -38,6 +38,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
.form__field input.password {
|
||||
@extend .form-control;
|
||||
}
|
||||
|
||||
.form__fieldset {
|
||||
margin-bottom: -1rem;
|
||||
}
|
||||
|
@ -6,6 +6,7 @@
|
||||
.alert {
|
||||
display: flex;
|
||||
margin-bottom: 0;
|
||||
|
||||
.alert__container {
|
||||
display: flex;
|
||||
}
|
||||
@ -27,3 +28,7 @@
|
||||
display: flex !important;
|
||||
}
|
||||
}
|
||||
|
||||
.alert-bad {
|
||||
@extend .alert-danger;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user