<%= form_for(@attr_def, :html => { :class => "form-horizontal"}) do |f| %> <% if @attr_def.errors.any? %>

<%= pluralize(@attr_def.errors.count, "error") %> prohibited this attr_def from being saved:

<% end %>
<%= f.label :attr_def_name %>
<%= f.text_field :attr_def_name %>
<%= f.label :label %>
<%= f.text_field :label %>
<%= f.label :description %>
<%= f.text_field :description %>
<%= f.label :mandatory %>
<%= f.check_box :mandatory %>
<%= f.label :category %>
<%= f.text_field :category %>
<%= f.label :dataType %>
<% types = ["string","integer","datetime","text","boolean","openList","entityDef","aChoice","selectOneInList"] %> <%= f.select :dataType, types, {:selected => @attr_def.dataType}, html_options = {:onchange => " jQuery('#childsEntityDef').hide(); jQuery('#childAttributs').hide(); if(this.value == 'openList' || this.value == 'selectOneInList') jQuery('#childAttributs').show(); else if(this.value == 'entityDef') jQuery('#childsEntityDef').show(); "} %>
<%= f.submit %>
<% end %>