Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating form block styling to wknd theme #36

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions blocks/form/form.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
--background-color-primary: #fff;
--label-color: #666;
--border-color: #818a91;
--button-primary-color: #5F8DDA;
--button-primary-hover-color: #035fe6;
--button-primary-color: var(--color-yellow);
--button-primary-hover-color: var(--color-yellow);
--form-font-size-m: 22px;
--form-font-size-s: 18px;
--form-font-size-xs: 16px;
Expand Down Expand Up @@ -34,12 +34,12 @@
--form-fieldset-legend-font-weight: var(--form-title-font-weight);
--form-fieldset-legend-border: none;
--form-fieldset-legend-padding: 0;
--form-button-color: var(--background-color-primary);
--form-button-font-size: var(--form-font-size-s);
--form-button-color: var(--text-color);
--form-button-font-size: var(--form-font-size-xs);
--form-button-background-color: var(--button-primary-color);
--form-button-background-hover-color: var(--button-primary-hover-color);
--form-button-border: 2px solid transparent;
--form-button-padding:15px 50px;
--form-button-padding: var(--button-padding);
--form-upload-color: var(--background-color-primary);
--form-upload-font-size: var(--form-font-size-xs);
--form-upload-background-color: var(--mt-global-color-base-primary);
Expand Down
7 changes: 3 additions & 4 deletions blocks/form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

async function submissionFailure(error, form) {
alert(error); // TODO define error mechansim

Check warning on line 35 in blocks/form/form.js

View workflow job for this annotation

GitHub Actions / build

Unexpected alert
form.setAttribute('data-submitting', 'false');
form.querySelector('button[type="submit"]').disabled = false;
}
Expand Down Expand Up @@ -324,11 +324,10 @@
);
}

const transformRequest = async (request, form) => requestTransformers?.reduce(
(promise, transformer) => promise.then((modifiedRequest) => transformer(modifiedRequest, form)),
const transformRequest = async (request, fd) => requestTransformers?.reduce(
(promise, transformer) => promise.then((modifiedRequest) => transformer(modifiedRequest, fd)),
Promise.resolve(request),
)

);
return transformRequest;
} catch (e) {
// eslint-disable-next-line no-console
Expand Down
Loading