mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-19 05:58:34 +02:00
Update 2.3 Bootstrap class to 3.2 Bootstrap class
This commit is contained in:
@@ -8,11 +8,11 @@ from modoboa.lib import parameters
|
||||
class LoginForm(forms.Form):
|
||||
username = forms.CharField(
|
||||
label=ugettext_lazy("Username"),
|
||||
widget=forms.TextInput(attrs={"class": "input-block-level form-control"})
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
password = forms.CharField(
|
||||
label=ugettext_lazy("Password"),
|
||||
widget=forms.PasswordInput(attrs={"class": "input-block-level form-control"})
|
||||
widget=forms.PasswordInput(attrs={"class": "form-control"})
|
||||
)
|
||||
rememberme = forms.BooleanField(
|
||||
initial=False,
|
||||
|
||||
@@ -69,8 +69,8 @@ Admin.prototype = {
|
||||
},
|
||||
|
||||
make_tag: function(text, type) {
|
||||
var $tag = $("<a />", {"name": type, "class" : "btn btn-mini", "html": text});
|
||||
var $i = $("<i />", {"class" : "icon-remove"}).prependTo($tag);
|
||||
var $tag = $("<a />", {"name": type, "class" : "btn btn-xs", "html": text});
|
||||
var $i = $("<i />", {"class" : "glyphicon glyphicon-remove"}).prependTo($tag);
|
||||
|
||||
$tag.click($.proxy(this.remove_tag, this));
|
||||
return $tag;
|
||||
@@ -116,7 +116,7 @@ Admin.prototype = {
|
||||
return;
|
||||
}
|
||||
$("#import_status").css("display", "block");
|
||||
$("#import_result").html("").removeClass("alert alert-error");
|
||||
$("#import_result").html("").removeClass("alert alert-danger");
|
||||
$("#importform").submit();
|
||||
});
|
||||
},
|
||||
@@ -127,7 +127,7 @@ Admin.prototype = {
|
||||
$("#modalbox").modal('hide');
|
||||
this.reload_listing(msg);
|
||||
} else {
|
||||
$("#import_result").addClass("alert alert-error");
|
||||
$("#import_result").addClass("alert alert-danger");
|
||||
$("#import_result").html(msg);
|
||||
this.importform_cb();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends "common/mailheaders.html" %}
|
||||
{% block emailheaders %}
|
||||
{% if qtype %}<div class="alert alert-error"><strong>{{ qtype }}</strong> {{ qreason }}</div>{% endif %}
|
||||
{% if qtype %}<div class="alert alert-danger"><strong>{{ qtype }}</strong> {{ qreason }}</div>{% endif %}
|
||||
{{ block.super }}
|
||||
{% endblock %}
|
||||
|
||||
@@ -33,7 +33,7 @@ class CustomRadioInput(RadioInput):
|
||||
label_for = ''
|
||||
choice_label = conditional_escape(force_unicode(self.choice_label))
|
||||
return mark_safe(
|
||||
u'<label%s class="radio inline">%s %s</label>'
|
||||
u'<label%s class="radio-inline">%s %s</label>'
|
||||
% (label_for, self.tag(), choice_label)
|
||||
)
|
||||
|
||||
@@ -65,7 +65,7 @@ class FilterForm(forms.Form):
|
||||
("anyof", _("Any of the following")),
|
||||
("all", _("All messages"))],
|
||||
initial="anyof",
|
||||
widget=CustomRadioSelect(attrs={"class": "inline", "type": "checkbox"})
|
||||
widget=CustomRadioSelect(attrs={"class": "checkbox-inline", "type": "checkbox"})
|
||||
)
|
||||
|
||||
self.header_operators = [
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
return $('<a />', {
|
||||
href: '#',
|
||||
id: 'condition_' + this.nextid + '_rmbtn',
|
||||
html: '<i class="icon-trash"></i>'
|
||||
html: '<i class="glyphicon glyphicon-trash"></i>'
|
||||
}).click($.proxy(this.removefields, this));
|
||||
},
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
return $('<a />', {
|
||||
href: '#',
|
||||
id: 'action_' + this.nextid + '_rmbtn',
|
||||
html: '<i class="icon-trash"></i>'
|
||||
html: '<i class="glyphicon glyphicon-trash"></i>'
|
||||
}).click($.proxy(this.removefields, this));
|
||||
},
|
||||
|
||||
|
||||
@@ -1049,10 +1049,10 @@ Webmail.prototype = {
|
||||
var $delbtn = $("<a />", {
|
||||
name: "delattachment",
|
||||
href: this.options.delattachment_url + "?name=" + tmpname,
|
||||
html: "<i class='icon-remove'></i>"
|
||||
html: "<i class='glyphicon glyphicon-remove'></i>"
|
||||
});
|
||||
var $label = $("<label />", {html: fname});
|
||||
var $div = $("<div />", {'class': "row-fluid"}).append($delbtn, $label);
|
||||
var $div = $("<div />", {'class': "row"}).append($delbtn, $label);
|
||||
|
||||
$delbtn.click(this.del_attachment);
|
||||
$("#id_attachment").val("");
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
style="width:0;height:0;border:0px solid #fff;"></iframe>
|
||||
<div class="well" id="attachment_list">
|
||||
{% for att in attachments %}
|
||||
<div class="row-fluid">
|
||||
<div class="row">
|
||||
<a href="{% url 'modoboa.extensions.webmail.views.delattachment' %}?name={{ att.tmpname }}"
|
||||
name="delattachment">
|
||||
<i class="glyphicon glyphicon-remove"></i>
|
||||
|
||||
@@ -8,7 +8,7 @@ body{margin:5px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-siz
|
||||
.alert-heading{color:inherit;}
|
||||
.alert .close{position:relative;top:-2px;right:-21px;line-height:18px;}
|
||||
.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
|
||||
.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
|
||||
.alert-danger{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
|
||||
.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
|
||||
.alert-block{padding-top:14px;padding-bottom:14px;}
|
||||
.alert-block>p,.alert-block>ul{margin-bottom:0;}
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
var $container = $("<div />", {"class" : "container-fluid"});
|
||||
box.append($container);
|
||||
if (this.options.warning) {
|
||||
$container.append($("<div />", {"class" : "row-fluid"})
|
||||
$container.append($("<div />", {"class" : "row"})
|
||||
.append($("<div />", {
|
||||
"class": "alert alert-danger",
|
||||
html: "<h4>" + gettext("Warning") + "</h4>" + this.options.warning
|
||||
|
||||
@@ -126,8 +126,8 @@ function display_form_errors(formid, data) {
|
||||
var spanid = fullid + "-error";
|
||||
var $span = $("#" + spanid);
|
||||
|
||||
if (!$widget.parents(".control-group").hasClass("error")) {
|
||||
$widget.parents(".control-group").addClass("error");
|
||||
if (!$widget.parents(".form-group").hasClass("has-error")) {
|
||||
$widget.parents(".form-group").addClass("has-error");
|
||||
}
|
||||
if (!$span.length) {
|
||||
$span = $("<span />", {
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
}
|
||||
this.$element.append($("<i/>", {
|
||||
"class": "sort-selection icon-chevron-" + ((dir == 'asc') ? 'up' : 'down')
|
||||
"class": "sort-selection glyphicon glyphicon-chevron-" + ((dir == 'asc') ? 'up' : 'down')
|
||||
}));
|
||||
return dir;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ TwocolsNav.prototype = {
|
||||
select_change: function(e) {
|
||||
var instance = this;
|
||||
var $target = $(e.target);
|
||||
var $parent = $target.parents("div.control-group");
|
||||
var $parent = $target.parents("div.form-group");
|
||||
|
||||
$('div[data-visibility-field="' + $target.attr("id") + '"]').each(function(idx) {
|
||||
instance.toggle_field_visibility($(this), $parent, $target.val());
|
||||
@@ -91,7 +91,7 @@ TwocolsNav.prototype = {
|
||||
radio_clicked: function(e) {
|
||||
var instance = this;
|
||||
var $target = $(e.target);
|
||||
var $parent = $target.parents("div.control-group");
|
||||
var $parent = $target.parents("div.form-group");
|
||||
var realid = $target.attr("id");
|
||||
|
||||
realid = realid.substr(0, realid.length - 2);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% extends "layout_simple.html" %}{% load i18n %}
|
||||
{% block content %}
|
||||
<div class="alert alert-error">
|
||||
<div class="alert alert-danger">
|
||||
<h4>{% trans "Sorry" %}</h4>
|
||||
<p>{% trans "An internal error occured." %}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{% extends "layout_simple.html" %}
|
||||
{% load i18n %}
|
||||
{% block content %}
|
||||
<div class="alert alert-error"><strong>{% trans "Error:" %}</strong> {{ error }}</div>
|
||||
<div class="alert alert-danger"><strong>{% trans "Error:" %}</strong> {{ error }}</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div class="col-lg-5 col-md-5 col-sm-5">
|
||||
{% if appended_text %}<div class="input-group">{% endif %}
|
||||
{{ field }}{% if appended_text %}<span class="input-group-addon">{{ appended_text }}</span></div>{% endif %}{% if help_display_mode == "inline" and field.help_text %}<span class="help-block pull-right">{{ field.help_text }}</span>{% endif %}{% if inline_message %}<span class="help-block pull-right">{{ inline_message }}</span>{% endif %}
|
||||
{% if activator %}<div class="checkbox"><label class="checkbox inline" for="id_{{ field.name }}_act">
|
||||
{% if activator %}<div class="checkbox"><label class="checkbox-inline" for="id_{{ field.name }}_act">
|
||||
<input type="checkbox" class="activator" id="id_{{ field.name }}_act" name="{{ field.name }}_act" {% if activator_value %}checked='checked'{% else %}{% if deactivate_if_empty and field.value == None %}checked='checked'{% endif %}{% endif %}/>{{ activator_label }}
|
||||
</label></div>{% endif %}
|
||||
{% if field.errors %}<p class="help-block">{% for error in field.errors %}{{ error|safe }}{% endfor %}</p>{% endif %}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{% extends "common/generic_modal.html" %}
|
||||
{% load lib_tags %}
|
||||
{% block modalbody %}
|
||||
{% if error %}<div class="alert alert-error">{{ error }}</div>{% endif %}
|
||||
{% if error %}<div class="alert alert-danger">{{ error }}</div>{% endif %}
|
||||
<form class="form-horizontal" action="{{ action }}" enctype="{{ enctype }}"
|
||||
method="POST" id="{{ formid }}" name="{{ formid }}"
|
||||
target="{{ target }}">{% csrf_token %}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{% extends "nlayout.html" %}
|
||||
{% block content %}
|
||||
<div class="container-fluid">
|
||||
<div class="row-fluid">
|
||||
{% block rowcontent %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% for annoucement in annoucements %}
|
||||
<div class="offset3 span5 well">{{ annoucement|safe }}</div>
|
||||
<div class="col-lg-offset-3 col-lg-5 well">{{ annoucement|safe }}</div>
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user