You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
883 B
14 lines
883 B
= form_for @registration_form_field do |f|
|
|
- if @conference
|
|
= f.hidden_field :conference_id, value: @conference.id
|
|
= f.select :field_type, RegistrationFormField::Types.keys
|
|
- RegistrationFormField::Fields.each do |key, value|
|
|
- options = {:html => { :classes => RegistrationFormField::TypesForField(key.to_sym).collect{|v| 'field-type-' + v.to_s} } }
|
|
- options[:html][:classes] << 'registration-form-field-field'
|
|
-# eval('field f, :' + key.to_s + ', :' + value[:control] + (value[:options] ? ', ' + (value[:options].map.with_index{|v, i| 'value[:options][' + i.to_s + ']'}.join(', ') || 'nil') : '') + ", classes: classes")
|
|
- if value[:options]
|
|
- fields = options_for_select(value[:options].first.map { |v| [_("form_field.#{v}"), v]})
|
|
= f.send(value[:control], key.to_s, fields, options)
|
|
- else
|
|
= f.send(value[:control], key.to_s, options)
|
|
= f.actions :save
|
|
|