From 8bd37ea53ccbd1e94fb58d25a740c8f5b27ee600 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Sat, 27 Sep 2014 12:08:25 +0000 Subject: [PATCH] add catch-alls to the admin again with nicer instructions --- management/templates/aliases.html | 43 ++++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 9 deletions(-) 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; }