fix demo mode

pull/105/head
Alex Turchyn 2 years ago
parent 4ffd198505
commit 03ad848d45

@ -3,6 +3,8 @@
module Api
class TemplatesDocumentsController < ApiBaseController
def create
return head :unprocessable_entity if params[:blobs].blank? && params[:files].blank?
@template = current_account.templates.find(params[:template_id])
documents =

@ -12,7 +12,7 @@
</p>
<div class="space-y-3 mt-5">
<button
v-if="canSendEmail"
v-if="canSendEmail && !isDemo"
class="white-button flex items-center space-x-1 w-full"
:disabled="isSendingCopy"
@click.prevent="sendCopyToEmail"

@ -71,7 +71,7 @@
v-if="fields.length < 4"
class="text-xs p-2 border border-base-200 rounded"
>
<ui>
<ul class="list-disc list-outside ml-3">
<li>
Draw a text field on the page with a mouse
</li>
@ -84,7 +84,7 @@
<li>
Click on the field type above to add it to the form without drawing it on the document
</li>
</ui>
</ul>
</div>
</template>

@ -1,7 +1,7 @@
<div class="mx-auto mt-1.5">
<div class="py-3 rounded-2xl flex items-center justify-between mx-4 md:mx-0">
<div class="w-full text-center">
<span class="font-bold">DocuSeal Demo Environment</span>
<span class="font-bold">Demo Environment</span>
<br>
Feel free to
<a href="<%= new_template_path %>" data-turbo-frame="modal" class="inline underline font-medium">create a new template</a> document form or

@ -4,6 +4,12 @@ module ActionMailerConfigsInterceptor
module_function
def delivering_email(message)
if Docuseal.demo?
message.delivery_method(:test)
return message
end
if Rails.env.production? && Rails.application.config.action_mailer.delivery_method
message.from = ENV.fetch('SMTP_FROM')

Loading…
Cancel
Save