mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Merge branch 'master' into refactor-messages
# Conflicts: # db/structure.sql
This commit is contained in:
commit
056c57530c
32 changed files with 730 additions and 148 deletions
21
app/controllers/admin/domains/registry_lock_controller.rb
Normal file
21
app/controllers/admin/domains/registry_lock_controller.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
module Admin
|
||||
module Domains
|
||||
class RegistryLockController < BaseController
|
||||
def destroy
|
||||
set_domain
|
||||
authorize! :manage, @domain
|
||||
if @domain.remove_registry_lock
|
||||
redirect_to edit_admin_domain_url(@domain), notice: t('.success')
|
||||
else
|
||||
redirect_to edit_admin_domain_url(@domain), alert: t('.error')
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_domain
|
||||
@domain = Domain.find(params[:domain_id])
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
|
@ -47,7 +47,7 @@ module Admin
|
|||
def destroy
|
||||
@mail_template = MailTemplate.find(params[:id])
|
||||
if @mail_template.destroy
|
||||
redirect_to admin_mail_templates_path, notise: t(:deleted)
|
||||
redirect_to admin_mail_templates_path, notice: t(:deleted)
|
||||
else
|
||||
flash.now[:alert] = I18n.t(:failure)
|
||||
render 'show'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue