@@ -197,7 +197,8 class ProjectsController < ApplicationController | |||||
197 | # Add a new issue category to @project |
|
197 | # Add a new issue category to @project | |
198 | def add_issue_category |
|
198 | def add_issue_category | |
199 | @category = @project.issue_categories.build(params[:category]) |
|
199 | @category = @project.issue_categories.build(params[:category]) | |
200 |
if request.post? |
|
200 | if request.post? | |
|
201 | if @category.save | |||
201 | respond_to do |format| |
|
202 | respond_to do |format| | |
202 | format.html do |
|
203 | format.html do | |
203 | flash[:notice] = l(:notice_successful_create) |
|
204 | flash[:notice] = l(:notice_successful_create) | |
@@ -210,6 +211,14 class ProjectsController < ApplicationController | |||||
210 | } |
|
211 | } | |
211 | end |
|
212 | end | |
212 | end |
|
213 | end | |
|
214 | else | |||
|
215 | respond_to do |format| | |||
|
216 | format.html | |||
|
217 | format.js do | |||
|
218 | render(:update) {|page| page.alert(@category.errors.full_messages.join('\n')) } | |||
|
219 | end | |||
|
220 | end | |||
|
221 | end | |||
213 | end |
|
222 | end | |
214 | end |
|
223 | end | |
215 |
|
224 |
General Comments 0
You need to be logged in to leave comments.
Login now