Commit 5631ef13a252d2adc444bed32b64d4afdea0d94e

Authored by Antonio Terceiro
1 parent 75d2e28c

ActionItem910: usability enhancements on invite screens

app/views/friends/index.rhtml
... ... @@ -37,7 +37,7 @@
37 37 <% button_bar do %>
38 38 <%= button(:back, _('Go back'), :controller => 'profile_editor') %>
39 39 <%= button(:search, _('Find people'), :controller => 'search', :action => 'assets', :asset => 'people') %>
40   - <%= button(:search, _('Invite friends from my e-mail contacts'), :action => 'invite') %>
  40 + <%= button(:search, _('Invite people from my e-mail contacts'), :action => 'invite') %>
41 41 <% end %>
42 42  
43 43 </div><!-- end id="manage_friends" -->
... ...
app/views/friends/invite.rhtml
... ... @@ -3,21 +3,17 @@
3 3  
4 4 <% unless @friends %>
5 5  
6   - <h2><%= __('Step 1 of 1: Accessing your contact list') %></h2>
7   -
8   - <p>
9   - <%= __('Choose your webmail provider and enter your login and password so we can fetch your contact list. If you only want to invite specific people by listing their e-mail addresses, select the "Enter e-mail addresses manually" option.') %>
10   - </p>
  6 + <h2><%= __('Step 1 of 1: Select address book') %></h2>
11 7  
12 8 <% form_tag do %>
13 9 <%= hidden_field_tag(:import, 1) %>
14 10  
15   - <%= labelled_form_field(_('Select your e-mail provider:'), [
  11 + <%= [
  12 + radio_button_tag(:import_from, "manual", @import_from == "manual", :onclick => 'hide_invite_friend_login_password()') + content_tag('label', __('Manually (empty field)'), :for => "import_from_manual"),
16 13 radio_button_tag(:import_from, "gmail", @import_from == "gmail", :onclick => 'show_invite_friend_login_password()') + content_tag('label', 'Gmail', :for => 'import_from_gmail'),
17 14 radio_button_tag(:import_from, "yahoo", @import_from == "yahoo", :onclick => 'show_invite_friend_login_password()') + content_tag('label', 'Yahoo', :for => "import_from_yahoo"),
18   - radio_button_tag(:import_from, "hotmail", @import_from == "hotmail", :onclick => 'show_invite_friend_login_password()') + content_tag('label', 'Hotmail', :for => "import_from_hotmail"),
19   - radio_button_tag(:import_from, "manual", @import_from == "manual", :onclick => 'hide_invite_friend_login_password()') + content_tag('label', __('Enter e-mail addresses manually'), :for => "import_from_manual")
20   - ].join("\n<br/>\n")) %>
  15 + radio_button_tag(:import_from, "hotmail", @import_from == "hotmail", :onclick => 'show_invite_friend_login_password()') + content_tag('label', 'Hotmail', :for => "import_from_hotmail")
  16 + ].join("\n<br/>\n") %>
21 17  
22 18 <script type="text/javascript">
23 19 function hide_invite_friend_login_password() {
... ... @@ -52,8 +48,7 @@
52 48 <%= hidden_field_tag(:import_from, @import_from) %>
53 49  
54 50 <div>
55   - <%= __("Enter one e-mail address per line, following the example below.")%>
56   - <%= labelled_form_field(__('E-mail addresses'), text_area_tag(:manual_import_addresses, (@manual_import_addresses || __("Firstname Lastname <friend@email.com>")), :cols => 72, :rows => 5)) %>
  51 + <%= labelled_form_field(__('Enter one e-mail address per line:'), text_area_tag(:manual_import_addresses, (@manual_import_addresses || ''), :cols => 72, :rows => 5)) %>
57 52 </div>
58 53 <% if @import_from != 'manual' %>
59 54 <div>
... ... @@ -70,9 +65,10 @@
70 65 </div>
71 66 <% end -%>
72 67  
  68 + <br/>
73 69 <div>
74 70 <%= h __("Now enter an invitation message. You must keep the <url> code in your invitation message. When your friends receive the invitation e-mail, <url> will be replaced by a link that they need to click to activate their account. <user> and <friend> codes will be replaced by your name and friend name, but they are optional.") %>
75   - <%= labelled_form_field(__('Invitation message'), text_area_tag(:message, @message, :cols => 72, :rows => 8)) %>
  71 + <%= labelled_form_field(__('Invitation message:'), text_area_tag(:message, @message, :cols => 72, :rows => 8)) %>
76 72 </div>
77 73  
78 74 <% button_bar do %>
... ...