fix demo mode
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
module Api
|
module Api
|
||||||
class TemplatesDocumentsController < ApiBaseController
|
class TemplatesDocumentsController < ApiBaseController
|
||||||
def create
|
def create
|
||||||
|
return head :unprocessable_entity if params[:blobs].blank? && params[:files].blank?
|
||||||
|
|
||||||
@template = current_account.templates.find(params[:template_id])
|
@template = current_account.templates.find(params[:template_id])
|
||||||
|
|
||||||
documents =
|
documents =
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<div class="space-y-3 mt-5">
|
<div class="space-y-3 mt-5">
|
||||||
<button
|
<button
|
||||||
v-if="canSendEmail"
|
v-if="canSendEmail && !isDemo"
|
||||||
class="white-button flex items-center space-x-1 w-full"
|
class="white-button flex items-center space-x-1 w-full"
|
||||||
:disabled="isSendingCopy"
|
:disabled="isSendingCopy"
|
||||||
@click.prevent="sendCopyToEmail"
|
@click.prevent="sendCopyToEmail"
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
v-if="fields.length < 4"
|
v-if="fields.length < 4"
|
||||||
class="text-xs p-2 border border-base-200 rounded"
|
class="text-xs p-2 border border-base-200 rounded"
|
||||||
>
|
>
|
||||||
<ui>
|
<ul class="list-disc list-outside ml-3">
|
||||||
<li>
|
<li>
|
||||||
Draw a text field on the page with a mouse
|
Draw a text field on the page with a mouse
|
||||||
</li>
|
</li>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
<li>
|
<li>
|
||||||
Click on the field type above to add it to the form without drawing it on the document
|
Click on the field type above to add it to the form without drawing it on the document
|
||||||
</li>
|
</li>
|
||||||
</ui>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<div class="mx-auto mt-1.5">
|
<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="py-3 rounded-2xl flex items-center justify-between mx-4 md:mx-0">
|
||||||
<div class="w-full text-center">
|
<div class="w-full text-center">
|
||||||
<span class="font-bold">DocuSeal Demo Environment</span>
|
<span class="font-bold">Demo Environment</span>
|
||||||
<br>
|
<br>
|
||||||
Feel free to
|
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
|
<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
|
module_function
|
||||||
|
|
||||||
def delivering_email(message)
|
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
|
if Rails.env.production? && Rails.application.config.action_mailer.delivery_method
|
||||||
message.from = ENV.fetch('SMTP_FROM')
|
message.from = ENV.fetch('SMTP_FROM')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user