From 2c6f38af496d98d7d336f7bddfb6344d38012797 Mon Sep 17 00:00:00 2001 From: David Carlos Date: Thu, 26 Feb 2015 10:30:02 -0300 Subject: [PATCH] Inprove software creation form --- lib/software_info.rb | 3 ++- views/software_communities_plugin_myprofile/new_software.html.erb | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/software_info.rb b/lib/software_info.rb index 6cb73c5..0937f7b 100644 --- a/lib/software_info.rb +++ b/lib/software_info.rb @@ -81,9 +81,10 @@ class SoftwareInfo < ActiveRecord::Base has_one :software_categories - validates_length_of :finality, :maximum => 140 + validates_length_of :finality, :maximum => 120 validates_length_of :objectives, :maximum => 4000 validates_length_of :features, :maximum => 4000 + validates_presence_of :finality validate :validate_acronym diff --git a/views/software_communities_plugin_myprofile/new_software.html.erb b/views/software_communities_plugin_myprofile/new_software.html.erb index 3d56b9b..d5d011f 100644 --- a/views/software_communities_plugin_myprofile/new_software.html.erb +++ b/views/software_communities_plugin_myprofile/new_software.html.erb @@ -1,7 +1,15 @@ <%= stylesheet_link_tag('plugins/software_communities/mpog-software') %>
-

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

+

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

+

<%= _("Step 2 - Edit Community info ")%>

+ +

+ Enter the basic information about the software.
+ You can add the details after you create it. +
+

+

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

@@ -29,8 +37,14 @@ <%= required_fields_message %> <%= label("name", _('Name'), {:class => 'formlabel mandatory'}) %> + <%= required text_field(:community, :name, :size => 30, :maxlength => 100, :id => 'name_id') %> +
+
+ + <%= label("domain", _('Domain')) %>
+ <%= environment.default_hostname %>/ <%= required text_field(:community, :name, :size => 30, :maxlength => 100) %>
@@ -38,7 +52,7 @@ <%= 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) %> + <%= required swf.text_area(:finality, :placeholder => _("What is the software?"), :cols => 40, :rows => 5, :maxlength => 140) %>
<% end %> -- libgit2 0.21.2