form-to-resource.html.haml 1.15 KB
Newer Older
Brandon Lyon's avatar
Brandon Lyon committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
.form-to-resource-content
  .form-to-resource-content-section
    .form-container
      %h3.margin-top0 #{cta_title}
      %p.font-small
        If you don't see the form, try temporarily disabling ad blockers or use
        = succeed "." do
          %a{href: "https://www.google.com/chrome/", target: "_blank"} another browser
      .form
        %script{src: "//page.gitlab.com/js/forms2/js/forms2.min.js"}
        %form{id: "mktoForm_#{form_id}"}
        :javascript
          var formNumber = #{form_id || 'null'};
          MktoForms2.loadForm("//page.gitlab.com", "194-VVC-221", formNumber, function(form) {
            form.onSuccess(function() {
              form.getFormElem().hide();
              $('.confirmform').attr('style', 'visibility: visible');
              $('.confirmform').attr('style', 'height: initial');
              dataLayer.push({event: 'webcasts', mktoFormId: form.getId()});
              return false;
            });
          });
        .confirmform{style: "visibility:hidden;height:0;"}
          .centered-form-info
            %h3
              %a.destination-url{src: "#{destination_url}"} #{link_text}
Brandon Lyon's avatar
Brandon Lyon committed
27 28
            %p= success_message