-
-
+
+
+
+
-
-
+
+ When deactivated, the DNS service is not configured for the domain
+ When deactivated, the Web services is not configured for the domain
@@ -182,7 +179,33 @@ function show_aliases() {
}
})
$('#alias_type_buttons button[data-mode="regular"]').click(); // init
- })
+
+ // Service buttons
+ $('#alias_service_buttons button').off('click').click(function() {
+ if ($(this).hasClass('active')) {
+ $(this).removeClass('active');
+ $(this).addClass('btn-default');
+ $(this).removeClass('btn-success');
+ $('#alias_service_info .www').addClass('hidden');
+ $('#alias_service_info .dns').addClass('hidden');
+ if ($(this).attr('data-mode') == "dns") {
+ $('#alias_service_info').slideDown();
+ $('#addalias-form .dns').removeClass('hidden');
+ } else if ($(this).attr('data-mode') == "www") {
+ $('#alias_service_info').slideDown();
+ $('#addalias-form .www').removeClass('hidden');
+ }
+ } else {
+ $(this).addClass('active');
+ $(this).removeClass('btn-default');
+ $(this).addClass('btn-success');
+ $('#alias_service_info').slideUp();
+ $('#addalias-form .www').addClass('hidden');
+ $('#addalias-form .dns').addClass('hidden');
+ }
+ return false;
+ });
+ });
}
var is_alias_add_update = false;
@@ -191,8 +214,8 @@ function do_add_alias() {
var form_address = $("#addaliasAddress").val();
var form_forwardsto = $("#addaliasForwardsTo").val();
var form_senders = ($('#addaliasForwardsToAdvanced').prop('checked') ? $("#addaliasSenders").val() : '');
- var form_dns = $('#addaliasDnsHandling').prop('checked');
- var form_web = $('#addaliasWebHandling').prop('checked');
+ var form_dns = $('#addaliasDnsHandling').hasClass('active');
+ var form_web = $('#addaliasWebHandling').hasClass('active');
if ($('#addaliasForwardsToAdvanced').prop('checked') && !/\S/.exec($("#addaliasSenders").val())) {
show_modal_error(title, "You did not enter any permitted senders.");
return false;
@@ -225,13 +248,17 @@ function aliases_reset_form() {
$("#addaliasAddress").val('')
$("#addaliasForwardsTo").val('')
$("#addaliasSenders").val('')
- $('#addaliasDnsHandling').prop('disabled', false);
- $('#addaliasWebHandling').prop('disabled', false);
$('#alias-cancel').addClass('hidden');
$('#add-alias-button').text('Add Alias');
is_alias_add_update = false;
+
+ $('#addaliasDnsHandling').prop('disabled', false).addClass('btn-success');
+ $('#addaliasWebHandling').prop('disabled', false).addClass('btn-success');
+
}
+
+
function aliases_edit(elem) {
var address = $(elem).parents('tr').attr('data-address');
var receiverdivs = $(elem).parents('tr').find('.forwardsTo div');
diff --git a/management/templates/users.html b/management/templates/users.html
index 6e07673a..8c57c20f 100644
--- a/management/templates/users.html
+++ b/management/templates/users.html
@@ -29,24 +29,20 @@