mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
@@ -152,6 +152,7 @@ class GeneralParametersForm(parameters.AdminParametersForm):
|
||||
"An optional filter string (e.g. '(objectClass=person)'). "
|
||||
"In order to be valid, it must be enclosed in parentheses."
|
||||
),
|
||||
required=False,
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
@@ -162,6 +163,7 @@ class GeneralParametersForm(parameters.AdminParametersForm):
|
||||
"The template used to construct a user's DN. It should contain "
|
||||
"one placeholder (ie. %(user)s)"
|
||||
),
|
||||
required=False,
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
|
||||
@@ -167,9 +167,9 @@ class User(PermissionsMixin):
|
||||
|
||||
@property
|
||||
def tags(self):
|
||||
return [{"name": "account", "label": _("account"), "type": "label label-default idt"},
|
||||
return [{"name": "account", "label": _("account"), "type": "idt"},
|
||||
{"name": self.group, "label": self.group,
|
||||
"type": "grp label label-info"}]
|
||||
"type": "grp", "color": "info"}]
|
||||
|
||||
@property
|
||||
def fullname(self):
|
||||
|
||||
@@ -83,7 +83,7 @@ class Alias(AdminObject):
|
||||
"alias": _("alias")
|
||||
}
|
||||
altype = self.type
|
||||
return [{"name": altype, "label": labels[altype], "type": "idt label label-default"}]
|
||||
return [{"name": altype, "label": labels[altype], "type": "idt"}]
|
||||
|
||||
def post_create(self, creator):
|
||||
from modoboa.lib.permissions import grant_access_to_object
|
||||
|
||||
@@ -58,7 +58,7 @@ class Domain(AdminObject):
|
||||
|
||||
@property
|
||||
def tags(self):
|
||||
return [{"name": "domain", "label": _("Domain"), "type": "label label-default dom"}]
|
||||
return [{"name": "domain", "label": _("Domain"), "type": "dom"}]
|
||||
|
||||
@property
|
||||
def admins(self):
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{% load i18n %}
|
||||
<form id="searchform">
|
||||
<div class="input-group">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
|
||||
<input class="form-control" type="text"
|
||||
value={% if squery %}"{{ squery }}"{% else %}"{% trans 'Search' %}"{% endif %}
|
||||
|
||||
@@ -16,7 +16,8 @@ class ParametersForm(AdminParametersForm):
|
||||
help_text=ugettext_lazy(
|
||||
"The URL of your Radicale server. "
|
||||
"It will be used to construct calendar URLs."
|
||||
)
|
||||
),
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
rights_management_sep = SeparatorField(
|
||||
@@ -25,7 +26,8 @@ class ParametersForm(AdminParametersForm):
|
||||
rights_file_path = forms.CharField(
|
||||
label=ugettext_lazy("Radicale rights file path"),
|
||||
initial="/etc/radicale/rights",
|
||||
help_text=ugettext_lazy("Path to file that contains rights definition")
|
||||
help_text=ugettext_lazy("Path to file that contains rights definition"),
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
allow_calendars_administration = YesNoField(
|
||||
|
||||
@@ -18,6 +18,7 @@ class UserCalendarForm(forms.ModelForm):
|
||||
model = UserCalendar
|
||||
fields = ('name', 'mailbox', )
|
||||
widgets = {
|
||||
'name': forms.TextInput(attrs={"class": "form-control"}),
|
||||
'mailbox': forms.widgets.Select(
|
||||
attrs={"class": "selectpicker", "data-live-search": "true"}
|
||||
)
|
||||
@@ -43,6 +44,7 @@ class SharedCalendarForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = SharedCalendar
|
||||
widgets = {
|
||||
"name": forms.TextInput(attrs={"class": "form-control"}),
|
||||
"domain": forms.widgets.Select(
|
||||
attrs={"class": "selectpicker", "data-live-search": "true"}
|
||||
)
|
||||
@@ -62,7 +64,8 @@ class RightsForm(forms.Form, DynamicForm):
|
||||
"""
|
||||
username = forms.CharField(
|
||||
required=False, widget=forms.widgets.TextInput(
|
||||
attrs={"placeholder": ugettext_lazy("Username")}
|
||||
attrs={"placeholder": ugettext_lazy("Username"),
|
||||
"class": "form-control"}
|
||||
)
|
||||
)
|
||||
read_access = forms.BooleanField(
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
{{ username }}
|
||||
<label class="checkbox">{{ read_access }} {% trans "Read" %}</label>
|
||||
<label class="checkbox">{{ write_access }} {% trans "Write" %}</label>
|
||||
<a href="#" class="delrule"><i class="icon-trash"></i></a>
|
||||
<a href="#" class="delrule"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
{{ form.username }}
|
||||
<label class="checkbox">{{ form.read_access }} {{ form.read_access.label }}</label>
|
||||
<label class="checkbox">{{ form.write_access }} {{ form.write_access.label }}</label>
|
||||
<a href="#" class="addrule"><i class="icon-plus"></i></a>
|
||||
<a href="#" class="addrule"><span class="glyphicon glyphicon-plus"></span></a>
|
||||
</div>
|
||||
{% render_rule_fields form %}
|
||||
</form>
|
||||
|
||||
@@ -67,7 +67,7 @@ def calendar_actions(calendar):
|
||||
actions = [{
|
||||
"name": "delcalendar",
|
||||
"title": _("Delete %s?" % calendar),
|
||||
"img": "icon-trash"
|
||||
"img": "glyphicon glyphicon-trash"
|
||||
}]
|
||||
if calendar.__class__.__name__ == 'UserCalendar':
|
||||
actions[0]["url"] = reverse("user_calendar", args=[calendar.id])
|
||||
|
||||
@@ -31,8 +31,10 @@ $(document).ready(function() {
|
||||
{% trans "Filter" %}
|
||||
</li>
|
||||
<li>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon"><i class="glyphicon glyphicon-search"></i></span>
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-search"></span>
|
||||
</span>
|
||||
<input class="form-control" id="searchquery" type="text" value="{% trans 'Search a domain' %}">
|
||||
</div>
|
||||
</li>
|
||||
@@ -50,11 +52,11 @@ $(document).ready(function() {
|
||||
<form class="form-horizontal">
|
||||
<span id="custom-period">
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-addon"><i class="glyphicon glyphicon-indent-left"></i></div>
|
||||
<div class="input-group-addon"><span class="glyphicon glyphicon-indent-left"></span></div>
|
||||
<input id="id_from" class="col-lg-10 form-control" name="date_from" value="{{ start }}" type="text" readonly="readonly" />
|
||||
</div>
|
||||
<div class="input-group input-group-sm">
|
||||
<div class="input-group-addon"><i class="glyphicon glyphicon-indent-right"></i></div>
|
||||
<div class="input-group-addon"><span class="glyphicon glyphicon-indent-right"></span></div>
|
||||
<input id="id_to" class="col-lg-10 form-control" name="date_to" value="{{ end }}" type="text" readonly="readonly" />
|
||||
</div>
|
||||
<button class="btn btn-primary pull-right" id="customsend">{% trans "Apply" %}</button>
|
||||
|
||||
@@ -77,11 +77,20 @@ def make_body_images_inline(body):
|
||||
|
||||
|
||||
class ComposeMailForm(forms.Form):
|
||||
"""Compose mail form.
|
||||
"""
|
||||
to = forms.CharField(label=_("To"), widget=forms.TextInput(attrs={"class": "form-control"}))
|
||||
cc = forms.CharField(label=_("Cc"), required=False, widget=forms.TextInput(attrs={"class": "form-control"}))
|
||||
cci = forms.CharField(label=_("Cci"), required=False, widget=forms.TextInput(attrs={"class": "form-control"}))
|
||||
|
||||
"""Compose mail form."""
|
||||
|
||||
to = forms.CharField(
|
||||
label=_("To"), widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
cc = forms.CharField(
|
||||
label=_("Cc"), required=False,
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
cci = forms.CharField(
|
||||
label=_("Cci"), required=False,
|
||||
widget=forms.TextInput(attrs={"class": "form-control"})
|
||||
)
|
||||
subject = forms.CharField(
|
||||
label=_("Subject"),
|
||||
max_length=255,
|
||||
@@ -93,7 +102,9 @@ class ComposeMailForm(forms.Form):
|
||||
widget=forms.HiddenInput(attrs={"class": "form-control"}),
|
||||
required=False
|
||||
)
|
||||
body = forms.CharField(widget=forms.widgets.Textarea(attrs={"class": "form-control"}))
|
||||
body = forms.CharField(
|
||||
widget=forms.widgets.Textarea(attrs={"class": "form-control"})
|
||||
)
|
||||
|
||||
def _html_msg(self):
|
||||
"""Create a multipart message.
|
||||
|
||||
@@ -46,9 +46,8 @@ $(document).ready(function() {
|
||||
<div id="quotabox">
|
||||
<label class="pull-left navbar-text">{% trans "Mailbox quota" %}</label>
|
||||
<div id="quotabar" class="pull-left progress">
|
||||
<div class="{% progress_color quota %}" style="width: {{ quota }}%"></div>
|
||||
<div class="{% progress_color quota %}" role="progressbar" style="width: {{ quota }}%" aria-valuenow="{{ quota }}" aria-valuemin="0" aria-valuemax="100">{{ quota }}%</div>
|
||||
</div>
|
||||
<label id="quotaraw" class="pull-left navbar-text">{{ quota }}%</label>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
@@ -151,7 +151,9 @@ def fromunix(value):
|
||||
@register.simple_tag
|
||||
def render_tags(tags):
|
||||
t = Template("""{% for tag in tags %}
|
||||
<span class="label label-{% if tag.color %}{{ tag.color }}{% else %}default{% endif %}">
|
||||
<a href="#" class="filter {{ tag.type }}" name="{{ tag.name }}">{{ tag.label }}</a>
|
||||
</span>
|
||||
{% endfor %}
|
||||
""")
|
||||
return t.render(Context({"tags": tags}))
|
||||
|
||||
@@ -261,12 +261,8 @@ label{
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.label .idt{
|
||||
color: gray;
|
||||
}
|
||||
|
||||
.label{
|
||||
margin-left:1px;
|
||||
margin-left: 1px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ if (!Object.keys) {
|
||||
* Clean all errors in a given form.
|
||||
*/
|
||||
function clean_form_errors(formid) {
|
||||
$("#" + formid + " div.error").removeClass("error");
|
||||
$("#" + formid + " div.has-error").removeClass("has-error");
|
||||
$("#" + formid + " span.help-block").remove();
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ function display_form_errors(formid, data) {
|
||||
"html": value[0],
|
||||
"id": spanid
|
||||
});
|
||||
$widget.parents(".controls").append($span);
|
||||
$widget.parents(".form-group").append($span);
|
||||
} else {
|
||||
$span.html(value[0]);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
constructor: Notify,
|
||||
|
||||
build_box: function(bid) {
|
||||
if (bid == undefined) {
|
||||
if (bid === undefined) {
|
||||
bid = "notifybox";
|
||||
}
|
||||
var div = $("<div class='alert' />", {
|
||||
@@ -36,7 +36,7 @@
|
||||
},
|
||||
|
||||
set_message: function(box, value) {
|
||||
var content = '<a class="close" data-dismiss="alert">×</a>' + value;
|
||||
var content = '<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>' + value;
|
||||
|
||||
box.html(content);
|
||||
},
|
||||
@@ -50,7 +50,7 @@
|
||||
this.set_message(nbox, message);
|
||||
this.$element.append(nbox);
|
||||
this.set_position(nbox);
|
||||
if (timer != undefined) {
|
||||
if (timer !== undefined) {
|
||||
window.setTimeout(function() {
|
||||
nbox.alert('close');
|
||||
}, timer);
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
|
||||
error: function(message, timer) {
|
||||
return this.show.apply(this, ["error", message, timer]);
|
||||
return this.show.apply(this, ["danger", message, timer]);
|
||||
},
|
||||
|
||||
warning: function(message, timer) {
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
>
|
||||
|
||||
{% if field.label %}
|
||||
<label class="control-label col-lg-4 col-md-4 col-sm-4" for="id_{{ field.html_name }}">{{ field.label }}
|
||||
{% if help_display_mode == "tooltip" and field.help_text %}
|
||||
<a href="#" class="help" data-original-title="{% trans 'Help:' %} {{ field.label }}" data-content="{{ field.help_text }}" rel="popover">?</a>
|
||||
{% endif %}
|
||||
</label>
|
||||
<label class="control-label col-lg-4 col-md-4 col-sm-4" for="id_{{ field.html_name }}">{{ field.label }}
|
||||
{% if help_display_mode == "tooltip" and field.help_text %}
|
||||
<a href="#" class="help" data-original-title="{% trans 'Help:' %} {{ field.label }}" data-content="{{ field.help_text }}" rel="popover">?</a>
|
||||
{% endif %}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-lg-5 col-md-5 col-sm-5">
|
||||
|
||||
Reference in New Issue
Block a user