1
0
Fork 0

Fix validations

Dieser Commit ist enthalten in:
Angus McLeod 2019-07-31 17:42:50 +10:00
Ursprung 5b3245c576
Commit b41d66214a
2 geänderte Dateien mit 12 neuen und 7 gelöschten Zeilen

Datei anzeigen

@ -73,7 +73,7 @@ export default {
animateInvalidFields() { animateInvalidFields() {
Ember.run.scheduleOnce('afterRender', () => { Ember.run.scheduleOnce('afterRender', () => {
$('.invalid input[type=text], .invalid textarea, .invalid input[type=checkbox]').wiggle(2, 100); $('.invalid input[type=text], .invalid textarea, .invalid input[type=checkbox], .invalid .select-kit').wiggle(2, 100);
}); });
}, },
@ -209,9 +209,7 @@ export default {
'textarea', 'textarea',
'dropdown', 'dropdown',
'tag', 'tag',
'category',
'image', 'image',
'checkbox',
'user-selector', 'user-selector',
'text-only', 'text-only',
'composer' 'composer'
@ -240,11 +238,14 @@ export default {
const type = this.get('type'); const type = this.get('type');
if (type === 'checkbox') { if (type === 'checkbox') {
valid = val; valid = val;
} else if (type === 'category') {
valid = val && val.toString().length > 0;
} else if (StandardFieldValidation.indexOf(type) > -1) { } else if (StandardFieldValidation.indexOf(type) > -1) {
valid = val && String(val).length > 0; valid = val && val.length > 0;
} }
} }
this.setValid(valid); this.setValid(valid);
return valid; return valid;

Datei anzeigen

@ -508,10 +508,14 @@ img.avatar {
} }
} }
.checkbox-field.invalid .input-area { .wizard-field {
&.invalid{
textarea, input[type=text], input[type=checkbox], .select-kit {
padding: 3px; padding: 3px;
border: 4px solid red; border: 4px solid red;
} }
}
}
@keyframes rotate-forever { @keyframes rotate-forever {
0% { 0% {