parent
71d6dc6d21
commit
1290a008fc
@ -0,0 +1,12 @@
|
||||
<!-- fq -->
|
||||
<%= error_messages_for 'bid' %>
|
||||
<!--[form:project]-->
|
||||
|
||||
<p><%= f.text_field :name, :required => true, :size => 60, :style => "width:490px;", :maxlength => Bid::NAME_LENGTH_LIMIT %></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 %></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>
|
||||
<p><%= f.text_field :deadline, :required => true, :size => 60, :style => "width:100px;" %><%= calendar_for('bid_deadline')%>
|
||||
</p>
|
@ -0,0 +1,10 @@
|
||||
<!-- fq -->
|
||||
<h3><%=l(:label_new_call)%></h3>
|
||||
|
||||
<%= labelled_form_for @bid, :url => {:controller => 'bids', :action => 'create_bid'} do |f| %>
|
||||
<div class="box tabular">
|
||||
<%= render :partial => 'form', :locals => { :f => f } %>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= javascript_tag "$('#bid_name').focus();" %>
|
||||
<% end %>
|
||||
</div>
|
@ -0,0 +1,11 @@
|
||||
class ChangeTypeForBid < ActiveRecord::Migration
|
||||
def up
|
||||
add_column :bids, :reward_type, :integer
|
||||
change_column :bids, :budget, :string, :null => false
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :bids, :reward_type
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
Loading…
Reference in new issue