havenweb / haven

Self-hostable private blogging
https://havenweb.org
MIT License
650 stars 33 forks source link

fix upload image button disable text #101

Closed mawise closed 4 months ago

mawise commented 4 months ago

To prevent double-submitting a form, Rails uses JS to disable a form submit button when it is clicked.

Rails was defaulting all buttons on the form to display the same text when disabled, so when creating a post or uploading an image, both submit buttons would be disabled with the text "create form". This change explicitly specifies which text to use when disabling the upload image button so it doesn't flash with the wrong text.

Fixes #100