plugins
plugins copied to clipboard
www/caddy: general.volt - Improve Save and Apply buttons
general.volt
Because the "Apply" button triggers "saveFormToEndpoint" to save the form before continuing, the "callback_fail" has to trigger when the validation fails to reject the deferred object. Otherwise, the apply button can get stuck indefinitely.
Also, the "disable_dialog" has been set to false, in order to show the validation dialog. Since there are multiple tabs, the validation result could be hidden to the user otherwise.
Give the "Save" button the same treatment as the "Apply" button, using SimpleActionButton for better User Feedback, and also displaying the error dialog when the validation failed.