Commit 197473bbc463f04602a12da9a59f7ce682ee7441
1 parent
1d38f6d7
Exists in
master
and in
29 other branches
[stoa] Adding a balloon to encourage usp_id fill on signup
Showing
2 changed files
with
23 additions
and
0 deletions
Show diff stats
plugins/stoa/lib/stoa_plugin.rb
@@ -20,6 +20,7 @@ class StoaPlugin < Noosfero::Plugin | @@ -20,6 +20,7 @@ class StoaPlugin < Noosfero::Plugin | ||
20 | def signup_extra_contents | 20 | def signup_extra_contents |
21 | lambda { | 21 | lambda { |
22 | required(labelled_form_field(_('USP number'), text_field_tag('profile_data[usp_id]', '', :id => 'usp_id_field'))) + | 22 | required(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 in if you have one.'), :id => 'usp-id-balloon') + | ||
23 | labelled_form_field(_('Select a confirmation data'), select_tag('confirmation_field', | 24 | labelled_form_field(_('Select a confirmation data'), select_tag('confirmation_field', |
24 | options_for_select([['CPF','cpf'], [_('Birth date (yyyy-mm-dd)'), 'birth_date']]) | 25 | options_for_select([['CPF','cpf'], [_('Birth date (yyyy-mm-dd)'), 'birth_date']]) |
25 | )) + | 26 | )) + |
@@ -42,6 +43,11 @@ class StoaPlugin < Noosfero::Plugin | @@ -42,6 +43,11 @@ class StoaPlugin < Noosfero::Plugin | ||
42 | height: "80%", | 43 | height: "80%", |
43 | width: "70%" }); | 44 | width: "70%" }); |
44 | } | 45 | } |
46 | + | ||
47 | + jQuery('#usp_id_field').focus(function() { | ||
48 | + jQuery('#usp-id-balloon').fadeIn('slow'); | ||
49 | + }); | ||
50 | + jQuery('#usp_id_field').blur(function() { jQuery('#usp-id-balloon').fadeOut('slow'); }); | ||
45 | EOF | 51 | EOF |
46 | ) | 52 | ) |
47 | } | 53 | } |
plugins/stoa/public/style.css
@@ -5,3 +5,20 @@ | @@ -5,3 +5,20 @@ | ||
5 | 5 | ||
6 | .controller-profile_editor a.control-panel-invite-friends {background-image: url(../../plugins/stoa/images/control-panel/invite-friends.png)} | 6 | .controller-profile_editor a.control-panel-invite-friends {background-image: url(../../plugins/stoa/images/control-panel/invite-friends.png)} |
7 | .controller-profile_editor .msie6 a.control-panel-invite-friends {background-image: url(../../plugins/stoa/images/control-panel/invite-friends.gif)} | 7 | .controller-profile_editor .msie6 a.control-panel-invite-friends {background-image: url(../../plugins/stoa/images/control-panel/invite-friends.gif)} |
8 | + | ||
9 | +#signup-form small#usp-id-balloon { | ||
10 | + display: none; | ||
11 | + width: 142px; | ||
12 | + height: 69px; | ||
13 | + color: #FFFFFF; | ||
14 | + font-weight: bold; | ||
15 | + font-size: 11px; | ||
16 | + padding: 5px 10px 45px 10px; | ||
17 | + margin: 0; | ||
18 | + line-height: 1.5em; | ||
19 | + background: transparent url(/images/orange-balloon.png) bottom center no-repeat; | ||
20 | + position: absolute; | ||
21 | + z-index: 2; | ||
22 | + right: 20px; | ||
23 | + bottom: 235px; | ||
24 | +} |