mirror of
https://github.com/redmine/redmine.git
synced 2026-03-04 03:21:24 +01:00
only requested lists can be updated
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@270 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -48,9 +48,8 @@ class MailingListsController < ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
@mailing_list = MailingList.find(params[:id])
|
||||
if request.post? and @mailing_list.update_attributes(params[:mailing_list])
|
||||
def edit
|
||||
if request.post? && @mailing_list.status == MailingList::STATUS_REQUESTED && @mailing_list.update_attributes(params[:mailing_list])
|
||||
flash[:notice] = l(:notice_successful_update)
|
||||
redirect_to :controller => 'projects', :action => 'settings', :tab => 'mailing-lists', :id => @project
|
||||
end
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<td><%=h mailing_list.description %></td>
|
||||
<td align="center"><%= mailing_list.admin.name if mailing_list.admin %></td>
|
||||
<td align="center"><%= l(mailing_list.status_name) if mailing_list.status_name %></td>
|
||||
<td align="center" style="width:10%"><%= link_to_if_authorized(l(:button_edit), {:controller => 'mailing_lists', :action => 'edit', :id => mailing_list}, :class => 'icon icon-edit') %></td>
|
||||
<td align="center" style="width:10%"><%= link_to_if_authorized(l(:button_edit), {:controller => 'mailing_lists', :action => 'edit', :id => mailing_list}, :class => 'icon icon-edit') if mailing_list.status==MailingList::STATUS_REQUESTED %></td>
|
||||
<td align="center" style="width:10%"><%= link_to_if_authorized(l(:button_delete), {:controller => 'mailing_lists', :action => 'destroy', :id => mailing_list}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del') unless mailing_list.status==MailingList::STATUS_TO_BE_DELETED %></td>
|
||||
</tr>
|
||||
<% end; reset_cycle %>
|
||||
|
||||
Reference in New Issue
Block a user