login_block.html.erb
1.18 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
<div class="login-box">
<% unless logged_in? %>
<h2><span><%= _('Login') %></span></h2>
<div class="login-box-content">
<%
@user ||= User.new
%>
<%= labelled_form_for :user, :url => login_url do |f| %>
<%= f.text_field :login, :onchange => 'this.value = convToValidLogin( this.value )' %>
<%= f.password_field :password %>
<%= @plugins.dispatch(:login_extra_contents).collect { |content| instance_eval(&content) }.join("") %>
<% button_bar do %>
<%= submit_button( 'login', _('Log in') )%>
<% unless @plugins.dispatch(:allow_user_registration).include?(false) %>
<%= link_to content_tag( 'span', _('New user') ),
{ :controller => 'account', :action => 'signup' },
:class => 'button with-text icon-add' %>
<% end %>
<% end %>
<% end %>
<% unless @plugins.dispatch(:allow_password_recovery).include?(false) %>
<p class="forgot-passwd">
<%= link_to _("I forgot my password!"), :controller => 'account', :action => 'forgot_password' %>
</p>
<% end %>
</div>
<% else %>
<h2><%= user.identifier %></h2>
<% end %>
</div><!-- end id="login-box" -->