(core) Fix WelcomePage to use an explicit action URL, and parse submitted body in time to log it with errors.

Test Plan: Tested manually that "Preflight" error goes away in Safari.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2644
This commit is contained in:
Dmitry S
2020-10-19 11:11:03 -04:00
parent 0b1aa22ad9
commit ad7be0fd8d
2 changed files with 6 additions and 6 deletions

View File

@@ -77,7 +77,7 @@ export class WelcomePage extends Disposable {
return form = dom(
'form',
{ method: "post" },
{ method: "post", action: location.href },
handleSubmit(),
cssLabel('Your full name, as you\'d like it displayed to your collaborators.'),
inputEl = cssInput(
@@ -101,7 +101,7 @@ export class WelcomePage extends Disposable {
*/
private _buildInfoForm(owner: MultiHolder) {
const allFilled = Observable.create(owner, false);
return forms.form({method: "post"},
return forms.form({method: "post", action: location.href },
handleSubmit(),
(elem) => { setTimeout(() => elem.focus(), 0); },
forms.text('Please help us serve you better by answering a few questions.'),