view rhodecode/templates/login.html @ 3625:260a7a01b054 beta

follow Python conventions for boolean values True and False might be singletons and the "default" values for "boolean" expressions, but "all" values in Python has a boolean value and should be evaluated as such. Checking with 'is True' and 'is False' is thus confusing, error prone and unnessarily complex. If we anywhere rely and nullable boolean fields from the database layer and don't want the null value to be treated as False then we should check explicitly for null with 'is None'.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 28 Mar 2013 01:10:45 +0100
parents 1f334a68d057
children 3563bb7b4b82
line wrap: on
line source

## -*- coding: utf-8 -*-
<%inherit file="base/root.html"/>

<%def name="title()">
    ${_('Log In')} &middot; ${c.rhodecode_name}
</%def>

<div id="login">
<div class="flash_msg">
    <% messages = h.flash.pop_messages() %>
    % if messages:
    <ul id="flash-messages">
        % for message in messages:
        <li class="${message.category}_msg">${message}</li>
        % endfor
    </ul>
    % endif
</div>
    <!-- login -->
    <div class="title top-left-rounded-corner top-right-rounded-corner">
        <h5>${_('Log In to %s') % c.rhodecode_name}</h5>
    </div>
    <div class="inner">
        ${h.form(h.url.current(came_from=c.came_from))}
        <div class="form">
            <!-- fields -->

            <div class="fields">
                <div class="field">
                    <div class="label">
                        <label for="username">${_('Username')}:</label>
                    </div>
                    <div class="input">
                        ${h.text('username',class_='focus large')}
                    </div>

                </div>
                <div class="field">
                    <div class="label">
                        <label for="password">${_('Password')}:</label>
                    </div>
                    <div class="input">
                        ${h.password('password',class_='focus large')}
                    </div>

                </div>
                <div class="field">
                    <div class="checkbox">
                        <input type="checkbox" id="remember" name="remember" />
                        <label for="remember">${_('Remember me')}</label>
                    </div>
                </div>
                <div class="buttons">
                    ${h.submit('sign_in',_('Sign In'),class_="ui-btn large")}
                </div>
            </div>
            <!-- end fields -->
            <!-- links -->
            <div class="links">
                ${h.link_to(_('Forgot your password ?'),h.url('reset_password'))}
                %if h.HasPermissionAny('hg.admin', 'hg.register.auto_activate', 'hg.register.manual_activate')():
                  /
                 ${h.link_to(_("Don't have an account ?"),h.url('register'))}
                %endif
            </div>

            <!-- end links -->
        </div>
        ${h.end_form()}
        <script type="text/javascript">
        YUE.onDOMReady(function(){
            YUD.get('username').focus();
        })
        </script>
    </div>
    <!-- end login -->
</div>