HomePhabricator

Preserve inputs when editing duplicate lexeme

Tags
None
Referenced Files
None
Subscribers
None

Description

Preserve inputs when editing duplicate lexeme

The edit mode link, which the previous commit added to the warnings
about existing potential duplicate lexemes, discarded any input the user
had already made. Preserve this data using a similar trick as for the
“advanced” button: as it’s a button, rather than a link, the browser
includes all the form data with the request, so we can process it server
side. (This requires the duplicates warning to move inside the <form>
element.) Styling the button like a link, so there’s no visual change,
is a bit annoying, but doable.

The code processing edit requests is rearranged a bit so that for
requests that won’t submit the form, the form data is still used, but
doesn’t override existing forms of the lexem.

Details

Provenance
LucasWerkmeisterAuthored on Jun 14 2020, 12:01 PM
Parents
R2362:2efe64f7e5d5: Link to edit mode in duplicates warning
Branches
Unknown
Tags
Unknown
Reverted By
R2362:0cd2ca9fa505: Don’t use button to link edit mode from duplicates
ChangeId
None