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 227 add_software_erros
228 228 end
229 229  
  230 +
230 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 233 @error_software_finality = @software_info.errors.include?(:finality) ? "highlight-error" : ""
233 234 @error_software_license = @license_info.errors.include?(:version) ? "highlight-error" : ""
  235 +
  236 + puts '='*80, @community.errors.include?(:identifier), '='*80
234 237 end
235 238 end
... ...
public/style.css
... ... @@ -534,6 +534,6 @@ div#finality textarea {
534 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 540 \ No newline at end of file
... ...
views/software_communities_plugin_myprofile/new_software.html.erb
... ... @@ -41,7 +41,7 @@
41 41 <br>
42 42 <br>
43 43  
44   - <div class= <%= @error_community_name %> >
  44 + <div class= <%= @error_software_domain %> >
45 45 <%= label("domain", _('Domain'), {:class => "formlabel mandatory"}) %>
46 46 <div id='software-name-field' class='formfield'>
47 47  
... ...