Refactor to use multiple <form> tags #359

Open
opened 2020-12-07 15:33:42 +00:00 by matthijskooijman · 0 comments
matthijskooijman commented 2020-12-07 15:33:42 +00:00 (Migrated from github.com)

Currently, there is only one <form> tag in the entire page that is shared by all forms, which is not always ideal (i.e. in peer_reviewed_article, this requires adding a suffix to field names since all comment forms are submitted at the same time).

In #135, some changes were made to prepare for having multiple form tags (i.e. form submissions now explicitly reference their containing form and an explicit "default form" is tracked on HyphaHtmlDocument). This should be completed at some point.

A related improvement would be to turn submit buttons into normal submit buttons, rather than doing all form submits through the javascript hypha() function. This makes things simpler, and allows the browser to apply any validation (i.e. from required or type=email attributes on input fields, which are currently ignored, presumably because javascript forces form submission).

Currently, there is only one `<form>` tag in the entire page that is shared by all forms, which is not always ideal (i.e. in peer_reviewed_article, this requires adding a suffix to field names since *all* comment forms are submitted at the same time). In #135, some changes were made to prepare for having multiple form tags (i.e. form submissions now explicitly reference their containing form and an explicit "default form" is tracked on HyphaHtmlDocument). This should be completed at some point. A related improvement would be to turn submit buttons into normal submit buttons, rather than doing all form submits through the javascript `hypha()` function. This makes things simpler, and allows the browser to apply any validation (i.e. from `required` or `type=email` attributes on input fields, which are currently ignored, presumably because javascript forces form submission).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
harmen/hypha#359
No description provided.