mirror of
https://github.com/docusealco/docuseal
synced 2026-11-04 06:42:32 -05:00
update demo
This commit is contained in:
1 parent
80b24f0e2a
commit
c1d809f989
5 files changed
+15
-38
No files matched your search
@@ -118,7 +118,12 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def sign_in_for_demo
|
||||
sign_in(User.active.order('random()').take) unless signed_in?
|
||||
return if signed_in?
|
||||
|
||||
account = Account.create!(name: "Demo #{SecureRandom.hex(3)}")
|
||||
|
||||
sign_in(account.users.create!(first_name: 'Demo', last_name: 'User',
|
||||
email: "#{SecureRandom.hex}@docuseal.com", password: SecureRandom.hex))
|
||||
end
|
||||
|
||||
def current_account
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% account_config = AccountConfig.find_or_initialize_by(account: current_account, key: AccountConfig::DOWNLOAD_LINKS_EXPIRE_KEY) %>
|
||||
<% if can?(:manage, account_config) %>
|
||||
<% if !Docuseal.demo? && can?(:manage, account_config) %>
|
||||
<%= form_for account_config, url: account_configs_path, method: :post do |f| %>
|
||||
<%= f.hidden_field :key %>
|
||||
<div class="flex items-center justify-between gap-4 py-2.5">
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="w-full text-center">
|
||||
<span class="font-bold"><%= t('demo_environment') %></span>
|
||||
<br>
|
||||
<%= t('create_a_new_template_document_form_or_submit_the_existing_one_html', new_template_link: new_template_path, start_form_link: start_form_url(slug: ::Template.first&.slug)) %> 😊
|
||||
<%= t('create_a_new_template_document_form_html', new_template_link: new_template_path) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -715,7 +715,7 @@ en: &en
|
||||
declined_on_time: 'Declined on %{time}'
|
||||
expire_on_time: 'Expire on %{time}'
|
||||
sign_in_person: Sign In-person
|
||||
create_a_new_template_document_form_or_submit_the_existing_one_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Create a new template</a> document form or <a href="%{start_form_link}" target="_blank" class="inline underline font-medium">submit the existing one</a>
|
||||
create_a_new_template_document_form_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Create a new template</a> document form
|
||||
send_email_copy_with_completed_documents_to_a_specified_bcc_address: Send email copy with completed documents to a specified BCC address.
|
||||
re_send_email: Re-send Email
|
||||
re_send_emails: Re-send Emails
|
||||
@@ -1873,7 +1873,7 @@ es: &es
|
||||
declined_on_time: 'Rechazado el %{time}'
|
||||
expire_on_time: 'Expira el %{time}'
|
||||
sign_in_person: Firma en persona
|
||||
create_a_new_template_document_form_or_submit_the_existing_one_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Crear una nueva plantilla</a> de documento o <a href="%{start_form_link}" target="_blank" class="inline underline font-medium">enviar el existente</a>
|
||||
create_a_new_template_document_form_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Crear una nueva plantilla</a> de documento
|
||||
send_email_copy_with_completed_documents_to_a_specified_bcc_address: Enviar una copia del correo electrónico con los documentos completados a una dirección BCC especificada.
|
||||
re_send_email: Reenviar email
|
||||
re_send_emails: Reenviar emails
|
||||
@@ -3034,7 +3034,7 @@ it: &it
|
||||
declined_on_time: 'Rifiutato il %{time}'
|
||||
expire_on_time: 'Scade il %{time}'
|
||||
sign_in_person: Firma di persona
|
||||
create_a_new_template_document_form_or_submit_the_existing_one_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Crea un nuovo modello</a> di documento o <a href="%{start_form_link}" target="_blank" class="inline underline font-medium">invia quello esistente</a>
|
||||
create_a_new_template_document_form_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Crea un nuovo modello</a> di documento
|
||||
send_email_copy_with_completed_documents_to_a_specified_bcc_address: Invia una copia dell'email con i documenti completati a un indirizzo BCC specificato.
|
||||
re_send_email: Reinvia email
|
||||
re_send_emails: Reinvia le email
|
||||
@@ -4181,7 +4181,7 @@ fr: &fr
|
||||
declined_on_time: Refusé le %{time}
|
||||
expire_on_time: Expire le %{time}
|
||||
sign_in_person: Signer en personne
|
||||
create_a_new_template_document_form_or_submit_the_existing_one_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Créez un nouveau modèle</a> de document ou <a href="%{start_form_link}" target="_blank" class="inline underline font-medium">soumettez l’existant</a>
|
||||
create_a_new_template_document_form_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Créez un nouveau modèle</a> de document
|
||||
send_email_copy_with_completed_documents_to_a_specified_bcc_address: Envoyer une copie e‑mail avec les documents complétés à une adresse Cci spécifiée.
|
||||
re_send_email: Renvoyer l’e‑mail
|
||||
re_send_emails: Renvoyer e‑mails
|
||||
@@ -5338,7 +5338,7 @@ pt: &pt
|
||||
declined_on_time: 'Recusado em %{time}'
|
||||
expire_on_time: 'Expira em %{time}'
|
||||
sign_in_person: Assinar pessoalmente
|
||||
create_a_new_template_document_form_or_submit_the_existing_one_html: '<a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Criar um novo modelo</a> de documento ou <a href="%{start_form_link}" target="_blank" class="inline underline font-medium">submeter o existente</a>'
|
||||
create_a_new_template_document_form_html: '<a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Criar um novo modelo</a> de documento'
|
||||
send_email_copy_with_completed_documents_to_a_specified_bcc_address: Envie uma cópia do e-mail com documentos concluídos para um endereço BCC especificado.
|
||||
re_send_email: Reenviar e-mail
|
||||
re_send_emails: Reenviar e-mails
|
||||
@@ -6498,7 +6498,7 @@ de: &de
|
||||
declined_on_time: 'Abgelehnt am %{time}'
|
||||
expire_on_time: 'Läuft ab am %{time}'
|
||||
sign_in_person: Vor Ort unterschreiben
|
||||
create_a_new_template_document_form_or_submit_the_existing_one_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Neue Vorlage erstellen</a> oder <a href="%{start_form_link}" target="_blank" class="inline underline font-medium">bestehende einreichen</a>
|
||||
create_a_new_template_document_form_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Neue Vorlage erstellen</a>
|
||||
send_email_copy_with_completed_documents_to_a_specified_bcc_address: Senden Sie eine E-Mail-Kopie mit abgeschlossenen Dokumenten an eine angegebene BCC-Adresse.
|
||||
re_send_email: E-Mail erneut senden
|
||||
re_send_emails: E-Mails senden
|
||||
@@ -8186,7 +8186,7 @@ nl: &nl
|
||||
declined_on_time: Geweigerd op %{time}
|
||||
expire_on_time: Verloopt op %{time}
|
||||
sign_in_person: In persoon ondertekenen
|
||||
create_a_new_template_document_form_or_submit_the_existing_one_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Maak een nieuw sjabloon</a> voor een documentformulier of <a href="%{start_form_link}" target="_blank" class="inline underline font-medium">dien het bestaande in</a>
|
||||
create_a_new_template_document_form_html: <a href="%{new_template_link}" data-turbo-frame="modal" class="inline underline font-medium">Maak een nieuw sjabloon</a> voor een documentformulier
|
||||
send_email_copy_with_completed_documents_to_a_specified_bcc_address: Stuur een e-mailkopie met voltooide documenten naar een opgegeven BCC-adres.
|
||||
re_send_email: E-mail opnieuw verzenden
|
||||
re_send_emails: E-mails verzenden
|
||||
|
||||
@@ -5,34 +5,6 @@ module Accounts
|
||||
|
||||
module_function
|
||||
|
||||
def create_duplicate(account)
|
||||
new_account = account.dup
|
||||
|
||||
new_user = account.users.first.dup
|
||||
|
||||
new_user.uuid = SecureRandom.uuid
|
||||
new_user.account = new_account
|
||||
new_user.encrypted_password = SecureRandom.hex
|
||||
new_user.email = "#{SecureRandom.hex}@docuseal.com"
|
||||
|
||||
account.templates.each do |template|
|
||||
new_template = template.dup
|
||||
|
||||
new_template.account = new_account
|
||||
new_template.slug = SecureRandom.base58(14)
|
||||
|
||||
new_template.archived_at = nil
|
||||
new_template.save!
|
||||
|
||||
Templates::CloneAttachments.call(template: new_template, original_template: template)
|
||||
end
|
||||
|
||||
new_user.save!(validate: false)
|
||||
new_account.templates.update_all(folder_id: new_account.default_template_folder.id)
|
||||
|
||||
new_account
|
||||
end
|
||||
|
||||
def users_count(account)
|
||||
rel = User.where(account_id: account.id).or(
|
||||
User.where(account_id: account.account_linked_accounts
|
||||
|
||||
Reference in new issue
Block a user