summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/wicket/pages/UserPage.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-06-05 10:24:39 -0400
committerJames Moger <james.moger@gitblit.com>2014-06-05 10:24:39 -0400
commitafbaebde11093fae8b420aaaf71dcd56d8c0f9fd (patch)
treefe1d739b9e723ca0f95f12af2511e613412c8a2f /src/main/java/com/gitblit/wicket/pages/UserPage.java
parent74221eb302e782ef23777d5c3f0a649ceb321c1e (diff)
downloadgitblit-afbaebde11093fae8b420aaaf71dcd56d8c0f9fd.tar.gz
gitblit-afbaebde11093fae8b420aaaf71dcd56d8c0f9fd.zip
Add "email me on my ticket changes" preference
Diffstat (limited to 'src/main/java/com/gitblit/wicket/pages/UserPage.java')
-rw-r--r--src/main/java/com/gitblit/wicket/pages/UserPage.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/wicket/pages/UserPage.java b/src/main/java/com/gitblit/wicket/pages/UserPage.java
index 94048963..505f55d9 100644
--- a/src/main/java/com/gitblit/wicket/pages/UserPage.java
+++ b/src/main/java/com/gitblit/wicket/pages/UserPage.java
@@ -48,6 +48,7 @@ import com.gitblit.wicket.GitBlitWebApp;
import com.gitblit.wicket.GitBlitWebSession;
import com.gitblit.wicket.GitblitRedirectException;
import com.gitblit.wicket.WicketUtils;
+import com.gitblit.wicket.panels.BooleanOption;
import com.gitblit.wicket.panels.ChoiceOption;
import com.gitblit.wicket.panels.ProjectRepositoryPanel;
import com.gitblit.wicket.panels.SshKeysPanel;
@@ -219,6 +220,7 @@ public class UserPage extends RootPage {
final IModel<String> displayName = Model.of(user.getDisplayName());
final IModel<String> emailAddress = Model.of(user.emailAddress == null ? "" : user.emailAddress);
final IModel<Language> language = Model.of(preferredLanguage);
+ final IModel<Boolean> emailMeOnMyTicketChanges = Model.of(user.getPreferences().isEmailMeOnMyTicketChanges());
prefs.add(new TextOption("displayName",
getString("gb.displayName"),
@@ -236,6 +238,11 @@ public class UserPage extends RootPage {
language,
languages));
+ prefs.add(new BooleanOption("emailMeOnMyTicketChanges",
+ getString("gb.emailMeOnMyTicketChanges"),
+ getString("gb.emailMeOnMyTicketChangesDescription"),
+ emailMeOnMyTicketChanges).setVisible(app().notifier().isSendingMail()));
+
prefs.add(new AjaxButton("save") {
private static final long serialVersionUID = 1L;
@@ -253,6 +260,8 @@ public class UserPage extends RootPage {
user.getPreferences().setLocale(lang.code);
}
+ user.getPreferences().setEmailMeOnMyTicketChanges(emailMeOnMyTicketChanges.getObject());
+
try {
app().gitblit().reviseUser(user.username, user);