1.增加修改竞赛作品页面作品类型、关联项目的默认选择

This commit is contained in:
sw 2014-07-21 17:44:14 +08:00
parent b1251db30c
commit bfda30ee80
1 changed files with 14 additions and 6 deletions

View File

@ -51,11 +51,19 @@
<span class="contest-star"> * </span>:
<td style="width: 100px">
<%#= 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)"} %>
<span style="font-size: 10px;display: none" id="other_span">
<%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
<input type="text" style="width: 100px;" id="other_input" name = "other_input"/>
</span>
<% 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)"} %>
<span style="font-size: 10px;display: none" id="other_span">
<%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
<input type="text" style="width: 100px;" id="other_input" name = "other_input"/>
</span>
<% else %>
<%= f.select :app_type_name,options_for_select(work_type_opttion,"其他"), {},{:style => "width:410px;",:onchange => "selectChange(this)"} %>
<span style="font-size: 10px;" id="other_span">
<%#= f.text_field :other_input, :required => true, :size => 60, :style => "width:100px;" %>
<input type="text" style="width: 100px;" id="other_input" name = "other_input" value="<%= @softapplication.app_type_name%>"/>
</span>
<% end %>
</td>
</tr>
<br/>
@ -82,7 +90,7 @@
<tr style="width:800px;">
<span><%= l(:label_work_deposit_project) %></span>
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option)), :name => 'project', :class => 'grayline3' %></span>
<span style="padding-left: 4px"><%= select_tag 'project', options_for_select(select_option_helper(@option),@softapplication.project_id), :name => 'project', :class => 'grayline3' %></span>
<span><%#= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%></span>
</tr>
<br/>