refactor result generation

This commit is contained in:
DocuSeal
2023-10-11 21:05:42 +03:00
parent 761bb07ee6
commit 3dd7c47558
12 changed files with 40 additions and 25 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ class MfaSetupController < ApplicationController
current_user.save!
@provision_url = current_user.otp_provisioning_uri(current_user.email, issuer: Docuseal::PRODUCT_NAME)
@provision_url = current_user.otp_provisioning_uri(current_user.email, issuer: Docuseal.product_name)
end
def edit; end
@@ -22,7 +22,7 @@ class MfaSetupController < ApplicationController
redirect_to settings_profile_index_path, notice: '2FA has been configured'
else
@provision_url = current_user.otp_provisioning_uri(current_user.email, issuer: Docuseal::PRODUCT_NAME)
@provision_url = current_user.otp_provisioning_uri(current_user.email, issuer: Docuseal.product_name)
@error_message = 'Code is invalid'
+2 -2
View File
@@ -1,8 +1,8 @@
# frozen_string_literal: true
class UserMailer < ApplicationMailer
def invitation_email(user)
@current_account = user.account
def invitation_email(user, invited_by: nil)
@current_account = invited_by&.account || user.account
@user = user
@token = @user.send(:set_reset_password_token)
+1 -1
View File
@@ -84,7 +84,7 @@
<div class="flex items-center h-full">
<div class="mx-auto">
<div class="max-w-xl mx-auto">
<h1 class="text-5xl font-bold text-base-content">👋 Welcome to DocuSeal</h1>
<h1 class="text-5xl font-bold text-base-content">👋 Welcome to <%= Docuseal.product_name %></h1>
</div>
<div class="max-w-lg mx-auto">
<p class="py-6 text-gray-600">Streamline document workflows, from creating customizable templates to filling and signing document forms</p>
+1 -1
View File
@@ -1,5 +1,5 @@
<div class="max-w-xl mx-auto px-2">
<h1 class="text-4xl font-bold text-center my-8">👋 Welcome to Docuseal</h1>
<h1 class="text-4xl font-bold text-center my-8">👋 Welcome to <%= Docuseal.product_name %></h1>
<%= form_for(resource, as: resource_name, url: password_path(resource_name), html: { method: :put, class: 'space-y-6' }) do |f| %>
<div class="space-y-2">
<%= render 'devise/shared/error_messages', resource: %>
+1 -1
View File
@@ -2,5 +2,5 @@
---
</p>
<p>
Sent using <a href="<%= Docuseal::PRODUCT_URL %>"><%= Docuseal::PRODUCT_NAME %></a> free document signing.
Sent using <a href="<%= Docuseal::PRODUCT_URL %>"><%= Docuseal.product_name %></a> free document signing.
</p>
+1 -1
View File
@@ -9,5 +9,5 @@
<% else %>
Powered by
<% end %>
<a href="<%= Docuseal::PRODUCT_URL %>" class="underline"><%= Docuseal::PRODUCT_NAME %></a> - open source documents software
<a href="<%= Docuseal::PRODUCT_URL %>" class="underline"><%= Docuseal.product_name %></a> - open source documents software
</div>
@@ -1,4 +1,4 @@
<a href="<%= root_path %>" class="mx-auto text-2xl md:text-3xl font-bold items-center flex space-x-3">
<%= render 'shared/logo', class: 'w-9 h-9 md:w-12 md:h-12' %>
<span><%= Docuseal::PRODUCT_NAME %></span>
<span><%= Docuseal.product_name %></span>
</a>
@@ -1,5 +1,5 @@
<p>Hello <%= @user.first_name %>,</p>
<p>You have been invited to <%= @user.account.name %> DocuSeal. Please sign up using the link below:</p>
<p>You have been invited to <%= @user.account.name %> <%= Docuseal.product_name %>. Please sign up using the link below:</p>
<p><%= link_to 'Sign up', invitation_url(reset_password_token: @token) %></p>
<p>Please contact us by replying to this email if you didn't request this.</p>
<p>