From bfda30ee804a7606ff12c48747de1a0069658f51 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Mon, 21 Jul 2014 17:44:14 +0800
Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0=E4=BF=AE=E6=94=B9=E7=AB=9E?=
=?UTF-8?q?=E8=B5=9B=E4=BD=9C=E5=93=81=E9=A1=B5=E9=9D=A2=E4=BD=9C=E5=93=81?=
=?UTF-8?q?=E7=B1=BB=E5=9E=8B=E3=80=81=E5=85=B3=E8=81=94=E9=A1=B9=E7=9B=AE?=
=?UTF-8?q?=E7=9A=84=E9=BB=98=E8=AE=A4=E9=80=89=E6=8B=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/softapplications/_form.html.erb | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/app/views/softapplications/_form.html.erb b/app/views/softapplications/_form.html.erb
index d0f6b5bc6..27954a7d0 100644
--- a/app/views/softapplications/_form.html.erb
+++ b/app/views/softapplications/_form.html.erb
@@ -51,11 +51,19 @@
* :
<%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
- <%= f.select :app_type_name,work_type_opttion, {},{:style => "width:410px;",:onchange => "selectChange(this)"} %>
-
- <%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
-
-
+ <% if work_type_opttion.include?([@softapplication.app_type_name,@softapplication.app_type_name]) %>
+ <%= f.select :app_type_name,options_for_select(work_type_opttion,@softapplication.app_type_name), {},{:style => "width:410px;",:onchange => "selectChange(this)"} %>
+
+ <%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
+
+
+ <% else %>
+ <%= f.select :app_type_name,options_for_select(work_type_opttion,"其他"), {},{:style => "width:410px;",:onchange => "selectChange(this)"} %>
+
+ <%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
+
+
+ <% end %>
|
@@ -82,7 +90,7 @@
<%= l(:label_work_deposit_project) %>:
- <%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline3' %>
+ <%= select_tag 'project', options_for_select(select_option_helper(@option),@softapplication.project_id), :name => 'project', :class => 'grayline3' %>
<%#= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%>