diff --git a/services/web/app/views/beta_program/opt_in.pug b/services/web/app/views/beta_program/opt_in.pug index 3e08d27643..14b32ab3b5 100644 --- a/services/web/app/views/beta_program/opt_in.pug +++ b/services/web/app/views/beta_program/opt_in.pug @@ -1,4 +1,4 @@ -extends ../layout +extends ../layout-marketing block content main.content.content-alt#main-content @@ -29,7 +29,12 @@ block content .row.text-centered .col-md-12 if user.betaProgram - form(id="beta-program-opt-out", method="post", action="/beta/opt-out", novalidate) + form( + data-ol-regular-form + method="post" + action="/beta/opt-out" + novalidate + ) input(type="hidden", name="_csrf", value=csrfToken) .form-group a( @@ -40,17 +45,25 @@ block content .form-group button.btn.btn-info.btn-sm( type="submit" + data-ol-disabled-inflight ) - span #{translate("beta_program_opt_out_action")} + span(data-ol-inflight="idle") #{translate("beta_program_opt_out_action")} + span(hidden data-ol-inflight="pending") #{translate("processing")}… .form-group a(href="/project").btn.btn-link.btn-sm #{translate("back_to_your_projects")} else - form(id="beta-program-opt-in", method="post", action="/beta/opt-in", novalidate) + form( + data-ol-regular-form + method="post", + action="/beta/opt-in" + ) input(type="hidden", name="_csrf", value=csrfToken) .form-group button.btn.btn-primary( type="submit" + data-ol-disabled-inflight ) - span #{translate("beta_program_opt_in_action")} + span(data-ol-inflight="idle") #{translate("beta_program_opt_in_action")} + span(hidden data-ol-inflight="pending") #{translate("joining")}… .form-group a(href="/project").btn.btn-link.btn-sm #{translate("back_to_your_projects")} diff --git a/services/web/app/views/project/editor/new_from_template.pug b/services/web/app/views/project/editor/new_from_template.pug index 554b1048f8..173b17d48a 100644 --- a/services/web/app/views/project/editor/new_from_template.pug +++ b/services/web/app/views/project/editor/new_from_template.pug @@ -1,4 +1,4 @@ -extends ../../layout +extends ../../layout-marketing block content .editor.full-size @@ -13,7 +13,12 @@ block content span.loading-screen-ellip . span.loading-screen-ellip . - form(id='create_form' method='POST' action='/project/new/template/' ng-non-bindable) + form( + data-ol-regular-form + data-ol-auto-submit + method='POST' + action='/project/new/template/' + ) input(type="hidden", name="_csrf", value=csrfToken) input(type="hidden" name="templateId" value=templateId) input(type="hidden" name="templateVersionId" value=templateVersionId) @@ -23,9 +28,4 @@ block content input(type="hidden" name="mainFile" value=mainFile) if brandVariationId input(type="hidden" name="brandVariationId" value=brandVariationId) - -block append foot-scripts - script(type="text/javascript", nonce=scriptNonce). - $(document).ready(function(){ - $('#create_form').submit(); - }); + input(hidden type="submit") diff --git a/services/web/app/views/project/invite/not-valid.pug b/services/web/app/views/project/invite/not-valid.pug index 15f5599a85..a3fc5acf20 100644 --- a/services/web/app/views/project/invite/not-valid.pug +++ b/services/web/app/views/project/invite/not-valid.pug @@ -1,4 +1,4 @@ -extends ../../layout +extends ../../layout-marketing block content main.content.content-alt#main-content diff --git a/services/web/app/views/project/invite/show.pug b/services/web/app/views/project/invite/show.pug index 9b759bc76f..e691886f80 100644 --- a/services/web/app/views/project/invite/show.pug +++ b/services/web/app/views/project/invite/show.pug @@ -1,4 +1,4 @@ -extends ../../layout +extends ../../layout-marketing block content main.content.content-alt#main-content @@ -18,13 +18,17 @@ block content .row .col-md-12 form.form( - name="acceptForm", + data-ol-regular-form method="POST", action="/project/"+invite.projectId+"/invite/token/"+invite.token+"/accept" ) input(name='_csrf', type='hidden', value=csrfToken) input(name='token', type='hidden', value=invite.token) .form-group.text-center - button.btn.btn-lg.btn-primary(type="submit") - | #{translate("join_project")} + button.btn.btn-lg.btn-primary( + type="submit" + data-ol-disabled-inflight + ) + span(data-ol-inflight="idle") #{translate("join_project")} + span(hidden data-ol-inflight="pending") #{translate("joining")}… .form-group.text-center diff --git a/services/web/app/views/user_membership/new.pug b/services/web/app/views/user_membership/new.pug index 30543da2e9..00f1309b1a 100644 --- a/services/web/app/views/user_membership/new.pug +++ b/services/web/app/views/user_membership/new.pug @@ -1,4 +1,4 @@ -extends ../layout +extends ../layout-marketing block content main.content.content-alt#main-content @@ -7,7 +7,7 @@ block content .col-md-10.col-md-offset-1 h3(ng-non-bindable) #{entityName} "#{entityId}" does not exists in v2 form( - enctype='application/json', + data-ol-regular-form method='post', action='' ) @@ -15,4 +15,7 @@ block content button.btn.btn-primary.text-capitalize( type="submit", ng-non-bindable - ) Create #{entityName} in v2 + data-ol-disabled-inflight + ) + span(data-ol-inflight="idle") Create #{entityName} in v2 + span(hidden data-ol-inflight="pending") #{translate("creating")}…