diff --git a/Gemfile b/Gemfile index d6d711d2..da61a3a7 100644 --- a/Gemfile +++ b/Gemfile @@ -21,10 +21,6 @@ gem 'jwt' gem 'lograge' gem 'mysql2', require: false gem 'oj' -gem 'omniauth-github' -gem 'omniauth-google-oauth2' -gem 'omniauth-microsoft-office365' -gem 'omniauth-rails_csrf_protection' gem 'pagy' gem 'pdf-reader' gem 'pg', require: false diff --git a/Gemfile.lock b/Gemfile.lock index c4107333..4654547c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -245,7 +245,6 @@ GEM signet (>= 0.16, < 2.a) hashdiff (1.0.1) hashery (2.1.2) - hashie (5.0.0) hexapdf (0.34.1) cmdparse (~> 3.0, >= 3.0.3) geom2d (~> 0.4, >= 0.4.1) @@ -296,7 +295,6 @@ GEM minitest (5.20.0) msgpack (1.7.2) multi_json (1.15.0) - multi_xml (0.6.0) multipart-post (2.3.0) mysql2 (0.5.5) net-http-persistent (4.0.2) @@ -316,35 +314,7 @@ GEM racc (~> 1.4) nokogiri (1.15.4-arm64-darwin) racc (~> 1.4) - oauth2 (2.0.9) - faraday (>= 0.17.3, < 3.0) - jwt (>= 1.0, < 3.0) - multi_xml (~> 0.5) - rack (>= 1.2, < 4) - snaky_hash (~> 2.0) - version_gem (~> 1.1) oj (3.16.0) - omniauth (2.1.1) - hashie (>= 3.4.6) - rack (>= 2.2.3) - rack-protection - omniauth-github (2.0.1) - omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8) - omniauth-google-oauth2 (1.1.1) - jwt (>= 2.0) - oauth2 (~> 2.0.6) - omniauth (~> 2.0) - omniauth-oauth2 (~> 1.8.0) - omniauth-microsoft-office365 (0.0.8) - omniauth - omniauth-oauth2 - omniauth-oauth2 (1.8.0) - oauth2 (>= 1.4, < 3) - omniauth (~> 2.0) - omniauth-rails_csrf_protection (1.0.1) - actionpack (>= 4.2) - omniauth (~> 2.0) openssl (3.2.0) orm_adapter (0.5.0) os (1.1.4) @@ -378,8 +348,6 @@ GEM nio4r (~> 2.0) racc (1.7.1) rack (2.2.8) - rack-protection (3.1.0) - rack (~> 2.2, >= 2.2.4) rack-proxy (0.7.6) rack rack-test (2.1.0) @@ -520,9 +488,6 @@ GEM simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) smart_properties (1.17.0) - snaky_hash (2.0.1) - hashie - version_gem (~> 1.1, >= 1.1.1) sqlite3 (1.6.3) mini_portile2 (~> 2.8.0) sqlite3 (1.6.3-arm64-darwin) @@ -543,7 +508,6 @@ GEM uber (0.1.0) unicode-display_width (2.5.0) uniform_notifier (1.16.0) - version_gem (1.1.3) warden (1.2.9) rack (>= 2.0.9) web-console (4.2.0) @@ -595,10 +559,6 @@ DEPENDENCIES lograge mysql2 oj - omniauth-github - omniauth-google-oauth2 - omniauth-microsoft-office365 - omniauth-rails_csrf_protection pagy pdf-reader pg diff --git a/app/controllers/api/templates_controller.rb b/app/controllers/api/templates_controller.rb index d1a851f6..2b6b1d59 100644 --- a/app/controllers/api/templates_controller.rb +++ b/app/controllers/api/templates_controller.rb @@ -58,7 +58,9 @@ module Api schema: [%i[attachment_uuid name]], submitters: [%i[name uuid]], fields: [[:uuid, :submitter_uuid, :name, :type, :required, :readonly, :default_value, - { options: [%i[value uuid]], areas: [%i[x y w h cell_w attachment_uuid option_uuid page]] }]] + { preferences: {}, + options: [%i[value uuid]], + areas: [%i[x y w h cell_w attachment_uuid option_uuid page]] }]] ) end end diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb deleted file mode 100644 index de6d1910..00000000 --- a/app/controllers/omniauth_callbacks_controller.rb +++ /dev/null @@ -1,16 +0,0 @@ -# frozen_string_literal: true - -class OmniauthCallbacksController < Devise::OmniauthCallbacksController - def google_oauth2 - @user = Users.from_omniauth(request.env['omniauth.auth']) - - if @user.persisted? - flash[:notice] = I18n.t('devise.omniauth_callbacks.success', kind: 'Google') - - sign_in_and_redirect @user, event: :authentication - else - redirect_to new_registration_path(oauth_callback: true, user: @user.slice(:email, :first_name, :last_name)), - notice: 'Please complete registration with Google auth' - end - end -end diff --git a/app/javascript/application.js b/app/javascript/application.js index 30e626d2..178b3623 100644 --- a/app/javascript/application.js +++ b/app/javascript/application.js @@ -86,6 +86,7 @@ window.customElements.define('template-builder', class extends HTMLElement { backgroundColor: '#faf7f5', withPhone: this.dataset.withPhone === 'true', withLogo: this.dataset.withLogo !== 'false', + withPayment: this.dataset.withPayment !== 'false', acceptFileTypes: this.dataset.acceptFileTypes, isDirectUpload: this.dataset.isDirectUpload === 'true' }) diff --git a/app/javascript/form.js b/app/javascript/form.js index f0023ecf..601b45d0 100644 --- a/app/javascript/form.js +++ b/app/javascript/form.js @@ -10,7 +10,6 @@ window.customElements.define('submission-form', class extends HTMLElement { this.app = createApp(Form, { submitter: JSON.parse(this.dataset.submitter), - authenticityToken: this.dataset.authenticityToken, canSendEmail: this.dataset.canSendEmail === 'true', isDirectUpload: this.dataset.isDirectUpload === 'true', goToLast: this.dataset.goToLast === 'true', diff --git a/app/javascript/submission_form/area.vue b/app/javascript/submission_form/area.vue index 46e80dfd..9145900d 100644 --- a/app/javascript/submission_form/area.vue +++ b/app/javascript/submission_form/area.vue @@ -53,7 +53,7 @@ :src="initials.url" >