2014-10-23 11:30:34 +08:00
|
|
|
<!-- fq -->
|
|
|
|
|
|
|
|
<script type="text/javascript" language="javascript">
|
|
|
|
function show(id, id_t, label_reward, label_money, label_credit, label_content) {
|
|
|
|
var text = $('#' + id);
|
|
|
|
var text_t = $('#' + id_t);
|
|
|
|
if (text.val() == 0) {
|
|
|
|
text_t.attr("placeholder", label_reward);
|
|
|
|
}
|
|
|
|
if (text.val() == 1) {
|
|
|
|
text_t.attr("placeholder", label_money);
|
|
|
|
}
|
|
|
|
if (text.val() == 3) {
|
|
|
|
text_t.attr("placeholder", label_credit);
|
|
|
|
}
|
|
|
|
if (text.val() == 2) {
|
|
|
|
text_t.attr("placeholder", label_content);
|
|
|
|
}
|
|
|
|
return content;
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<%= error_messages_for 'bid' %>
|
|
|
|
<p>
|
|
|
|
<%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;",
|
|
|
|
:maxlength => Bid::NAME_LENGTH_LIMIT,
|
2014-12-19 11:23:16 +08:00
|
|
|
:onkeyup => "regexName();" %>
|
2014-10-23 11:30:34 +08:00
|
|
|
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
<span id="bid_name_span"></span>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;",
|
|
|
|
:maxlength => Bid::DESCRIPTION_LENGTH_LIMIT %>
|
|
|
|
</p>
|
|
|
|
<% time = (Time.now + 3600 * 24).strftime('%Y-%m-%d') %>
|
2014-10-29 15:16:00 +08:00
|
|
|
<p>
|
2014-11-05 10:06:20 +08:00
|
|
|
<%= f.text_field(:deadline, :required => true, :size => 60, :style => "width:100px;",:value => "#{time}", :onchange => "regexDeadLine();", :readonly => true) %>
|
2014-10-23 11:30:34 +08:00
|
|
|
<%= calendar_for('bid_deadline')%>
|
|
|
|
<span id="bid_deadline_span">
|
|
|
|
</span>
|
|
|
|
</p>
|
2014-10-31 17:47:39 +08:00
|
|
|
<p style="display: none">
|
2014-10-23 11:30:34 +08:00
|
|
|
<%= f.select :is_evaluation, is_evaluation_option %>
|
|
|
|
</p>
|
2014-11-22 09:33:37 +08:00
|
|
|
<p style="display: none">
|
2014-10-23 11:30:34 +08:00
|
|
|
<%= f.select :proportion, proportion_option %>
|
|
|
|
</p>
|
2014-12-10 10:54:21 +08:00
|
|
|
<p id="open_anonymous_evaluation_p">
|
2014-11-19 10:34:36 +08:00
|
|
|
<%= f.check_box :open_anonymous_evaluation, :style => "margin-left:10px;" %>
|
2014-12-10 10:54:21 +08:00
|
|
|
<span id='open_anonymous_evaluation_span' style="display: none">未开启匿评作业将直接进入众评点赞阶段</span>
|
2014-11-19 10:34:36 +08:00
|
|
|
</p>
|
|
|
|
<p id="evaluation_num_p">
|
2014-12-19 11:23:16 +08:00
|
|
|
<%= f.text_field :evaluation_num, :required => true, :size => 60, :style => "width:150px;", :onkeyup => "regexEvaluationNum();" , :maxlength => 4%>
|
2014-12-10 10:54:21 +08:00
|
|
|
<span id="bid_evaluation_num_span">即每份作业被允许匿评的人数</span>
|
2014-11-05 10:06:20 +08:00
|
|
|
</p>
|
2014-10-23 11:30:34 +08:00
|
|
|
<p>
|
|
|
|
<%= hidden_field_tag 'course_id', @course.id %>
|
|
|
|
</p>
|
|
|
|
<fieldset>
|
|
|
|
<legend>
|
|
|
|
<%= l(:label_attachment_plural) %>
|
|
|
|
</legend>
|
|
|
|
<p>
|
|
|
|
<%= render :partial => 'attachments/form', :locals => {:container => @homework} %>
|
|
|
|
</p>
|
2013-09-13 21:52:24 +08:00
|
|
|
</fieldset>
|