Revision 912:5e80956cc792 app/views/account

View differences:

app/views/account/login.html.erb
1
<%= call_hook :view_account_login_top %>
2
<div id="login-form">
3
<% form_tag({:action=> "login"}) do %>
4
<%= back_url_hidden_field_tag %>
5
<table>
6
<tr>
7
    <td align="right"><label for="username"><%=l(:field_login)%>:</label></td>
8
    <td align="left"><%= text_field_tag 'username', nil, :tabindex => '1' %></td>
9
</tr>
10
<tr>
11
    <td align="right"><label for="password"><%=l(:field_password)%>:</label></td>
12
    <td align="left"><%= password_field_tag 'password', nil, :tabindex => '2' %></td>
13
</tr>
14
<% if Setting.openid? %>
15
<tr>
16
  <td align="right"><label for="openid_url"><%=l(:field_identity_url)%></label></td>
17
  <td align="left"><%= text_field_tag "openid_url", nil, :tabindex => '3' %></td>
18
</tr>
19
<% end %>
20
<tr>
21
    <td></td>
22
    <td align="left">
23
        <% if Setting.autologin? %>
24
        <label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label>
25
        <% end %>
26
    </td>
27
</tr>
28
<tr>
29
    <td align="left">
30
        <% if Setting.lost_password? %>
31
            <%= link_to l(:label_password_lost), :controller => 'account', :action => 'lost_password' %>
32
        <% end %>
33
    </td>
34
    <td align="right">
35
        <input type="submit" name="login" value="<%=l(:button_login)%> &#187;" tabindex="5"/>
36
    </td>
37
</tr>
38
</table>
39
<%= javascript_tag "Form.Element.focus('username');" %>
40
<% end %>
41
</div>
42
<%= call_hook :view_account_login_bottom %>
app/views/account/login.rhtml
1
<%= call_hook :view_account_login_top %>
2
<div id="login-form">
3
<% form_tag({:action=> "login"}) do %>
4
<%= back_url_hidden_field_tag %>
5
<table>
6
<tr>
7
    <td align="right"><label for="username"><%=l(:field_login)%>:</label></td>
8
    <td align="left"><%= text_field_tag 'username', nil, :tabindex => '1' %></td>
9
</tr>
10
<tr>
11
    <td align="right"><label for="password"><%=l(:field_password)%>:</label></td>
12
    <td align="left"><%= password_field_tag 'password', nil, :tabindex => '2' %></td>
13
</tr>
14
<% if Setting.openid? %>
15
<tr>
16
  <td align="right"><label for="openid_url"><%=l(:field_identity_url)%></label></td>
17
  <td align="left"><%= text_field_tag "openid_url", nil, :tabindex => '3' %></td>
18
</tr>
19
<% end %>
20
<tr>
21
    <td></td>
22
    <td align="left">
23
        <% if Setting.autologin? %>
24
        <label for="autologin"><%= check_box_tag 'autologin', 1, false, :tabindex => 4 %> <%= l(:label_stay_logged_in) %></label>
25
        <% end %>
26
    </td>
27
</tr>
28
<tr>
29
    <td align="left">
30
        <% if Setting.lost_password? %>
31
            <%= link_to l(:label_password_lost), :controller => 'account', :action => 'lost_password' %>
32
        <% end %>
33
    </td>
34
    <td align="right">
35
        <input type="submit" name="login" value="<%=l(:button_login)%> &#187;" tabindex="5"/>
36
    </td>
37
</tr>
38
</table>
39
<%= javascript_tag "Form.Element.focus('username');" %>
40
<% end %>
41
</div>
42
<%= call_hook :view_account_login_bottom %>
app/views/account/lost_password.html.erb
1
<h2><%=l(:label_password_lost)%></h2>
2

  
3
<div class="box">
4
<% form_tag({:action=> "lost_password"}, :class => "tabular") do %>
5

  
6
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
7
<%= text_field_tag 'mail', nil, :size => 40 %>
8
<%= submit_tag l(:button_submit) %></p>
9

  
10
<% end %>
11
</div>
app/views/account/lost_password.rhtml
1
<h2><%=l(:label_password_lost)%></h2>
2

  
3
<div class="box">
4
<% form_tag({:action=> "lost_password"}, :class => "tabular") do %>
5

  
6
<p><label for="mail"><%=l(:field_mail)%> <span class="required">*</span></label>
7
<%= text_field_tag 'mail', nil, :size => 40 %>
8
<%= submit_tag l(:button_submit) %></p>
9

  
10
<% end %>
11
</div>
app/views/account/password_recovery.html.erb
1
<h2><%=l(:label_password_lost)%></h2>
2

  
3
<%= error_messages_for 'user' %>
4

  
5
<% form_tag({:token => @token.value}) do %>
6
<div class="box tabular">
7
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
8
<%= password_field_tag 'new_password', nil, :size => 25 %><br />
9
<em><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
10

  
11
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
12
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
13
</div>
14
<p><%= submit_tag l(:button_save) %></p>
15
<% end %>
app/views/account/password_recovery.rhtml
1
<h2><%=l(:label_password_lost)%></h2>
2

  
3
<%= error_messages_for 'user' %>
4

  
5
<% form_tag({:token => @token.value}) do %>
6
<div class="box tabular">
7
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
8
<%= password_field_tag 'new_password', nil, :size => 25 %><br />
9
<em><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
10

  
11
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
12
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
13
</div>
14
<p><%= submit_tag l(:button_save) %></p>
15
<% end %>  
app/views/account/register.html.erb
1
<%= javascript_include_tag "ssamr_institutions" %>
2
<%= javascript_include_tag "ssamr_registration" %>
3

  
4
<h2><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h2>
5

  
6
<% form_tag({:action => 'register'}, :class => "tabular") do %>
7
<%= error_messages_for 'user' %>
8

  
9
<div class="box">
10
<!--[form:user]-->
11
<% if @user.auth_source_id.nil? %>
12
<p><label for="user_login"><%=l(:field_login)%> <span class="required">*</span></label>
13
<%= text_field 'user', 'login', :size => 25 %></p>
14

  
15
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
16
<%= password_field_tag 'password', nil, :size => 25  %><br />
17
<em><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
18

  
19
<p><label for="password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
20
<%= password_field_tag 'password_confirmation', nil, :size => 25  %></p>
21
<% end %>
22

  
23
<p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
24
<%= text_field 'user', 'firstname'  %></p>
25

  
26
<p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>
27
<%= text_field 'user', 'lastname'  %></p>
28

  
29
<p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label>
30
<%= text_field 'user', 'mail'  %></p>
31

  
32
<!-- We only support English in this site 
33
<p><label for="user_language"><%=l(:field_language)%></label>
34
<%= select("user", "language", lang_options_for_select) %></p>
35
-->
36

  
37
<h3><%=l(:label_ssamr_details)%></h3>
38
	
39
		<% fields_for :ssamr_user_details, :builder => TabularFormBuilder, :lang => current_language do |ssamr_user_detail| %>	
40
			<p>
41
                          <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit' %>                          
42
                          <em> <%=l(:text_user_ssamr_description_info)%></em>
43
                        </p>
44

  
45
                        <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
46
							<%= ssamr_user_detail.radio_button :institution_type, true %>
47
                          	<%= ssamr_user_detail.collection_select(:institution_id, Institution.find(:all, :order => "institutions.order"), :id, :name,  {:selected => @selected_institution_id, :prompt => true}).gsub('&amp;', '&')  %>
48
						</p>
49

  
50
                        <p>
51
                          <%= ssamr_user_detail.radio_button :institution_type, false %> Other:
52
                          <%= ssamr_user_detail.text_field(:other_institution) %>
53
                        </p>
54
                <% end %>
55
          
56
<% if Setting.openid? %>
57
<p><label for="user_identity_url"><%=l(:field_identity_url)%></label>
58
<%= text_field 'user', 'identity_url'  %></p>
59
<% end %>
60

  
61
<% @user.custom_field_values.select {|v| v.editable? || v.required?}.each do |value| %>
62
  <p><%= custom_field_tag_with_label :user, value %></p>
63
<% end %>
64
<!--[eoform:user]-->
65
</div>
66

  
67
<%= check_box :user, :terms_and_conditions %> <%= l(:accept_terms_and_conditions) %> <%= link_to("Terms and Conditions", "https://code.soundsoftware.ac.uk/projects/soundsoftware-site/wiki/TandCs", {:target => "_blank"}) %>.
68
<br />
69
<br />
70

  
71
<%= submit_tag l(:button_submit) %>
72
<% end %>
app/views/account/register.rhtml
1
<%= javascript_include_tag "ssamr_institutions" %>
2
<%= javascript_include_tag "ssamr_registration" %>
3

  
4
<h2><%=l(:label_register)%> <%=link_to l(:label_login_with_open_id_option), signin_url if Setting.openid? %></h2>
5

  
6
<% form_tag({:action => 'register'}, :class => "tabular") do %>
7
<%= error_messages_for 'user' %>
8

  
9
<div class="box">
10
<!--[form:user]-->
11
<% if @user.auth_source_id.nil? %>
12
<p><label for="user_login"><%=l(:field_login)%> <span class="required">*</span></label>
13
<%= text_field 'user', 'login', :size => 25 %></p>
14

  
15
<p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
16
<%= password_field_tag 'password', nil, :size => 25  %><br />
17
<em><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
18

  
19
<p><label for="password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
20
<%= password_field_tag 'password_confirmation', nil, :size => 25  %></p>
21
<% end %>
22

  
23
<p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
24
<%= text_field 'user', 'firstname'  %></p>
25

  
26
<p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>
27
<%= text_field 'user', 'lastname'  %></p>
28

  
29
<p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label>
30
<%= text_field 'user', 'mail'  %></p>
31

  
32
<!-- We only support English in this site 
33
<p><label for="user_language"><%=l(:field_language)%></label>
34
<%= select("user", "language", lang_options_for_select) %></p>
35
-->
36

  
37
<h3><%=l(:label_ssamr_details)%></h3>
38
	
39
		<% fields_for :ssamr_user_details, :builder => TabularFormBuilder, :lang => current_language do |ssamr_user_detail| %>	
40
			<p>
41
                          <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit' %>                          
42
                          <em> <%=l(:text_user_ssamr_description_info)%></em>
43
                        </p>
44

  
45
                        <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>
46
							<%= ssamr_user_detail.radio_button :institution_type, true %>
47
                          	<%= ssamr_user_detail.collection_select(:institution_id, Institution.find(:all, :order => "institutions.order"), :id, :name,  {:selected => @selected_institution_id, :prompt => true}).gsub('&amp;', '&')  %>
48
						</p>
49

  
50
                        <p>
51
                          <%= ssamr_user_detail.radio_button :institution_type, false %> Other:
52
                          <%= ssamr_user_detail.text_field(:other_institution) %>
53
                        </p>
54
                <% end %>
55
          
56
<% if Setting.openid? %>
57
<p><label for="user_identity_url"><%=l(:field_identity_url)%></label>
58
<%= text_field 'user', 'identity_url'  %></p>
59
<% end %>
60

  
61
<% @user.custom_field_values.select {|v| v.editable? || v.required?}.each do |value| %>
62
	<p><%= custom_field_tag_with_label :user, value %></p>
63
<% end %>
64
<!--[eoform:user]-->
65
</div>
66

  
67
<%= check_box :user, :terms_and_conditions %> <%= l(:accept_terms_and_conditions) %> <%= link_to("Terms and Conditions", "https://code.soundsoftware.ac.uk/projects/soundsoftware-site/wiki/TandCs", {:target => "_blank"}) %>.
68
<br />
69
<br />
70

  
71
<%= submit_tag l(:button_submit) %>
72
<% end %>

Also available in: Unified diff