mirror of https://github.com/docusealco/docuseal
Removing paywall from Company logo + white-label basics, User roles, Email reminders, Conditional fields + formulas and API/Embedding
parent
eea44bda34
commit
aa764cfdcf
@ -0,0 +1,32 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class SendSubmitterReminderEmailJob
|
||||||
|
include Sidekiq::Job
|
||||||
|
|
||||||
|
def perform(params = {})
|
||||||
|
submitter = Submitter.find(params['submitter_id'])
|
||||||
|
|
||||||
|
return if submitter.completed_at?
|
||||||
|
return if submitter.declined_at?
|
||||||
|
return if submitter.submission.archived_at?
|
||||||
|
return if submitter.template&.archived_at?
|
||||||
|
return unless submitter.sent_at?
|
||||||
|
return unless Accounts.can_send_invitation_emails?(submitter.account)
|
||||||
|
|
||||||
|
reminder_index = params['reminder_index'].to_i
|
||||||
|
|
||||||
|
return if reminder_index.positive? &&
|
||||||
|
submitter.submission_events.exists?(event_type: 'send_reminder_email',
|
||||||
|
data: { 'reminder_index' => reminder_index })
|
||||||
|
|
||||||
|
mail = SubmitterMailer.invitation_email(submitter)
|
||||||
|
|
||||||
|
Submitters::ValidateSending.call(submitter, mail)
|
||||||
|
|
||||||
|
mail.deliver_now!
|
||||||
|
|
||||||
|
SubmissionEvent.create!(submitter: submitter,
|
||||||
|
event_type: 'send_reminder_email',
|
||||||
|
data: { reminder_index: reminder_index })
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -1 +0,0 @@
|
|||||||
<%= render 'reminder_placeholder' %>
|
|
||||||
@ -1 +1,18 @@
|
|||||||
<%= render 'logo_placeholder' %>
|
<%= form_for current_account, url: settings_personalization_path, method: :post, html: { multipart: true, autocomplete: 'off', class: 'space-y-4' } do |f| %>
|
||||||
|
<% if current_account.logo.attached? %>
|
||||||
|
<div class="flex items-center gap-4">
|
||||||
|
<%= image_tag current_account.logo, class: 'max-h-16 max-w-48 rounded bg-base-200 object-contain p-2' %>
|
||||||
|
<label class="label cursor-pointer gap-2">
|
||||||
|
<%= f.check_box :remove_logo, class: 'base-checkbox' %>
|
||||||
|
<span><%= t('remove') %></span>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
<div class="form-control">
|
||||||
|
<%= f.label :logo, t('company_logo'), class: 'label' %>
|
||||||
|
<%= f.file_field :logo, accept: 'image/png,image/jpeg,image/webp,image/svg+xml', class: 'file-input file-input-bordered w-full' %>
|
||||||
|
</div>
|
||||||
|
<div class="form-control pt-2">
|
||||||
|
<%= f.button button_title(title: t('save'), disabled_with: t('saving')), class: 'base-button' %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
<%= render 'shared/powered_by', with_counter: local_assigns[:with_counter], link_path: local_assigns[:link_path] %>
|
|
||||||
@ -1 +0,0 @@
|
|||||||
<%= render 'shared/email_attribution' %>
|
|
||||||
@ -1,6 +1,11 @@
|
|||||||
|
<% account = @template&.account || @submitter&.account || current_account %>
|
||||||
<a href="/" class="flex justify-center items-center">
|
<a href="/" class="flex justify-center items-center">
|
||||||
|
<% if account&.logo&.attached? %>
|
||||||
|
<%= image_tag account.logo, class: 'mr-3 max-w-14 max-h-14 object-contain' %>
|
||||||
|
<% else %>
|
||||||
<span class="mr-3">
|
<span class="mr-3">
|
||||||
<%= render 'shared/logo', width: '50px', height: '50px' %>
|
<%= render 'shared/logo', width: '50px', height: '50px' %>
|
||||||
</span>
|
</span>
|
||||||
<h1 class="text-5xl font-bold text-center">DocuSeal</h1>
|
<% end %>
|
||||||
|
<h1 class="text-5xl font-bold text-center"><%= account&.name || Docuseal.product_name %></h1>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -1,4 +1,9 @@
|
|||||||
|
<% account = @submitter&.account || current_account %>
|
||||||
<a href="<%= root_path %>" class="mx-auto text-2xl md:text-3xl font-bold items-center flex space-x-3">
|
<a href="<%= root_path %>" class="mx-auto text-2xl md:text-3xl font-bold items-center flex space-x-3">
|
||||||
|
<% if account&.logo&.attached? %>
|
||||||
|
<%= image_tag account.logo, class: 'max-w-12 max-h-12 object-contain' %>
|
||||||
|
<% else %>
|
||||||
<%= render 'shared/logo', class: 'w-9 h-9 md:w-12 md:h-12' %>
|
<%= render 'shared/logo', class: 'w-9 h-9 md:w-12 md:h-12' %>
|
||||||
<span><%= Docuseal.product_name %></span>
|
<% end %>
|
||||||
|
<span><%= account&.name || Docuseal.product_name %></span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -1,20 +1,4 @@
|
|||||||
<div class="form-control">
|
<div class="form-control">
|
||||||
<%= f.label :role, class: 'label' %>
|
<%= f.label :role, class: 'label' %>
|
||||||
<%= f.select :role, nil, {}, class: 'base-select' do %>
|
<%= f.select :role, User::ROLES.map { |role| [t(role), role] }, {}, class: 'base-select' %>
|
||||||
<option value="admin"><%= t('admin') %></option>
|
|
||||||
<option value="editor" disabled><%= t('editor') %></option>
|
|
||||||
<option value="viewer" disabled><%= t('viewer') %></option>
|
|
||||||
<% end %>
|
|
||||||
<% if Docuseal.multitenant? %>
|
|
||||||
<label class="label">
|
|
||||||
<span class="label-text-alt">
|
|
||||||
<%= t('click_here_to_learn_more_about_user_roles_and_permissions_html') %>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
<% end %>
|
|
||||||
<a class="text-sm mt-3 px-4 py-2 bg-base-300 rounded-full block" target="_blank" href="<%= Docuseal.multitenant? ? console_redirect_index_path(redir: "#{Docuseal::CONSOLE_URL}/plans") : "#{Docuseal::CLOUD_URL}/sign_up?#{{ redir: "#{Docuseal::CONSOLE_URL}/on_premises" }.to_query}" %>">
|
|
||||||
<%= svg_icon('info_circle', class: 'w-4 h-4 inline align-text-bottom') %>
|
|
||||||
<%= t('unlock_more_user_roles_with_docuseal_pro') %>
|
|
||||||
<span class="link font-medium"><%= t('learn_more') %></span>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in new issue