change email setting

This commit is contained in:
rulingcom 2026-09-02 11:12:04 +08:00
parent 7a202e09e3
commit 82ef0448d4
3 changed files with 13 additions and 0 deletions

View File

@ -670,6 +670,13 @@ class Admin::AnnouncementsController < OrbitAdminController
:is_sent=>is_sent
)
bulletin.email.deliver
bulletin.update_attributes(
:email_member_ids => [],
:other_mailaddress => "",
:email_id => nil,
:email_sent => false,
:email_last_sent_at => Time.now
)
else
bulletin.email.destroy if !bulletin.email.nil?
end

View File

@ -79,6 +79,7 @@ class Bulletin
field :email_id
field :email_sent, :type => Boolean, :default => false
field :email_last_sent_at, :type => DateTime
field :email_sentdate , :type => DateTime
field :email_member_ids
field :other_mailaddress

View File

@ -471,6 +471,11 @@
<div class="control-group">
<label class="control-label muted" for="remind-check"><%= t("announcement.email_to") %></label>
<div class="controls">
<% if @bulletin.email_last_sent_at.present? %>
<p class="help-block">
前次寄送已於 <%= @bulletin.email_last_sent_at.strftime("%Y年%m月%d日 %H:%M:%S") %> 寄出,如有設定限制收件人數及寄信頻率,請到系統管理的待寄送信件確認
</p>
<% end %>
<label class="checkbox inline">
<%= f.check_box :email_sent, {:id=>'remind-check'} %>
<%= t('announcement.activate_email_reminder')%>