##// END OF EJS Templates
form_for added in my/account view...
Jean-Philippe Lang -
r64:eabc04d83688
parent child
Show More
@@ -1,57 +1,47
1 <h2><%=l(:label_my_account)%></h2>
1 <h2><%=l(:label_my_account)%></h2>
2
2
3 <p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
3 <p><%=l(:field_login)%>: <strong><%= @user.login %></strong><br />
4 <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>,
4 <%=l(:field_created_on)%>: <%= format_time(@user.created_on) %>,
5 <%=l(:field_updated_on)%>: <%= format_time(@user.updated_on) %></p>
5 <%=l(:field_updated_on)%>: <%= format_time(@user.updated_on) %></p>
6
6
7 <%= error_messages_for 'user' %>
7 <%= error_messages_for 'user' %>
8
8
9 <div class="box">
9 <div class="box">
10 <h3><%=l(:label_information_plural)%></h3>
10 <h3><%=l(:label_information_plural)%></h3>
11
11
12 <%= start_form_tag({:action => 'account'}, :class => "tabular") %>
12 <% labelled_tabular_form_for :user, @user, :url => { :action => "account" } do |f| %>
13
13
14 <!--[form:user]-->
14 <p><%= f.text_field :firstname, :required => true %></p>
15 <p><label for="user_firstname"><%=l(:field_firstname)%> <span class="required">*</span></label>
15 <p><%= f.text_field :lastname, :required => true %></p>
16 <%= text_field 'user', 'firstname' %></p>
16 <p><%= f.text_field :mail, :required => true, :size => 40 %></p>
17
17 <p><%= f.select :language, lang_options_for_select %></p>
18 <p><label for="user_lastname"><%=l(:field_lastname)%> <span class="required">*</span></label>
18 <p><%= f.check_box :mail_notification %></p>
19 <%= text_field 'user', 'lastname' %></p>
19
20
20 <% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
21 <p><label for="user_mail"><%=l(:field_mail)%> <span class="required">*</span></label>
21 <p><%= pref_fields.check_box :hide_mail %></p>
22 <%= text_field 'user', 'mail', :size => 40 %></p>
22 <% end %>
23
23
24 <p><label for="user_language"><%=l(:field_language)%></label>
24 <center><%= submit_tag l(:button_save) %></center>
25 <%= select("user", "language", lang_options_for_select) %></p>
25 <% end %>
26 <!--[eoform:user]-->
26 </div>
27
28 <p><label for="user_mail_notification"><%=l(:field_mail_notification)%></label>
29 <%= check_box 'user', 'mail_notification' %></p>
30
31 <p><label for="pref_hide_mail"><%=l(:field_hide_mail)%></label>
32 <%= check_box 'pref', 'hide_mail' %></p>
33
34 <center><%= submit_tag l(:button_save) %></center>
35 <%= end_form_tag %>
36 </div>
37
27
38
28
39 <% unless @user.auth_source_id %>
29 <% unless @user.auth_source_id %>
40 <div class="box">
30 <div class="box">
41 <h3><%=l(:field_password)%></h3>
31 <h3><%=l(:field_password)%></h3>
42
32
43 <%= start_form_tag({:action => 'change_password'}, :class => "tabular") %>
33 <%= start_form_tag({:action => 'change_password'}, :class => "tabular") %>
44
34
45 <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
35 <p><label for="password"><%=l(:field_password)%> <span class="required">*</span></label>
46 <%= password_field_tag 'password', nil, :size => 25 %></p>
36 <%= password_field_tag 'password', nil, :size => 25 %></p>
47
37
48 <p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
38 <p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
49 <%= password_field_tag 'new_password', nil, :size => 25 %></p>
39 <%= password_field_tag 'new_password', nil, :size => 25 %></p>
50
40
51 <p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
41 <p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
52 <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
42 <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
53
43
54 <center><%= submit_tag l(:button_save) %></center>
44 <center><%= submit_tag l(:button_save) %></center>
55 <%= end_form_tag %>
45 <%= end_form_tag %>
56 </div>
46 </div>
57 <% end %>
47 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now