Commit 00947a33fc0e1cd1002573821187306b3a0387c8
Committed by
Fabio Teixeira
1 parent
e701524f
Exists in
master
and in
5 other branches
Remove name of edition page and finality as mandatory field
Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com> Signed-off-by: Gabriela Navarro <navarro1703@gmail.com> Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Showing
3 changed files
with
0 additions
and
26 deletions
Show diff stats
lib/software_info.rb
... | ... | @@ -14,19 +14,6 @@ class SoftwareInfo < ActiveRecord::Base |
14 | 14 | |
15 | 15 | has_one :software_categories |
16 | 16 | |
17 | - #validates :features, :objectives, | |
18 | - # :presence=>true, | |
19 | - # :length => { | |
20 | - # :maximum => 4000, | |
21 | - # :too_long => _("Software features is too long (maximum is 4000 characters)") | |
22 | - # } | |
23 | - | |
24 | - #validate :validate_operating_platform, :validate_acronym, :valid_software_info, :valid_databases, :valid_operating_systems | |
25 | - | |
26 | - #validate :finality, :presence => {:message => "Finality cannot be blank"} | |
27 | - validate :validate_finality | |
28 | - | |
29 | - | |
30 | 17 | # used on find_by_contents |
31 | 18 | scope :like_search, lambda{ |name| |
32 | 19 | joins(:community).where("name ilike ?", "%#{name}%") |
... | ... | @@ -119,11 +106,6 @@ class SoftwareInfo < ActiveRecord::Base |
119 | 106 | end |
120 | 107 | end |
121 | 108 | |
122 | - def validate_finality | |
123 | - self.errors.add(:finality, _("can't be blank")) if self.finality.blank? && self.errors.messages[:finality].nil? | |
124 | - end | |
125 | - | |
126 | - | |
127 | 109 | def valid_operating_systems |
128 | 110 | self.errors.add(:operating_system, _(": at least one must be filled")) if self.operating_systems.empty? |
129 | 111 | end | ... | ... |
views/mpog_software_plugin_myprofile/_main_software_editor_extras.html.erb
1 | 1 | <h2><%= _('Software Information') %></h2> |
2 | 2 | |
3 | -<%= label_tag("name", _('Name'), {:class => 'formlabel'}) %> | |
4 | - | |
5 | -<div id='software-name-field' class='formfield'> | |
6 | - <span id='software-hostname'><%= @profile.environment.default_hostname %>/</span> | |
7 | - <%= text_field_tag(:name, @profile.software_info.community.name) %> | |
8 | -</div> | |
9 | - | |
10 | 3 | <h3> <%= _("Finality") %> </h3> |
11 | 4 | <div id="finality"> |
12 | 5 | <%= text_field_tag("software[finality]", @profile.software_info.finality) %> | ... | ... |
views/mpog_software_plugin_myprofile/_public_software_info.html.erb
... | ... | @@ -98,7 +98,6 @@ |
98 | 98 | <% if not k == "id" and not k == "software_info_id" %> |
99 | 99 | <%= check_box_tag "software_categories[#{k}]", "true", !v.blank? %> |
100 | 100 | <%= label_tag k.to_sym, _("#{k.gsub("_", " ").capitalize}") %><br /> |
101 | - <% puts "="*80, v%> | |
102 | 101 | <% end %> |
103 | 102 | <% end %> |
104 | 103 | ... | ... |