Commit 5f0b3edf authored by minahilnichols's avatar minahilnichols

Add redirect logic and fix specs

parent 105d88f6
......@@ -33,7 +33,7 @@ export default {
trial: {
type: Boolean,
required: false,
default: false,
default: true,
},
},
data() {
......
......@@ -36,7 +36,7 @@ class TrialsController < ApplicationController
render(:new) && return unless @result[:success]
if params[:onboarding] == 'true'
if params[:onboarding] == 'true' || params[:trial] == 'true'
redirect_to(new_users_sign_up_groups_project_path(url_params.merge(trial_onboarding_flow: true)))
elsif @namespace = helpers.only_trialable_group_namespace
params[:namespace_id] = @namespace.id
......@@ -50,6 +50,7 @@ class TrialsController < ApplicationController
result = GitlabSubscriptions::CreateHandRaiseLeadService.new.execute(hand_raise_lead_params)
if result.success?
redirect_to new_users_sign_up_groups_project_path(skip_trial: true) if params.has_key?(:trial)
head 200
else
render_403
......
......@@ -5,7 +5,7 @@
%h2.gl-pb-5.gl-my-0
= _("About your company")
#js-company-registration-form{ data: { trial: params[:trial] == 'true', create_lead_path: create_lead_trials_path } }
#js-company-registration-form{ data: create_company_form_data }
.col-md-4.gl-display-inline-flex.gl-vertical-align-middle
= image_tag 'illustrations/saas-trial-illustration.svg', alt: '', class: 'gl-display-none d-md-inline gl-w-full'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment