1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

notify admin about organization registration & organization server validation

This commit is contained in:
Sylvain 2016-08-02 18:06:07 +02:00
parent 5b5394725f
commit c9a7c599c0
4 changed files with 9 additions and 0 deletions

View File

@ -2,4 +2,7 @@ class Organization < ActiveRecord::Base
belongs_to :profile
has_one :address, as: :placeable, dependent: :destroy
accepts_nested_attributes_for :address, allow_destroy: true
validates :name, presence: true
validates :address, presence: true
end

View File

@ -2,6 +2,10 @@
<p><%= t('.body.new_account_created') %> "<%= @attached_object.profile.full_name %> &lt;<%= @attached_object.email%>&gt;"</p>
<% if @attached_object.profile.organization %>
<p><%= t('.body.account_for_organization') %> <%= @attached_object.profile.organization.name %></p>
<% end %>
<% if @attached_object.invoicing_disabled? %>
<p><%= t('.body.invoicing_disabled_html') %></p>
<% end %>

View File

@ -116,6 +116,7 @@ en:
subject: "A user account has been created"
body:
new_account_created: "A new user account has been created on the website:"
account_for_organization: "This account manage an organization:"
invoicing_disabled_html: "Invoicing generation is <strong>disabled</strong> for this user."
notify_admin_subscribed_plan:

View File

@ -116,6 +116,7 @@ fr:
subject: "Un compte utilisateur a été créé"
body:
new_account_created: "Un nouveau compte utilisateur vient d'être créé sur la plateforme :"
account_for_organization: "Ce compte gère une structure :"
invoicing_disabled_html: "La génération de factures est <strong>désactivée</strong> pour cet utilisateur."
notify_admin_subscribed_plan: