[IMP] Better look for login and db selector forms

bzr revid: fme@openerp.com-20140114134427-fu1zu5xxce9j8vrl
This commit is contained in:
Fabien Meghazi 2014-01-14 14:44:27 +01:00
parent dec6f2569e
commit cedc2bd277
4 changed files with 130 additions and 55 deletions

View File

@ -3114,6 +3114,44 @@ div.ui-widget-overlay {
padding-bottom: 10px !important;
}
.oe_single_form {
background: #eeeeee url(/web/static/src/img/form_sheetbg.png);
height: 100%;
}
.oe_single_form_logo {
padding: 10px;
text-align: center;
margin-bottom: 10px;
}
.oe_single_form_footer {
position: absolute;
bottom: -30px;
}
.oe_login_form {
padding: 10px;
position: absolute;
left: 50%;
top: 50%;
width: 400px;
/* Set margins to offset 50% of the w/h */
margin-top: -200px;
margin-left: -200px;
}
.oe_dbselector_form {
padding: 10px;
position: absolute;
left: 50%;
top: 50%;
width: 300px;
/* Set margins to offset 50% of the w/h */
margin-top: -150px;
margin-left: -150px;
}
.openerp_ie .placeholder {
color: #afafb6 !important;
font-style: italic !important;

View File

@ -2491,6 +2491,38 @@ div.ui-widget-overlay
td
padding-bottom: 10px !important
// Server side single forms {{{
@mixin single-form($width: 400px)
padding: 10px
position: absolute
left: 50%
top: 50%
width: $width
/* Set margins to offset 50% of the w/h */
margin-top: -($width / 2)
margin-left: -($width / 2)
.oe_single_form
background: #eee url(/web/static/src/img/form_sheetbg.png)
height: 100%
.oe_single_form_logo
padding: 10px
text-align: center
margin-bottom: 10px
.oe_single_form_footer
position: absolute
bottom: -30px
.oe_login_form
@include single-form(400px)
.oe_dbselector_form
@include single-form(300px)
// }}}
// Internet Explorer 9+ specifics {{{
.openerp_ie
.placeholder

View File

@ -10,40 +10,38 @@
<link rel="stylesheet" href="/web/static/src/css/base.css">
<body>
<div class="openerp openerp_webclient_container">
<table class="oe_webclient">
<tr>
<td>
<div class="oe_login">
<div class="oe_login_bottom"> </div>
<div class="oe_login_pane" style="top: 60%">
<div class="oe_login_logo"><img src="/web/static/src/img/logo2.png" alt="OpenERP"></div>
<form action="/web" method="get">
<ul>
<li>Select database</li>
<li>
<select name="db">
<option></option>
{% for db in databases %}
<option value="{{ db }}">{{ db }}</option>
{% endfor %}
</select>
</li>
<li class="pull-right" style="margin-top: 20px">
<input type="submit" value="Continue"/>
</li>
</ul>
</form>
<div class="oe_login_footer">
<a class="oe_login_manage_db" href="/web/database/manager{% if debug %}?debug{% endif %}">Manage Databases</a> |
<a href="http://www.openerp.com" target="_blank">Powered by <span>OpenERP</span></a>
</div>
</div>
<div class="oe_single_form">
<form class="oe_dbselector_form modal-content" role="form" action="/web" method="get">
<div class="oe_single_form_logo">
<img src="/web/static/src/img/logo2.png"/>
</div>
</td>
</tr>
</table>
</div>
<hr/>
<div class="form-group field-db">
<label for="db" class="control-label">Select database</label>
<select name="db" id="db" class="form-control" required="required" autofocus="autofocus">
<option></option>
{% for db in databases %}
<option value="{{ db }}">{{ db }}</option>
{% endfor %}
</select>
</div>
<hr/>
{% if debug %}
<input type="hidden" name="debug" value=""/>
{% endif %}
<input type="submit" value="Continue" class="btn btn-primary pull-right"/>
<div class="oe_single_form_footer">
<a class="oe_login_manage_db" href="/web/database/manager{% if debug %}?debug{% endif %}">Manage Databases</a> |
<a href="http://www.openerp.com" target="_blank">Powered by <span>OpenERP</span></a>
</div>
</form>
</div>
</body>
</html>

View File

@ -54,29 +54,36 @@
});
</script>
</t>
<div class="container">
<div class="row">
<div class="col-md-4"> </div>
<div class="col-md-4">
<form class="oe_login_form" role="form" t-attf-action="/web/login{{ '?debug' if debug else '' }}" method="post">
<img src="/web/static/src/img/logo2.png"/>
<div class="form-group">
<label for="login">Login</label>
<input type="text" name="login" t-att-value="login" id="login" class="form-control" placeholder="Enter login" required="required" autofocus="autofocus"/>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" name="password" id="password" class="form-control" placeholder="Password" required="required"/>
</div>
<input type="hidden" name="redirect" t-att-value="redirect"/>
<button type="submit" class="btn btn-default">Log in</button>
<p class="alert alert-danger" t-if="authentication_failed">
Wrong login/password
</p>
</form>
<div class="oe_single_form">
<form class="oe_login_form modal-content" role="form" t-attf-action="/web/login{{ '?debug' if debug else '' }}" method="post">
<div class="oe_single_form_logo">
<img src="/web/static/src/img/logo2.png"/>
</div>
<div class="col-md-4"> </div>
</div>
<hr/>
<div class="form-group field-login">
<label for="login" class="control-label">Login</label>
<input type="text" name="login" t-att-value="login" id="login" class="form-control" placeholder="Enter login" required="required" autofocus="autofocus"/>
</div>
<div class="form-group field-password">
<label for="password" class="control-label">Password</label>
<input type="password" name="password" id="password" class="form-control" placeholder="Password" required="required"/>
</div>
<div class="oe_login_messages">
<p class="alert alert-danger" t-if="authentication_failed">
Wrong login/password
</p>
</div>
<hr/>
<input type="hidden" name="redirect" t-att-value="redirect"/>
<button type="submit" class="btn btn-primary pull-right">Log in</button>
</form>
</div>
</t>
</template>