Sha256: 5dee231e412b7066a9e1432073a20200c34984c7a9e378655fb07383300ce2fd

Contents?: true

Size: 978 Bytes

Versions: 19

Compression:

Stored size: 978 Bytes

Contents

# This migration comes from erp_forms (originally 20121026191738)
class UpdateContactForm
  
  def self.up
    model = DynamicFormModel.find_by_model_name('WebsiteInquiry')
    model.create_role

    fields = []

    fields << DynamicFormField.textfield({:fieldLabel => 'First Name', :name => 'first_name', :width => 250, :allowBlank => false })
    fields << DynamicFormField.textfield({:fieldLabel => 'Last Name', :name => 'last_name', :width => 250, :allowBlank => false })
    fields << DynamicFormField.email({:fieldLabel => 'Email', :name => 'email', :width => 250, :allowBlank => false })
    fields << DynamicFormField.textarea({:fieldLabel => 'Message', :name => 'message', :width => 400, :height => 200, :allowBlank => false })    
    
    d = DynamicForm.find_by_internal_identifier('contact_us')
    unless d.nil?
      d.definition = fields.to_json
      d.msg_target = 'qtip'
      d.save    
    end    
  end
  
  def self.down
    #remove data here
  end

end

Version data entries

19 entries across 19 versions & 6 rubygems

Version Path
knitkit-2.1.14 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
knitkit-2.1.13 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
erp_forms-3.1.1 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
knitkit-2.1.12 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
knitkit-2.1.9 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
knitkit-2.1.8 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
erp_forms-3.1.0 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
knitkit-2.1.7 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
knitkit-2.1.5 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
erp_search-3.1.1 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
rails_db_admin-2.1.1 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
knitkit-2.1.1 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
erp_forms-3.0.0 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
rails_db_admin-2.1.0 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
knitkit-2.1.0 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
erp_search-3.1.0 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
erp_invoicing-3.1.0 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
erp_forms-2.1.0 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb
compass_ae_console-2.0.0 spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb