added bcc emails

This commit is contained in:
Bomrah Harry 2025-05-20 20:15:03 +08:00
parent 3bd2ad8590
commit c1bff71c05
5 changed files with 14 additions and 3 deletions

View File

@ -408,7 +408,9 @@ class Admin::AsksController < OrbitAdminController
email_er.email_id = email.id email_er.email_id = email.id
email_er.save email_er.save
@group_mail = email_er.mail @group_mail = []
@group_mail << email_er.mail
@group_mail = @group_mail + email_er.bcc_emails.split(",")
@mail_sentdate = DateTime.now @mail_sentdate = DateTime.now
site = Site.first site = Site.first

View File

@ -20,6 +20,7 @@ class AskQuestion
field :reply, type: String field :reply, type: String
field :comment, type: String field :comment, type: String
field :bcc_emails, type: String
field :situation, type: String, default: "is_email_not_confirmed" # 預設email未驗證 field :situation, type: String, default: "is_email_not_confirmed" # 預設email未驗證
field :send_email, type: Integer, default: 0 field :send_email, type: Integer, default: 0
field :email_id field :email_id
@ -28,7 +29,7 @@ class AskQuestion
field :agree_show, type: Boolean, default: false field :agree_show, type: Boolean, default: false
field :agree_usage, type: Boolean, default: false field :agree_usage, type: Boolean, default: false
field :is_hidden, type: Boolean field :is_hidden, type: Boolean
field :review_time, type: DateTime field :review_time, type: DateTime
belongs_to :reviewer, class_name: "MemberProfile", foreign_key: :reviewer_id belongs_to :reviewer, class_name: "MemberProfile", foreign_key: :reviewer_id
has_many :ask_status_histories has_many :ask_status_histories
@ -109,7 +110,7 @@ class AskQuestion
if changed? || @changed if changed? || @changed
@new_history = AskStatusHistory.create( @new_history = AskStatusHistory.create(
ask_question: self, ask_question: self,
status: self.situation, status: self.situation,
comment: @release_comment, comment: @release_comment,
file: @release_file, file: @release_file,
user: @user user: @user

View File

@ -158,6 +158,12 @@
<%= f.text_area :reply, rows: 10, style: 'max-width: 500px; width: 100%;' %> <%= f.text_area :reply, rows: 10, style: 'max-width: 500px; width: 100%;' %>
</div> </div>
</div> </div>
<div class="control-group">
<%= f.label :bcc_emails, class: "control-label muted" %>
<div class="controls">
<%= f.text_area :bcc_emails, rows: 5, style: 'max-width: 500px; width: 100%;' %>
</div>
</div>
<div class="control-group"> <div class="control-group">
<label class="control-label muted"><%= f.label :comment %></label> <label class="control-label muted"><%= f.label :comment %></label>
<div class="controls"> <div class="controls">

View File

@ -119,6 +119,7 @@ en:
exports: Export exports: Export
reply: Reply reply: Reply
reply_success: Reply success reply_success: Reply success
bcc_emails: BCC
to: To to: To
widget: widget:
index: Form index: Form

View File

@ -127,6 +127,7 @@ zh_tw:
exports: 匯出 exports: 匯出
reply: 問題回覆 reply: 問題回覆
reply_success: 回覆成功 reply_success: 回覆成功
bcc_emails: 郵件密件副本
to: to:
yes: yes:
no: no: