Bike!Bike! Website!
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.

15 lines
821 B

= form_for @registration_form_field do |f|
- if @registration_form_field.errors.any?
#error_explanation
%h2= "#{pluralize(@registration_form_field.errors.count, "error")} prohibited this registration_form_field from being saved:"
%ul
- @registration_form_field.errors.full_messages.each do |msg|
%li= msg
= field f, :field_type, :select, RegistrationFormField::Types.keys
- RegistrationFormField::Fields.each do |key, value|
- classes = RegistrationFormField::TypesForField(key.to_sym).collect{|v| 'field-type-' + v.to_s}
- 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")
= actions :save