修改新建需求界面

This commit is contained in:
baiyu 2013-08-20 21:43:29 +08:00
parent b74acf7d7e
commit 6670ddcf9d
1 changed files with 25 additions and 4 deletions

View File

@ -1,12 +1,33 @@
<!-- fq -->
<script type="text/javascript" language="javascript">
function show(id, id_t) {
var text = $('#' + id);
var text_t = $('#' + id_t);
if (text.val() == 0) {
text_t.attr("placeholder", "输入奖励内容");
}
if (text.val() == 1) {
text_t.attr("placeholder", "输入奖励金额如500 2.5等");
}
if (text.val() == 3) {
text_t.attr("placeholder", "输入奖励的学分如3分 2.5分");
}
if (text.val() == 2) {
text_t.attr("placeholder", "输入奖励的内容,可以是奖项,物品等");
}
return content;
}
</script>
<%= error_messages_for 'bid' %>
<!--[form:project]-->
<p>您可以在此创建一个课程、竞赛,或者发布一个需求、问题、求助高手等等</p>
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT, :placeholder => "#{l(:label_requirement_name)}" %></p>
<p style="margin-left:-10px;padding-right: 20px;"><%= f.text_area :description, :rows => 8, :class => 'wiki-edit', :style => "font-size:small;width:490px;margin-left:10px;", :maxlength => Bid::DESCRIPTION_LENGTH_LIMIT, :placeholder => "#{l(:label_requirement_description)}" %></p>
<p><%= select_tag 'bid_reward_type', "<option value = '0'>#{l(:label_choose_reward)}</option><option value = '1'>#{l(:label_money)}</option><option value = '2'>#{l(:label_reward_1)}</option><option value = '3'>#{l(:label_grade_1)}</option>".html_safe %>
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;" %>
<p><%= select_tag 'bid_reward_type', "<option value = '0'>#{l(:label_choose_reward)}</option><option value = '1'>#{l(:label_money)}</option><option value = '3'>#{l(:label_grade_1)}</option><option value = '2'>#{l(:label_reward_1)}</option>".html_safe, :onChange => "show('bid_reward_type', 'bid_budget')" %>
<%= f.text_field :budget, :required => true, :size => 60, :style => "width:350px;", :placeholder => '输入奖励内容' %>
</p>
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:100px;", :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%>
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:150px;", :placeholder => "#{l(:label_deadline)}" %><%= calendar_for('bid_deadline')%>
</p>