<%= error_messages_for 'project' %>

<%= f.text_field :name, :required => true %>
<%= l(:text_caracters_maximum, 30) %>

<% if User.current.admin? and !@root_projects.empty? %>

<%= f.select :parent_id, (@root_projects.collect {|p| [p.name, p.id]}), { :include_blank => true } %>

<% end %>

<%= f.text_area :description, :required => true, :cols => 60, :rows => 5 %><%= l(:text_caracters_maximum, 255) %>

<%= f.text_field :identifier, :required => true, :size => 15, :disabled => @project.identifier_frozen? %>
<%= l(:text_length_between, 3, 12) %> <%= l(:text_project_identifier_info) unless @project.identifier_frozen? %>

<%= f.text_field :homepage, :size => 40 %>

<%= f.check_box :is_public %>

<%= wikitoolbar_for 'project_description' %> <% for @custom_value in @custom_values %>

<%= custom_field_tag_with_label @custom_value %>

<% end %> <% unless @custom_fields.empty? %>

<% for custom_field in @custom_fields %> <%= check_box_tag "custom_field_ids[]", custom_field.id, ((@project.custom_fields.include? custom_field) or custom_field.is_for_all?), (custom_field.is_for_all? ? {:disabled => "disabled"} : {}) %> <%= custom_field.name %> <% end %>

<% end %>
<% content_for :header_tags do %> <%= javascript_include_tag 'calendar/calendar' %> <%= javascript_include_tag "calendar/lang/calendar-#{current_language}.js" %> <%= javascript_include_tag 'calendar/calendar-setup' %> <%= stylesheet_link_tag 'calendar' %> <% end %>