mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
commit
779a57d8b7
4 changed files with 11 additions and 6 deletions
|
@ -43,7 +43,7 @@ class Admin::AdminUsersController < AdminController
|
||||||
def destroy
|
def destroy
|
||||||
if @admin_user.destroy
|
if @admin_user.destroy
|
||||||
flash[:notice] = I18n.t('record_deleted')
|
flash[:notice] = I18n.t('record_deleted')
|
||||||
redirect_to admin_users_path
|
redirect_to admin_admin_users_path
|
||||||
else
|
else
|
||||||
flash.now[:alert] = I18n.t('failed_to_delete_record')
|
flash.now[:alert] = I18n.t('failed_to_delete_record')
|
||||||
render 'show'
|
render 'show'
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
class InvoiceMailer < ApplicationMailer
|
class InvoiceMailer < ApplicationMailer
|
||||||
include Que::Mailer
|
include Que::Mailer
|
||||||
|
|
||||||
def invoice_email(invoice_id, html)
|
def invoice_email(invoice_id, html, billing_email)
|
||||||
@invoice = Invoice.find_by(id: invoice_id)
|
@invoice = Invoice.find_by(id: invoice_id)
|
||||||
|
billing_email ||= @invoice.billing_email
|
||||||
return unless @invoice
|
return unless @invoice
|
||||||
return if whitelist_blocked?(@invoice.billing_email)
|
return if whitelist_blocked?(@invoice.billing_email)
|
||||||
|
|
||||||
|
@ -11,6 +12,6 @@ class InvoiceMailer < ApplicationMailer
|
||||||
invoice = @invoice
|
invoice = @invoice
|
||||||
|
|
||||||
attachments[invoice.pdf_name] = pdf
|
attachments[invoice.pdf_name] = pdf
|
||||||
mail(to: format(invoice.billing_email), subject: invoice)
|
mail(to: format(billing_email), subject: invoice)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -117,7 +117,7 @@ class Invoice < ActiveRecord::Base
|
||||||
return false unless valid?
|
return false unless valid?
|
||||||
return false unless billing_email.present?
|
return false unless billing_email.present?
|
||||||
|
|
||||||
InvoiceMailer.invoice_email(id, html).deliver
|
InvoiceMailer.invoice_email(id, html, billing_email).deliver
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,10 @@
|
||||||
%tbody
|
%tbody
|
||||||
- @registrar.white_ips.each do |x|
|
- @registrar.white_ips.each do |x|
|
||||||
%tr
|
%tr
|
||||||
%td= link_to(x.ipv4, [:admin, @registrar, x])
|
%td
|
||||||
%td= link_to(x.ipv6, [:admin, @registrar, x])
|
- if x.ipv4.present?
|
||||||
|
= link_to(x.ipv4, [:admin, @registrar, x])
|
||||||
|
%td
|
||||||
|
- x.ipv6.present?
|
||||||
|
= link_to(x.ipv6, [:admin, @registrar, x])
|
||||||
%td= x.interfaces.join(', ').upcase
|
%td= x.interfaces.join(', ').upcase
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue