mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
@@ -5,11 +5,11 @@ from django.utils.translation import ugettext_lazy as _
|
||||
class LoginForm(forms.Form):
|
||||
username = forms.CharField(
|
||||
label=_("Username"),
|
||||
widget=forms.TextInput(attrs={"class": "span3"})
|
||||
widget=forms.TextInput(attrs={"class": "input-block-level"})
|
||||
)
|
||||
password = forms.CharField(
|
||||
label=_("Password"),
|
||||
widget=forms.PasswordInput(attrs={"class": "span3"})
|
||||
widget=forms.PasswordInput(attrs={"class": "input-block-level"})
|
||||
)
|
||||
rememberme = forms.BooleanField(
|
||||
initial=False,
|
||||
|
||||
@@ -165,6 +165,8 @@ INSTALLED_APPS += MODOBOA_APPS
|
||||
|
||||
AUTH_USER_MODEL = 'admin.User'
|
||||
|
||||
#CUSTOM_LOGO = os.path.join(MEDIA_URL, "custom_logo.png")
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
'modoboa.lib.authbackends.SimpleBackend',
|
||||
)
|
||||
|
||||
@@ -232,3 +232,15 @@ def render_tags(tags):
|
||||
{% endfor %}
|
||||
""")
|
||||
return t.render(Context({"tags" : tags}))
|
||||
|
||||
|
||||
@register.simple_tag
|
||||
def get_modoboa_logo():
|
||||
try:
|
||||
logo = settings.MODOBOA_CUSTOM_LOGO
|
||||
except AttributeError:
|
||||
logo = None
|
||||
if logo is None:
|
||||
return os.path.join(settings.STATIC_URL, "css/modoboa.png")
|
||||
return logo
|
||||
|
||||
|
||||
@@ -11,12 +11,17 @@ body {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
#bottom-bar-middle {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.navbar-text {
|
||||
color: #999999 !important;
|
||||
}
|
||||
|
||||
.simplepagination ul {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.simplepagination li {
|
||||
@@ -101,4 +106,4 @@ body {
|
||||
|
||||
.table-fixed {
|
||||
table-layout: fixed;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,507 +0,0 @@
|
||||
html, body {
|
||||
font-family: arial, helvetica, verdana, tahoma, sans-serif;
|
||||
font-size: small;
|
||||
background: #153F65;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
div#container {
|
||||
height: auto !important;
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
position: relative;
|
||||
background: white;
|
||||
}
|
||||
|
||||
@media screen {
|
||||
body > div#footer {
|
||||
position: fixed;
|
||||
}
|
||||
}
|
||||
|
||||
div#topmenubar {
|
||||
position: fixed;
|
||||
border-bottom: 5px solid #333;
|
||||
height: 30px;
|
||||
bottom: auto;
|
||||
}
|
||||
|
||||
#usermenubox {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
div#footer {
|
||||
position: absolute;
|
||||
height: 30px;
|
||||
bottom: 0px;
|
||||
border-top: 5px solid #333;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
#adminfo {
|
||||
float: left;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#navbar {
|
||||
float: right;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#navbar label {
|
||||
color: white;
|
||||
margin-right: 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#navbar img {
|
||||
margin-top: 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#menubar {
|
||||
margin: 5px;
|
||||
/*display: table;*/
|
||||
width: 735px;
|
||||
margin-top: 35px;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
#topmenubar a, #topmenubar a:visited {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#topmenubar label {
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/*#menubar a, #menubar a:visited {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#menubar label {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
}*/
|
||||
|
||||
#page {
|
||||
width: 100%;
|
||||
top: 35px;
|
||||
bottom: 35px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
#content {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
/*padding: 5px;*/
|
||||
top: 130px;
|
||||
bottom: 35px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#subcontent {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#header {
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
}
|
||||
|
||||
#header h1 {
|
||||
font-size: medium;
|
||||
width: 50%;
|
||||
margin: 0 0 0 5px;
|
||||
}
|
||||
|
||||
#loginbox {
|
||||
margin: 100px auto;
|
||||
width: 610px;
|
||||
padding-bottom: 15px;
|
||||
border: 2px solid #333;
|
||||
background: white;
|
||||
}
|
||||
|
||||
#loginbox h2 {
|
||||
margin: 30px 10px 0 10px;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
#loginbox h3 {
|
||||
font-size: small;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#logo {
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 300px;
|
||||
margin-top: 10px;
|
||||
border-right: 1px solid #ccc;
|
||||
}
|
||||
|
||||
#logo img {
|
||||
height: 70px;
|
||||
}
|
||||
|
||||
#test {
|
||||
float: right;
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
|
||||
.uibar {
|
||||
background: #153F65;
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*.menubar a, .menubar a:visited {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.menubar a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.menubar ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
color: #2a4069;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.menubar li {
|
||||
float: left;
|
||||
display: inline;
|
||||
margin: 4px 4px;
|
||||
}
|
||||
|
||||
.menubar li.selected {
|
||||
background: #ffff77;
|
||||
}
|
||||
|
||||
.menubar img {
|
||||
float: left;
|
||||
margin: 0px 3px;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.menubar .title {
|
||||
color: white;
|
||||
}*/
|
||||
|
||||
.menubardropdown ul {
|
||||
background: white;
|
||||
width: 120px;
|
||||
border-bottom: 5px solid #ccc;
|
||||
border-right: 5px solid #ccc;
|
||||
border-left: 5px solid #ccc;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
|
||||
}
|
||||
|
||||
.menubardropdown label {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
div.left {
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.right {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.logo {
|
||||
float: right;
|
||||
/*margin: 5px 0 0 5px;*/
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
/*position: absolute;*/
|
||||
/*width: 250px;*/
|
||||
}
|
||||
|
||||
.dropdown li {
|
||||
padding: 5px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dropdown ul {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.topdropdown ul {
|
||||
background: #153F65;
|
||||
border-bottom: 5px solid #333;
|
||||
border-right: 5px solid #333;
|
||||
border-left: 5px solid #333;
|
||||
/*width: 150px;*/
|
||||
float: left;
|
||||
position: relative;
|
||||
z-index: 4;
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
.dropdown ul li {
|
||||
display: block;
|
||||
float: none;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Mootools tooltips */
|
||||
.tip {
|
||||
color: #fff;
|
||||
width: 139px;
|
||||
z-index: 13000;
|
||||
border: 1px solid #cccccc;
|
||||
}
|
||||
|
||||
.tip-title {
|
||||
font-weight: bold;
|
||||
font-size: 11px;
|
||||
margin: 0;
|
||||
color: #9FD4FF;
|
||||
padding: 8px 8px 4px;
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
font-size: 11px;
|
||||
padding: 4px 8px 8px;
|
||||
background: #eee;
|
||||
color: black;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
table {
|
||||
/*margin: 0 auto;*/
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
tr.odd {
|
||||
background: white;
|
||||
}
|
||||
|
||||
tr.even {
|
||||
background: #F4F6F8;
|
||||
}
|
||||
|
||||
th, td {
|
||||
line-height: 15px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
th {
|
||||
background: #CEDBEC;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
th.center, td.center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
th[class*=sortable] {
|
||||
cursor: pointer;
|
||||
/*-moz-box-shadow: 0px -15px 10px -10px rgba(0,0,0,0.6) inset;
|
||||
-webkit-box-shadow: 0px -15px 10px -10px rgba(0,0,0,0.6) inset;*/
|
||||
}
|
||||
|
||||
th.selected {
|
||||
background: #EEEEEE;
|
||||
}
|
||||
|
||||
td {
|
||||
border-bottom: 1px solid #C8D6E8;
|
||||
}
|
||||
|
||||
tr.table-tr-selected {
|
||||
background: #ffffcc;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 1px solid #cccccc;
|
||||
color: inherit;
|
||||
background-color: #eee;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
input:hover {
|
||||
color: inherit;
|
||||
background-color: #ffffcc;
|
||||
}
|
||||
|
||||
textarea {
|
||||
border: 1px solid #cccccc;
|
||||
background-color: #eee;
|
||||
width: 300px;
|
||||
height: 100px;
|
||||
font-size: 1.1em;
|
||||
font-family: arial, helvetica, verdana, tahoma, sans-serif;
|
||||
}
|
||||
|
||||
table.hr {
|
||||
width: 80%;
|
||||
margin: 10px auto;
|
||||
}
|
||||
|
||||
.hr td.odd {
|
||||
background: #F7F9Fb;
|
||||
}
|
||||
|
||||
.hr td.even {
|
||||
|
||||
}
|
||||
|
||||
.unseen {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.toggler {
|
||||
margin: 5px auto;
|
||||
padding: 2px 5px;
|
||||
background: #CEDBEC;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
/*border: 1px solid #CCC;*/
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.element {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
div.row {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
div.row label {
|
||||
float: left;
|
||||
width: 300px;
|
||||
padding: 3px 0;
|
||||
}
|
||||
|
||||
.missing input,
|
||||
.missing textarea {
|
||||
background-color: #F9D2D2;
|
||||
}
|
||||
|
||||
.error {
|
||||
margin: 0 auto;
|
||||
padding: 5px;
|
||||
background: red;
|
||||
width: 500px;
|
||||
text-align: center;
|
||||
background-color: #F9D2D2;
|
||||
border: 3px solid #FF2A2A;
|
||||
color: #FF2A00;
|
||||
}
|
||||
|
||||
.info {
|
||||
background-color: #DAF8DA;
|
||||
color: #166D14;
|
||||
padding: 10px;
|
||||
width: 500px;
|
||||
text-align: center;
|
||||
margin: 50px auto;
|
||||
}
|
||||
|
||||
.errorlist ul {
|
||||
float: left;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.errorlist li {
|
||||
margin-left: 10px;
|
||||
float: left;
|
||||
display: inline;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.separator {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
/* Custom confirmation box */
|
||||
#dlg-buttons {
|
||||
clear: both;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
#dlg-iconbox {
|
||||
float: left;
|
||||
margin-top: 20px;
|
||||
width: 32px;
|
||||
}
|
||||
|
||||
#dlg-textbox {
|
||||
float: left;
|
||||
margin-left: 20px;
|
||||
margin-top: 10px;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
#dlg-textbox input {
|
||||
float: left;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#dlg-textbox label {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
#dlg-buttons {
|
||||
position: absolute;
|
||||
bottom: 15px;
|
||||
}
|
||||
|
||||
#dlg-buttons input {
|
||||
width: 90px;
|
||||
margin: 2px;
|
||||
}
|
||||
|
||||
/* Permission tables */
|
||||
#accordion {
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.element {
|
||||
margin: 10px 5px 10px 5px;
|
||||
}
|
||||
|
||||
/* Parameters or Preferences */
|
||||
#footer > #update {
|
||||
color: #000000;
|
||||
margin: 2px;
|
||||
}
|
||||
@@ -1,14 +1,28 @@
|
||||
#logo {
|
||||
margin-top: 60px;
|
||||
text-align: center;
|
||||
margin: 60px auto 20px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
#logo img {
|
||||
height: 100px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
background-color: transparent;
|
||||
padding-right: 0px;
|
||||
padding-left: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
margin: 0 auto;
|
||||
max-width: 300px;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
.login-error {
|
||||
margin: 20px auto;
|
||||
max-width: 300px;
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 6.6 KiB |
@@ -1,4 +1,4 @@
|
||||
<div id="pagination_bar" class="simplepagination pull-right padded5">
|
||||
<div id="pagination_bar" class="simplepagination pull-right">
|
||||
<ul>
|
||||
<li>
|
||||
{% if page.has_previous %}<a href="{{ baseurl }}page=1">
|
||||
@@ -10,7 +10,7 @@
|
||||
<i class="icon-step-backward icon-white"></i></a>{% else %}
|
||||
<i class="icon-step-backward icon-white"></i>{% endif %}
|
||||
</li>
|
||||
<li class="disabled">
|
||||
<li class="disabled navbar-text">
|
||||
{{ page.number }}/{{ page.paginator.num_pages }}
|
||||
</li>
|
||||
<li>
|
||||
|
||||
@@ -49,13 +49,14 @@
|
||||
<div class="navbar-inner">
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
<div id="bottom-bar-left" class="pull-left">
|
||||
<div id="bottom-bar-left" class="span4">
|
||||
{% block footerleft %}{% endblock %}
|
||||
</div>
|
||||
<div id="bottom-bar-middle" class="">
|
||||
<div id="bottom-bar-middle" class="span4">
|
||||
<p class="navbar-text"><i>{% trans "Powered by Modoboa" %}</i></p>
|
||||
{% block footermiddle %}{% endblock %}
|
||||
</div>
|
||||
<div id="bottom-bar-right" class="pull-right nav-collapse">
|
||||
<div id="bottom-bar-right" class="span4 nav-collapse">
|
||||
{% block footerright %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -19,33 +19,28 @@
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="offset4">
|
||||
<div class="row">
|
||||
<div id="logo" class="span3">
|
||||
<img src="{{ STATIC_URL }}css/modoboa.png" />
|
||||
</div>
|
||||
<div id="logo" class="row">
|
||||
<img src="{% get_modoboa_logo %}" />
|
||||
</div>
|
||||
<form method="post" action="{% url 'modoboa.auth.views.dologin' %}"
|
||||
class="login-form well">
|
||||
{% csrf_token %}
|
||||
{% render_field form.username %}
|
||||
{% render_field form.password %}
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
<div class="form-actions">
|
||||
<label class="pull-left checkbox" for="id_rememberme">
|
||||
<input type="checkbox" id="id_rememberme" name="rememberme" />{% trans "Remember me" %}
|
||||
</label>
|
||||
<button class="btn btn-primary pull-right" type="submit">{% trans "Log in" %}</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<form method="post" action="{% url 'modoboa.auth.views.dologin' %}"
|
||||
class="well span3">{% csrf_token %}
|
||||
{% render_field form.username %}
|
||||
{% render_field form.password %}
|
||||
<input type="hidden" name="next" value="{{ next }}" />
|
||||
<div class="form-actions">
|
||||
<label class="pull-left checkbox" for="id_rememberme">
|
||||
<input type="checkbox" id="id_rememberme" name="rememberme" />{% trans "Remember me" %}
|
||||
</label>
|
||||
<button class="btn btn-primary pull-right" type="submit">{% trans "Log in" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
</form>
|
||||
|
||||
<div class="login-error">
|
||||
{% if error %}{% alert error "error" %}{% endif %}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
{% if error %}{% alert error "error" %}{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>{% for annoucement in annoucements %}
|
||||
<div class="offset3 span5 well">{{ annoucement|safe }}</div>
|
||||
{% endfor %}</div>
|
||||
</div>{% for annoucement in annoucements %}
|
||||
<div class="offset3 span5 well">{{ annoucement|safe }}</div>
|
||||
{% endfor %}</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user