#986 Cannot send documents by email

This commit is contained in:
Karel Pičman 2019-03-22 15:44:43 +01:00
parent e17f53f198
commit 546ebd90b9
3 changed files with 5 additions and 3 deletions

View File

@ -66,7 +66,7 @@ class DmsfMailer < Mailer
end end
def self.deliver_send_documents(project, email_params) def self.deliver_send_documents(project, email_params)
send_documents(User.current, project, email_params).deliver_later send_documents(User.current, project, email_params).deliver_now
end end
def send_documents(_, project, email_params) def send_documents(_, project, email_params)

View File

@ -62,7 +62,9 @@
:path => @email_params[:zipped_content]) %> :path => @email_params[:zipped_content]) %>
<%= l(:label_or) %> <%= l(:label_or) %>
<%= check_box_tag('email[links_only]', 1, Setting.plugin_redmine_dmsf['dmsf_documents_email_links_only'], <%= check_box_tag('email[links_only]', 1, Setting.plugin_redmine_dmsf['dmsf_documents_email_links_only'],
:onchange => "$('#public_url').toggle()") %> <%= l(:label_links_only) %> :onchange => "$('#public_url').toggle($('#email_links_only').prop('checked'))")
%>
<%= l(:label_links_only) %>
<%= render(:partial => 'dmsf_public_urls/new') %> <%= render(:partial => 'dmsf_public_urls/new') %>
</span> </span>
</p> </p>

View File

@ -21,7 +21,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
%> %>
<span id="public_url" class="hol"> <span id="public_url" <%= "class='hol'" unless Setting.plugin_redmine_dmsf['dmsf_documents_email_links_only']%>">
<%= check_box_tag('email[public_urls]', 1, false) %> <%= l(:label_public_urls) %> <%= check_box_tag('email[public_urls]', 1, false) %> <%= l(:label_public_urls) %>
<%= date_field_tag('email[expired_at]', '', :value => (DateTime.current + 3.days).to_date, :size => 10, <%= date_field_tag('email[expired_at]', '', :value => (DateTime.current + 3.days).to_date, :size => 10,
:readonly => true) + calendar_for('email_expired_at') %> :readonly => true) + calendar_for('email_expired_at') %>