refactor policy
This commit is contained in:
@@ -19,8 +19,6 @@ class StartFormController < ApplicationController
|
|||||||
uuid: (filter_undefined_submitters(@template).first ||
|
uuid: (filter_undefined_submitters(@template).first ||
|
||||||
@template.submitters.first)['uuid'])
|
@template.submitters.first)['uuid'])
|
||||||
|
|
||||||
@form_configs = Submitters::FormConfigs.call(@submitter) unless Docuseal.multitenant?
|
|
||||||
|
|
||||||
render :show
|
render :show
|
||||||
elsif current_user && current_ability.can?(:read, @template)
|
elsif current_user && current_ability.can?(:read, @template)
|
||||||
render :private
|
render :private
|
||||||
|
|||||||
@@ -1,6 +1 @@
|
|||||||
<%= render 'shared/powered_by', with_counter: local_assigns[:with_counter], link_path: local_assigns[:link_path] %>
|
<%= render 'shared/powered_by', with_counter: local_assigns[:with_counter], link_path: local_assigns[:link_path] %>
|
||||||
<% if @form_configs && @form_configs[:policy_links].present? %>
|
|
||||||
<div class="max-w-md mx-auto flex flex-wrap gap-1 justify-center text-sm text-base-content/60 mt-2">
|
|
||||||
<%= auto_link(MarkdownToHtml.call(@form_configs[:policy_links])) %>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<% if configs = account.account_configs.find_by(key: AccountConfig::POLICY_LINKS_KEY) %>
|
||||||
|
<div class="max-w-md mx-auto flex flex-wrap gap-1 justify-center text-sm text-base-content/60 mt-2">
|
||||||
|
<%= auto_link(MarkdownToHtml.call(configs.value)) %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
@@ -42,3 +42,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<%= render 'shared/attribution', link_path: '/start', account: @template.account %>
|
<%= render 'shared/attribution', link_path: '/start', account: @template.account %>
|
||||||
|
<%= render 'start_form/policy', account: @template.account %>
|
||||||
|
|||||||
Reference in New Issue
Block a user