steirico / kirby-plugin-custom-add-fields

Custom fields for Kirby's add dialog.
MIT License
36 stars 4 forks source link

Fix/dialog #31

Closed nilshoerrmann closed 4 years ago

nilshoerrmann commented 4 years ago

This commit adapts the dialog UI to the Panel’s current default layout. It also makes sure fields are not validated on load and that the submit button is correctly labeled.

Fixes #29

steirico commented 4 years ago

For line 163 and follow I would suggest:

if(form) {
        form.novalidate = false;
        errors = form.$refs.fields.errors;
        invalid = true;
....

This re-enables form validation. Hence, the red indicators on invalid fields will be shown after hitting the submit button.

nilshoerrmann commented 4 years ago

Changed that, too.

steirico commented 4 years ago

LGTM!

nilshoerrmann commented 4 years ago

Great, thank you!