login_block.rhtml
1.5 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">
<% unless logged_in? %>
<h2><%= _('Login') %></h2>
<div class="login-box-content">
<%
@user = User.new if ! @user
%>
<% labelled_form_for :user, @user,
: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>New user</b>".')+'<p/>'+_('If you forgot your password, click on "<b>I forgot my password!</b>" link.') },
:url => login_url do |f| %>
<%= f.text_field :login,
:help => _('Here goes the nickname that you give on the registration.'),
:onchange => 'this.value = convToValidLogin( this.value )' %>
<%= f.password_field :password,
:help => _('your password is personal, protect it.') %>
<% button_bar do %>
<%= submit_button( 'login', _('Log in') )%>
<%= link_to content_tag( 'span', _('New user') ),
{ :controller => 'account', :action => 'signup' },
:help => _('Click here to join to this environment, if you is not already an user.'),
:class => 'button with-text icon-add' %>
<% end %>
<% end %>
<div class="forgot-passwd" help="<%= _('You can recover your password clicking on this link.') %>">
<%= link_to _("I forgot my password!"),
:controller => 'account', :action => 'forgot_password' %>
</div>
</div>
<% else %>
<h2><%= user.identifier %></h2>
<% end %>
</div><!-- end id="login-box" -->