diff --git a/management/templates/aliases.html b/management/templates/aliases.html index 571909fe..90642de0 100644 --- a/management/templates/aliases.html +++ b/management/templates/aliases.html @@ -11,20 +11,29 @@
- -
- +
+
+ + +
+
- +
- +
-
- + +
+ +
+
+
+
+
@@ -35,7 +44,7 @@ - Email Address
+ Alias
Forwards To @@ -84,6 +93,22 @@ function show_aliases() { $('#alias_table tbody').append(n); } }) + + $(function() { + $('#alias_type_buttons button').off('click').click(function() { + $('#alias_type_buttons button').removeClass('active'); + $(this).addClass('active'); + if ($(this).text() == "Regular") { + $('#addaliasEmail').attr('type', 'email'); + $('#addaliasEmail').attr('placeholder', 'incoming email address (you@yourdomain.com)'); + $('#alias_catchall_info').slideUp(); + } else { + $('#addaliasEmail').attr('type', 'text'); + $('#addaliasEmail').attr('placeholder', 'incoming catch-all address (@yourdomain.com)'); + $('#alias_catchall_info').slideDown(); + } + }) + }) } var is_alias_add_update = false; @@ -116,7 +141,7 @@ function aliases_reset_form() { $("#addaliasEmail").val('') $("#addaliasTargets").val('') $('#alias-cancel').addClass('hidden'); - $('#add-alias-button').text('Add'); + $('#add-alias-button').text('Add Alias'); is_alias_add_update = false; }