summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-02-15 12:17:55 -0600
committerMorris Jobke <hey@morrisjobke.de>2017-02-15 17:45:38 -0600
commit2e88bec14bb9cee82c1f3e5479c081eeadd89be5 (patch)
treedb530d28c2d457379c9e3f5e22d7aa19cff1ac2b /settings/js
parentc3fe8f6cf27f45d3fbcdc625ba547e3736edd07a (diff)
downloadnextcloud-server-2e88bec14bb9cee82c1f3e5479c081eeadd89be5.tar.gz
nextcloud-server-2e88bec14bb9cee82c1f3e5479c081eeadd89be5.zip
Fix setup issue and refine error messages
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/users/users.js24
1 files changed, 1 insertions, 23 deletions
diff --git a/settings/js/users/users.js b/settings/js/users/users.js
index 55939c289c0..a6dcafcdac3 100644
--- a/settings/js/users/users.js
+++ b/settings/js/users/users.js
@@ -918,7 +918,7 @@ $(document).ready(function () {
}));
return false;
}
- if ($.trim(password) === '' && !$('#CheckboxMailPasswordOnUserCreate').is(':checked')) {
+ if ($.trim(password) === '' && !$('#CheckboxMailOnUserCreate').is(':checked')) {
OC.Notification.showTemporary(t('settings', 'Error creating user: {message}', {
message: t('settings', 'A valid password must be provided')
}));
@@ -1044,37 +1044,15 @@ $(document).ready(function () {
if ($('#CheckboxMailOnUserCreate').is(':checked')) {
$("#newemail").show();
- $("#MailPasswordOnUserCreateSetting").show();
}
-
- if ($('#CheckboxMailPasswordOnUserCreate').is(':checked')) {
- $("#newuserpassword").hide();
- } else {
- $("#newuserpassword").show();
- }
-
// Option to display/hide the "E-Mail" input field
$('#CheckboxMailOnUserCreate').click(function() {
if ($('#CheckboxMailOnUserCreate').is(':checked')) {
$("#newemail").show();
- $("#MailPasswordOnUserCreateSetting").show();
OCP.AppConfig.setValue('core', 'umgmt_send_email', 'true');
} else {
$("#newemail").hide();
- $("#MailPasswordOnUserCreateSetting").hide();
OCP.AppConfig.setValue('core', 'umgmt_send_email', 'false');
- OCP.AppConfig.setValue('core', 'umgmt_send_passwordlink', 'false');
- $('#CheckboxMailPasswordOnUserCreate').removeAttr('checked');
- }
- });
-
- $('#CheckboxMailPasswordOnUserCreate').click(function() {
- if ($('#CheckboxMailPasswordOnUserCreate').is(':checked')) {
- OCP.AppConfig.setValue('core', 'umgmt_send_passwordlink', 'true');
- $("#newuserpassword").hide();
- } else {
- OCP.AppConfig.setValue('core', 'umgmt_send_passwordlink', 'false');
- $("#newuserpassword").show();
}
});