diff --git a/app/javascript/template_builder/builder.vue b/app/javascript/template_builder/builder.vue index 9a0fe75d..556edcf6 100644 --- a/app/javascript/template_builder/builder.vue +++ b/app/javascript/template_builder/builder.vue @@ -47,7 +47,7 @@ +
+ +
+ <%= render 'shared/clipboard_copy', icon: 'copy', text: start_form_url(slug: template.slug), class: 'base-button w-full block', icon_class: 'w-6 h-6 text-white', copy_title: 'Copy', copied_title: 'Copied' %> +
+
+
Or embed on your website
+ + + +
+
+ + <%= link_to 'Learn More', console_redirect_index_path(redir: "#{Docuseal::CONSOLE_URL}/embedding/form"), target: '_blank', data: { turbo: false }, class: 'btn btn-ghost text-gray-100 flex', rel: 'noopener' %> + + + + + +
<script src="<%= Docuseal::CDN_URL %>/js/form.js"></script>
+
+<docuseal-form data-src="<%= start_form_url(slug: template.slug) %>"></docuseal-form>
+
+
+ +
+ + +
+ Close +
+ diff --git a/app/views/submissions/new.html.erb b/app/views/submissions/new.html.erb index 201ea431..ed03a005 100644 --- a/app/views/submissions/new.html.erb +++ b/app/views/submissions/new.html.erb @@ -1,5 +1,5 @@ <%= render 'shared/turbo_modal', title: params[:selfsign] ? 'Add Recipients' : 'Add New Recipients' do %> - <% options = [['via Email', 'email'], ['via Phone', 'phone'], ['Detailed', 'detailed']] %> + <% options = [['via Email', 'email'], ['via Phone', 'phone'], %w[Detailed detailed], (Docuseal.multitenant? && params[:with_link] && @template.submitters.to_a.size != 0 ? ['via Link', 'link'] : nil)].compact %>
<% options.each_with_index do |(label, value), index| %> @@ -22,6 +22,11 @@ + <% if Docuseal.multitenant? && params[:with_link] && @template.submitters.to_a.size != 0 %> + + <% end %>
<%= content_for(:modal_extra) %> <% end %> diff --git a/app/views/templates/show.html.erb b/app/views/templates/show.html.erb index 538f8eae..dbd7a796 100644 --- a/app/views/templates/show.html.erb +++ b/app/views/templates/show.html.erb @@ -78,7 +78,7 @@

Send an invitation to fill and complete the form

<% if can?(:create, Submission) %> - <%= link_to new_template_submission_path(@template), class: 'base-button mt-6', data: { turbo_frame: 'modal' } do %> + <%= link_to new_template_submission_path(@template, with_link: true), class: 'base-button mt-6', data: { turbo_frame: 'modal' } do %> <%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %> Send to Recipients <% end %>