new_software.html.erb 2.69 KB
<span id="new-software-page"></span>

<div class="software-step-info">
  <h3><%= _("Step 1 - Software Creation")%></h3>
  <h3 style="color: rgba(0, 0, 0, 0.2)"><%= _("Step 2 - Edit Community info ")%></h3>

  <p>
    <spam class = 'software-message' >Enter the basic information about the software.<br>
      You can add the details after you create it.
    </spam>
  </p>

</div>

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

<% if environment.enabled?('admin_must_approve_new_communities') %>
  <div class='explanation'>
    <%= _("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 }%>
  </div>
<%end %>

<% unless @errors.blank? %>
<div class="errorExplanation" id="errorExplanation">
  <h2> <%= _("Can`t create new software: #{@errors.length} errors") %> </h2>
  <ul>
  <% @errors.each do |error| %>
    <li> <%= error %> </li>
  <% end %>
  </ul>
</div>
<% end %>

<div>
  <%= labelled_form_for :community, :html => { :multipart => true } do |f| %>

    <%= required_fields_message %>

    <%= label("name", _('Name'), {:class => 'formlabel mandatory'}) %>
    <%= required text_field(:community, :name, :size => 30, :maxlength => 100, :id => 'community_name_id') %>

    <br>
    <br>

    <%= label("domain", _('Domain')) %>
    <div id='software-name-field' class='formfield'>

      <span id='software-hostname'><%= environment.default_hostname %>/</span>
      <%= required text_field(:community, :name, :size => 30, :maxlength => 100) %>
    </div>

    <%= fields_for @software_info do |swf| %>
      <div class="formfield type-text">
        <%= swf.label("finality" ,_("Finality"), :class=>"formlabel") %>
        <%= required swf.text_area(:finality, :placeholder => _("What is the software?"), :cols => 40, :rows => 5, :maxlength => 140) %>
      </div>
    <% end %>

    <div class="formfieldline">
      <%= render :partial => "license_info_fields", :locals => {
        :license_version => "",
        :license_id => "",
        :another_version=>"",
        :another_link=>""
      } %>
    </div>

    <%= fields_for @software_info do |swf| %>
      <div class="formfieldline formfield type-text">
        <%= swf.label "repository_url", _("Link to Repository: "), :class => "formlabel"%>
        <%= swf.text_field :repository_link, :class => "improve_input_size" %>
      </div>
    <% end %>

    <%= hidden_field_tag('back_to', @back_to) %>

    <% button_bar do %>
      <%= submit_button(:save, _('Create')) %>
      <%= button(:cancel, _('Cancel'), @back_to ) %>
    <% end %>

  <% end %>

</div>