Project

General

Profile

Descripton: How to add Registerlink in Login-Page

Added by Carsten Stanusch over 14 years ago

Cause of many Questions how to register to our Redmine i modified the following file, to get another Link to the Registrationform below the link password forgot:

So, if you are searching for this add-on...here it is ;)
Live to see at: http://smart-candle-guide.com

It would be great, if Redmine gets such a better AddOn with bigger Link, or possibility to get the posibility to edit the login-form in the administration Backend ;)

/app/views/account/login.rhtml

(Changes on lines 24, 26 to 28)

<div id="login-form">
<% form_tag({:action=> "login"}) do %>
<%= back_url_hidden_field_tag %>
<table>
<tr>
    <td align="right"><label for="username"><%=l(:field_login)%>:</label></td>
    <td align="left"><p><%= text_field_tag 'username', nil, :size => 40 %></p></td>
</tr>
<tr>
    <td align="right"><label for="password"><%=l(:field_password)%>:</label></td>
    <td align="left"><%= password_field_tag 'password', nil, :size => 40 %></td>
</tr>
<tr>
    <td></td>
    <td align="left">
        <% if Setting.autologin? %>
        <label for="autologin"><%= check_box_tag 'autologin' %> <%= l(:label_stay_logged_in) %></label>
        <% end %>
    </td>
</tr>
<tr>
    <td align="left">
        <% if Setting.lost_password? %>
            <%= link_to l(:label_password_lost), :controller => 'account', :action => 'lost_password' %><br>
        <% end %>
        <% if Setting.self_registration? %>
            <b><%= link_to l(:label_register), :controller => 'account', :action => 'register' %></b>
        <% end %>
    </td>
    <td align="right">
        <input type="submit" name="login" value="<%=l(:button_login)%> &#187;" />
    </td>
</tr>
<tr>

</table>
<%= javascript_tag "Form.Element.focus('username');" %>
<% end %>
</div>