Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5984)

Unified Diff: chrome/browser/resources/md_user_manager/create_profile.js

Issue 2223743003: MD User Manager: Changes to 'import supervised users' dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/md_user_manager/create_profile.js
diff --git a/chrome/browser/resources/md_user_manager/create_profile.js b/chrome/browser/resources/md_user_manager/create_profile.js
index 6b2ea4107a23c5a37fc4e789f86ff38255e6eaa0..d997d9e4567fa90c90489749154c5c74425e672a 100644
--- a/chrome/browser/resources/md_user_manager/create_profile.js
+++ b/chrome/browser/resources/md_user_manager/create_profile.js
@@ -266,15 +266,20 @@ Polymer({
},
/**
- * Displays the import supervised user popup.
+ * Displays the import supervised user popup or an error message if there are
+ * no existing supervised users.
* @param {!Array<!SupervisedUser>} supervisedUsers The list of existing
* supervised users.
* @private
*/
showImportSupervisedUserPopup_: function(supervisedUsers) {
this.loadingSupervisedUsers_ = false;
- this.$.importUserPopup.show(this.signedInUser_(this.signedInUserIndex_),
- supervisedUsers);
+ if (supervisedUsers.length > 0) {
+ this.$.importUserPopup.show(this.signedInUser_(this.signedInUserIndex_),
+ supervisedUsers);
+ } else {
+ this.handleMessage_(this.i18n('noSupervisedUserImportText'));
+ }
},
/**

Powered by Google App Engine
This is Rietveld 408576698