diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-03-26 21:18:54 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-03-26 21:18:54 +1300 |
commit | f97b868dc1bbf9698d05a9473da6ddd0c01640e8 (patch) | |
tree | 429293f0a21238602b76ceb58644bda80e872680 /src/org/traccar/web/client | |
parent | 33dbcf4d450e190228a3a0dffd611f142215380b (diff) | |
parent | 7b4306677f47e6e1c12bf3311d6b3394b2b9ff11 (diff) | |
download | trackermap-web-f97b868dc1bbf9698d05a9473da6ddd0c01640e8.tar.gz trackermap-web-f97b868dc1bbf9698d05a9473da6ddd0c01640e8.tar.bz2 trackermap-web-f97b868dc1bbf9698d05a9473da6ddd0c01640e8.zip |
Merge pull request #147 from khfayzullaev/master
Admin should not add an existing username
Diffstat (limited to 'src/org/traccar/web/client')
-rw-r--r-- | src/org/traccar/web/client/controller/SettingsController.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/web/client/controller/SettingsController.java b/src/org/traccar/web/client/controller/SettingsController.java index f8fcc72d..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; @@ -97,6 +98,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(); |