socialforge/app/views/softapplications/_form.html.erb

123 lines
5.3 KiB
Plaintext
Raw Normal View History

<script type="text/javascript" language="javascript">
function selectChange(obj)
{
if(obj.value=="其他")
{
//document.getElementById("a").style.display = ""
$("#other_span").show();
}
else
{
$("#other_span").hide();
$("#other_input").val("");
//document.getElementById("a").style.display = "none"
}
}
</script>
<%= form_for(softapplication) do |f| %>
<% if softapplication.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(softapplication.errors.count, "error") %> prohibited this softapplication from being saved:</h2>
<ul>
<% softapplication.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<fieldset class="contes-new-box">
<tr style="width:700px; margin-left: -10px">
<span><%= l(:label_work_name) %></span>
<span class="contest-star"> * </span>: <td ><%= f.text_field :name, :required => true, :size => 60, :style => "width:400px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workname_lengthlimit) %>)</span>
</tr><br/>
<br />
<br />
<tr style="width:800px;">
<span><%= l(:label_running_platform) %></span>
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :android_min_version_available, :required => true, :size => 60, :style => "width:400px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr>
<br/>
<br />
<br />
<tr style="width:800px;">
<span><%= l(:label_work_type) %></span>
<span class="contest-star"> * </span>:
<td style="width: 100px">
<%#= f.text_field :app_type_name, :required => true, :size => 60, :style => "width:400px;" %>
<% 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/>
<br />
<br />
<tr style="width:800px;">
<span><%= l(:label_work_description) %></span>
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :description, :required => true, :size => 60, :style => "width:400px;" %></td>
<!--<span><%#= l(:label_softapplication_description_condition)%></span>-->
</tr>
<br/>
<br />
<br />
<tr style="width:800px;">
<span><%= l(:label_softapplication_developers) %></span>
<span class="contest-star"> * </span>: <td style="width: 100px"><%= f.text_field :application_developers, :required => true, :size => 60, :style => "width:400px;" %></td>
<span style="font-size: 10px">(<%= l(:label_workdescription_lengthlimit) %>)</span>
</tr>
<br/>
<br />
<br />
<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),@softapplication.project_id), :name => 'project', :class => 'grayline3' %></span>
<span><%#= link_to '创建项目', new_project_path(course: 0, project_type: 0), :target=>'_blank'%></span>
</tr>
<br/>
<br />
<br />
<fieldset style="width: 500px">
<p style="padding-left: 60px">
<% options = {:author => true, :deletable => true} %>
<span id="soft_attachments_links">
<%= render :partial => 'attachments/links',
:locals => {:attachments => @softapplication.attachments, :options => options} %>
</span>
</p>
<legend><%=l(:label_upload_softworkpacket_photo)%></legend>
<%= render_flash_messages %>
<p id="put-bid-form-partial">
<%= render :partial => 'attachments/form' %>
</p>
<p style="font-size: 10px;">1、<%=l(:label_upload_softapplication_packets_mustpacketed)%><br>2、<%=l(:label_upload_softapplication_photo_condition)%></p>
<!-- p style="font-size: 10px; color: red"><%#=l(:label_updated_caution)%></p-->
</fieldset>
</fieldset></br>
<div class="align-center"><%= submit_tag l(:button_create), :onclick => "return true" %></div>
<% end %>