From 200c22998940e9eb29d52b2ea5ae48e77a53a24b Mon Sep 17 00:00:00 2001 From: Khurshid Fayzullaev Date: Mon, 24 Mar 2014 10:35:16 -0400 Subject: Alert a message if admin adds an existing username --- src/org/traccar/web/client/controller/SettingsController.java | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/org/traccar/web/client') diff --git a/src/org/traccar/web/client/controller/SettingsController.java b/src/org/traccar/web/client/controller/SettingsController.java index f8fcc72d..e05afb55 100644 --- a/src/org/traccar/web/client/controller/SettingsController.java +++ b/src/org/traccar/web/client/controller/SettingsController.java @@ -97,6 +97,10 @@ public class SettingsController implements DeviceView.SettingsHandler { public void onSuccess(User result) { userStore.add(result); } + @Override + public void onFailure(Throwable caught) { + new AlertMessageBox("Error", "Username is already taken").show(); + } }); } }).show(); -- cgit v1.2.3 From 7b4306677f47e6e1c12bf3311d6b3394b2b9ff11 Mon Sep 17 00:00:00 2001 From: Khurshid Fayzullaev Date: Mon, 24 Mar 2014 18:37:47 -0400 Subject: Update SettingsController.java --- src/org/traccar/web/client/controller/SettingsController.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src/org/traccar/web/client') diff --git a/src/org/traccar/web/client/controller/SettingsController.java b/src/org/traccar/web/client/controller/SettingsController.java index e05afb55..44d48f3d 100644 --- a/src/org/traccar/web/client/controller/SettingsController.java +++ b/src/org/traccar/web/client/controller/SettingsController.java @@ -33,6 +33,7 @@ import org.traccar.web.shared.model.UserSettings; import com.google.gwt.core.client.GWT; import com.sencha.gxt.data.shared.ListStore; import com.sencha.gxt.widget.core.client.Dialog.PredefinedButton; +import com.sencha.gxt.widget.core.client.box.AlertMessageBox; import com.sencha.gxt.widget.core.client.box.ConfirmMessageBox; import com.sencha.gxt.widget.core.client.event.HideEvent; -- cgit v1.2.3