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.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
site = Site.first

View File

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

View File

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

View File

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

View File

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