mirror of
https://github.com/docusealco/docuseal
synced 2026-11-05 22:52:32 -05:00
allow to permanently remove templates
This commit is contained in:
1 parent
8c366dfc38
commit
607fc8d338
2 files changed
+14
-5
No files matched your search
@@ -57,9 +57,18 @@ class TemplatesController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
@template.update!(deleted_at: Time.current)
|
||||
notice =
|
||||
if !Docuseal.multitenant? && params[:permanently].present?
|
||||
@template.destroy!
|
||||
|
||||
redirect_back(fallback_location: root_path, notice: 'Template has been archived.')
|
||||
'Template has been removed.'
|
||||
else
|
||||
@template.update!(deleted_at: Time.current)
|
||||
|
||||
'Template has been archived.'
|
||||
end
|
||||
|
||||
redirect_back(fallback_location: root_path, notice:)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in new issue
Block a user