change email setting
This commit is contained in:
parent
7a202e09e3
commit
82ef0448d4
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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')%>
|
||||
|
|
|
|||
Loading…
Reference in New Issue