diff options
author | Vitaly Takmazov | 2018-03-14 10:04:40 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-03-14 10:04:40 +0300 |
commit | b2f3afebc7de684d1d49042f5f79a9cbf9c1f2f2 (patch) | |
tree | b7d5c7ca5b728751fa16d0085486b305da87d61d /juick-www | |
parent | b1e8980ed1460340fe4e8db2ce0d7ee1d213854a (diff) |
refactor email settings
Diffstat (limited to 'juick-www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/Settings.java | 4 | ||||
-rw-r--r-- | juick-www/src/main/resources/templates/views/settings_main.html | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Settings.java b/juick-www/src/main/java/com/juick/www/controllers/Settings.java index a1d58ada..141c9e2c 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/Settings.java +++ b/juick-www/src/main/java/com/juick/www/controllers/Settings.java @@ -94,7 +94,7 @@ public class Settings { model.addAttribute("visitor", visitor); model.addAttribute("tags", tagService.getPopularTags()); model.addAttribute("auths", userService.getAuthCodes(visitor)); - model.addAttribute("eopts", userService.getEmailOpts(visitor)); + model.addAttribute("email_active", emailService.getNotificationsEmail(visitor.getUid())); model.addAttribute("ehash", userService.getEmailHash(visitor)); model.addAttribute("emails", userService.getEmails(visitor)); model.addAttribute("jids", userService.getAllJIDs(visitor)); @@ -121,7 +121,7 @@ public class Settings { protected String doPost(HttpServletRequest request, HttpServletResponse response, @RequestParam(required = false) MultipartFile avatar, ModelMap model) - throws IOException, ServletException { + throws IOException { com.juick.User visitor = UserUtils.getCurrentUser(); if (visitor.getUid() == 0) { throw new HttpBadRequestException(); diff --git a/juick-www/src/main/resources/templates/views/settings_main.html b/juick-www/src/main/resources/templates/views/settings_main.html index ef46542d..65fbc984 100644 --- a/juick-www/src/main/resources/templates/views/settings_main.html +++ b/juick-www/src/main/resources/templates/views/settings_main.html @@ -88,7 +88,7 @@ Sent to <select name="account"> <option value="">Disabled</option> {% for email in emails %} - <option value="{{ email }}" {% if eopts.email == email %} selected="selected" {% endif %}> + <option value="{{ email }}" {% if email_active == email %} selected="selected" {% endif %}> {{ email }} </option> {% endfor %} |