Commit 5e12247d03e3bf2eced187624a34fc93609c9d26
1 parent
41373171
Exists in
master
and in
28 other branches
Fixes on stoa plugin signup balloons
Added balloons to fields cpf and birth date Fixed alignment
Showing
3 changed files
with
30 additions
and
6 deletions
Show diff stats
plugins/stoa/lib/stoa_plugin.rb
... | ... | @@ -19,10 +19,12 @@ class StoaPlugin < Noosfero::Plugin |
19 | 19 | |
20 | 20 | def signup_extra_contents |
21 | 21 | lambda { |
22 | - labelled_form_field(_('USP number'), text_field_tag('profile_data[usp_id]', '', :id => 'usp_id_field')) + | |
23 | - content_tag(:small, _('The usp id grants you special powers in the network. Don\'t forget to fill it if you have one.'), :id => 'usp-id-balloon') + | |
24 | - content_tag('div', required(labelled_form_field(_('Birth date (yyyy-mm-dd)'), text_field_tag('birth_date', ''))), :id => 'signup-birth-date', :style => 'display: none') + | |
25 | - content_tag('div', required(labelled_form_field(_('CPF'), text_field_tag('cpf', ''))), :id => 'signup-cpf', :style => 'display:none') + | |
22 | + content_tag(:div, labelled_form_field(_('USP number'), text_field_tag('profile_data[usp_id]', '', :id => 'usp_id_field')) + | |
23 | + content_tag(:small, _('The usp id grants you special powers in the network. Don\'t forget to fill it wth a valid number if you have one.'), :id => 'usp-id-balloon'), :id => 'signup-usp-id') + | |
24 | + content_tag('div', required(labelled_form_field(_('Birth date (yyyy-mm-dd)'), text_field_tag('birth_date', ''))) + | |
25 | + content_tag(:small, _('Confirm your birth date. Pay attention to the format: yyyy-mm-dd.'), :id => 'usp-birth-date-balloon'), :id => 'signup-birth-date', :style => 'display: none') + | |
26 | + content_tag('div', required(labelled_form_field(_('CPF'), text_field_tag('cpf', ''))) + | |
27 | + content_tag(:small, _('Confirm your CPF number.'), :id => 'usp-cpf-balloon'), :id => 'signup-cpf', :style => 'display: none') + | |
26 | 28 | javascript_include_tag('../plugins/stoa/javascripts/jquery.observe_field', '../plugins/stoa/javascripts/signup_complement') |
27 | 29 | } |
28 | 30 | end | ... | ... |
plugins/stoa/public/javascripts/signup_complement.js
... | ... | @@ -55,3 +55,17 @@ jQuery('#usp_id_field').focus(function() { |
55 | 55 | }); |
56 | 56 | |
57 | 57 | jQuery('#usp_id_field').blur(function() { jQuery('#usp-id-balloon').fadeOut('slow'); }); |
58 | + | |
59 | +jQuery('#signup-birth-date #birth_date').focus(function() { | |
60 | + jQuery('#usp-birth-date-balloon').fadeIn('slow'); | |
61 | +}); | |
62 | +jQuery('#signup-birth-date #birth_date').blur(function() { | |
63 | + jQuery('#usp-birth-date-balloon').fadeOut('slow'); | |
64 | +}); | |
65 | + | |
66 | +jQuery('#signup-cpf #cpf').focus(function() { | |
67 | + jQuery('#usp-cpf-balloon').fadeIn('slow'); | |
68 | +}); | |
69 | +jQuery('#signup-cpf #cpf').blur(function() { | |
70 | + jQuery('#usp-cpf-balloon').fadeOut('slow'); | |
71 | +}); | ... | ... |
plugins/stoa/public/style.css
... | ... | @@ -13,7 +13,15 @@ |
13 | 13 | .controller-profile_editor a.control-panel-invite-friends {background-image: url(/plugins/stoa/images/control-panel/invite-friends.png)} |
14 | 14 | .controller-profile_editor .msie6 a.control-panel-invite-friends {background-image: url(/plugins/stoa/images/control-panel/invite-friends.gif)} |
15 | 15 | |
16 | -#signup-form small#usp-id-balloon { | |
16 | +#signup-form #signup-usp-id, | |
17 | +#signup-form #signup-birth-date, | |
18 | +#signup-form #signup-cpf { | |
19 | + position: relative; | |
20 | +} | |
21 | + | |
22 | +#signup-form small#usp-id-balloon, | |
23 | +#signup-form small#usp-birth-date-balloon, | |
24 | +#signup-form small#usp-cpf-balloon { | |
17 | 25 | display: none; |
18 | 26 | width: 142px; |
19 | 27 | height: 69px; |
... | ... | @@ -27,7 +35,7 @@ |
27 | 35 | position: absolute; |
28 | 36 | z-index: 2; |
29 | 37 | right: 20px; |
30 | - bottom: 110px; | |
38 | + top: -75px; | |
31 | 39 | } |
32 | 40 | |
33 | 41 | .controller-profile_editor input.checking { | ... | ... |