<%= stylesheet_link_tag('plugins/mpog_software/mpog-software') %>

<%= _("Step 1/2 - Software Creation")%>

<%= _('Creating new software') %>

<% if environment.enabled?('admin_must_approve_new_communities') %>
<%= _("Note that the creation of communities in this environment is restricted. Your request to create this new community will be sent to %{environment} administrators and will be approved or rejected according to their methods and criteria.") % { :environment => environment.name }%>
<%end %> <% unless @errors.blank? %>

<%= _("Can`t create new software: #{@errors.length} errors") %>

<% end %>
<%= labelled_form_for :community, :html => { :multipart => true } do |f| %> <%= required_fields_message %> <%= label("name", _('Name'), {:class => 'formlabel mandatory'}) %>
<%= environment.default_hostname %>/ <%= required text_field(:community, :name, :size => 30, :maxlength => 100) %>
<%= fields_for @software_info do |swf| %>
<%= swf.label("finality" ,_("Finality"), :class=>"formlabel") %> <%= required swf.text_area(:finality, :placeholder => _("It is a software of..."), :cols => 40, :rows => 5, :maxlength => 140) %>
<% end %> <%= fields_for @license_info do |lcv| %>

<%= lcv.label _("License Version: ") %>

<%= lcv.select(:version, LicenseInfo.all.map {|l| [l.version, l.id]}, {:selected => 1}) %>

<%= _("License link") %>

<% LicenseHelper.getListLicenses.each do | license | %> <% end %> <%=LicenseInfo.first.link %>
<% end %> <%= fields_for @software_info do |swf| %>
<%= swf.label "repository_url", _("Link to Repository: "), :class => "formlabel"%> <%= swf.text_field :repository_link, :class => "improve_input_size" %>
<% end %> <%= hidden_field_tag('back_to', @back_to) %> <% button_bar do %> <%= submit_button(:save, _('Create')) %> <%= button(:cancel, _('Cancel'), @back_to ) %> <% end %> <% end %>