update demo

This commit is contained in:
Pete Matsyburka committed 2026-10-07 09:00:58 +03:00
1 parent 80b24f0e2a
commit c1d809f989
5 files changed
+15 -38

No files matched your search

+6 -1
View File
@@ -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
+1 -1
View File
@@ -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">
+1 -1
View File
@@ -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>