Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2016-02-22 11:17:59 +0300
committerJoas Schilling <nickvergessen@owncloud.com>2016-02-22 11:29:13 +0300
commit04da5a56ddb7cc3ce9a7d9bb37a442cd647ac83c (patch)
tree685a1965881fedf2fed32830795f3b7511013445 /settings
parent8a8209796d4577644228121edc2231ae027217c7 (diff)
Use the notification instead of the disruptive popup
Diffstat (limited to 'settings')
-rw-r--r--settings/js/users/groups.js10
-rw-r--r--settings/js/users/users.js24
2 files changed, 18 insertions, 16 deletions
diff --git a/settings/js/users/groups.js b/settings/js/users/groups.js
index 2639191d918..27c41884504 100644
--- a/settings/js/users/groups.js
+++ b/settings/js/users/groups.js
@@ -142,8 +142,8 @@ GroupList = {
.text(result.groupname));
}
GroupList.toggleAddGroup();
- }).fail(function(result, textStatus, errorThrown) {
- OC.dialogs.alert(result.responseJSON.message, t('settings', 'Error creating group'));
+ }).fail(function(result) {
+ OC.Notification.showTemporary(t('settings', 'Error creating group: {message}', {message: result.responseJSON.message}));
});
},
@@ -245,9 +245,9 @@ GroupList = {
isGroupNameValid: function (groupname) {
if ($.trim(groupname) === '') {
- OC.dialogs.alert(
- t('settings', 'A valid group name must be provided'),
- t('settings', 'Error creating group'));
+ OC.Notification.showTemporary(t('settings', 'Error creating group: {message}', {
+ message: t('settings', 'A valid group name must be provided')
+ }));
return false;
}
return true;
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 306e3952e53..261d9a8eb52 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -767,24 +767,24 @@ $(document).ready(function () {
var password = $('#newuserpassword').val();
var email = $('#newemail').val();
if ($.trim(username) === '') {
- OC.dialogs.alert(
- t('settings', 'A valid username must be provided'),
- t('settings', 'Error creating user'));
+ OC.Notification.showTemporary(t('settings', 'Error creating user: {message}', {
+ message: t('settings', 'A valid username must be provided')
+ }));
return false;
}
if ($.trim(password) === '') {
- OC.dialogs.alert(
- t('settings', 'A valid password must be provided'),
- t('settings', 'Error creating user'));
+ OC.Notification.showTemporary(t('settings', 'Error creating user: {message}', {
+ message: t('settings', 'A valid password must be provided')
+ }));
return false;
}
if(!$('#CheckboxMailOnUserCreate').is(':checked')) {
email = '';
}
if ($('#CheckboxMailOnUserCreate').is(':checked') && $.trim(email) === '') {
- OC.dialogs.alert(
- t('settings', 'A valid email must be provided'),
- t('settings', 'Error creating user'));
+ OC.Notification.showTemporary( t('settings', 'Error creating user: {message}', {
+ message: t('settings', 'A valid email must be provided')
+ }));
return false;
}
@@ -822,8 +822,10 @@ $(document).ready(function () {
}
$('#newusername').focus();
GroupList.incEveryoneCount();
- }).fail(function(result, textStatus, errorThrown) {
- OC.dialogs.alert(result.responseJSON.message, t('settings', 'Error creating user'));
+ }).fail(function(result) {
+ OC.Notification.showTemporary(t('settings', 'Error creating user: {message}', {
+ message: result.responseJSON.message
+ }));
}).success(function(){
$('#newuser').get(0).reset();
});