login.rhtml
1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<div class="login-box">
<h2><%= _('Login') %></h2>
<%
@user = User.new if ! @user
%>
<% labelled_form_for :user, @user,
:url => { :controller => 'account', :action => 'login' },
:html => { :help => _('If you are a registered user, enter your username and password to be authenticated.')+'<p/>'+_('To join on this environment, click on "<b>I want to be an user!</b>".')+'<p/>'+_('If you forgot your password, click on "<b>I forgot my password!</b>" link.') } do |f| %>
<%= f.text_field :login,
:id => ( lightbox? ? 'lightbox_' : '' ) + 'user_login',
:help => _('Here goes the nickname that you give on the registration.'),
:onchange => 'this.value = convToValidLogin( this.value )' %>
<%= f.password_field :password,
:id => ( lightbox? ? 'lightbox_' : '' ) + 'user_password',
:help => _('your password is personal, protect it.') %>
<% button_bar do %>
<%= submit_button( 'login', _('Log in') )%>
<%= lightbox_close_button(_('Cancel')) if lightbox? %>
<% end %>
<% end %>
<p class="forgot-passwd" help="<%= _('You can recover your password clicking on this link.') %>">
<%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>
</p>
<p class="want-to-be-an-user" help="<%= _('Click here to join to this environment, if you is not already an user.') %>"><strong>
<%= link_to _("I want to be an user!"), :controller => 'account', :action => 'signup' %>
</strong></p>
</div><!-- end class="login-box" -->
<% if lightbox? %>
<script type='text/javascript'>
$("lightbox_user_login").focus();
</script>
<% end %>
<%# = generate_form :user, @user, {...} %>