Commit 413758dbc51207bd4399fd4211a4d270bde90570

Authored by Luciano Prestes
1 parent c0de5fb1

Change highlight fields with error into div to textcolor

Signed-off-by: Luciano Prestes Cavalcanti <lucianopcbr@gmail.com>
controllers/software_communities_plugin_myprofile_controller.rb
@@ -227,9 +227,12 @@ class SoftwareCommunitiesPluginMyprofileController &lt; MyProfileController @@ -227,9 +227,12 @@ class SoftwareCommunitiesPluginMyprofileController &lt; MyProfileController
227 add_software_erros 227 add_software_erros
228 end 228 end
229 229
  230 +
230 @error_community_name = @community.errors.include?(:name) ? "highlight-error" : "" 231 @error_community_name = @community.errors.include?(:name) ? "highlight-error" : ""
231 - @error_software_domain = @software_info.errors.include?(:domain) ? "highlight-error" : "" 232 + @error_software_domain = @community.errors.include?(:identifier) ? "highlight-error" : ""
232 @error_software_finality = @software_info.errors.include?(:finality) ? "highlight-error" : "" 233 @error_software_finality = @software_info.errors.include?(:finality) ? "highlight-error" : ""
233 @error_software_license = @license_info.errors.include?(:version) ? "highlight-error" : "" 234 @error_software_license = @license_info.errors.include?(:version) ? "highlight-error" : ""
  235 +
  236 + puts '='*80, @community.errors.include?(:identifier), '='*80
234 end 237 end
235 end 238 end
public/style.css
@@ -534,6 +534,6 @@ div#finality textarea { @@ -534,6 +534,6 @@ div#finality textarea {
534 height: 100px; 534 height: 100px;
535 } 535 }
536 536
537 -.highlight-error {  
538 - background-color: #FF0000; 537 +.highlight-error label {
  538 + color: #FF0000 !important;
539 } 539 }
540 \ No newline at end of file 540 \ No newline at end of file
views/software_communities_plugin_myprofile/new_software.html.erb
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <br> 41 <br>
42 <br> 42 <br>
43 43
44 - <div class= <%= @error_community_name %> > 44 + <div class= <%= @error_software_domain %> >
45 <%= label("domain", _('Domain'), {:class => "formlabel mandatory"}) %> 45 <%= label("domain", _('Domain'), {:class => "formlabel mandatory"}) %>
46 <div id='software-name-field' class='formfield'> 46 <div id='software-name-field' class='formfield'>
47 47