Add custom texts to apps management password checks

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-05-24 14:02:56 +02:00
parent 10b33cd5d0
commit d44cbc8118
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View file

@ -324,7 +324,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
enableAppBundle:function(bundleId, active, element, groups) {
if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.enableAppBundle, this, bundleId, active, element, groups));
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.enableAppBundle, this, bundleId, active, element, groups), {
text: t('settings', 'Installing apps requires you to confirm your password'),
confirm: t('settings', 'Install app bundle'),
});
return;
}
@ -348,7 +351,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
*/
enableApp:function(appId, active, groups) {
if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.enableApp, this, appId, active, groups));
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.enableApp, this, appId, active, groups), {
text: ( active ? t('settings', 'Disabling apps requires you to confirm your password') : t('settings', 'Enabling apps requires you to confirm your password') ),
confirm: ( active ? t('settings', 'Disable app') : t('settings', 'Enable app') ),
});
return;
}
@ -577,7 +583,10 @@ OC.Settings.Apps = OC.Settings.Apps || {
uninstallApp:function(appId, element) {
if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.uninstallApp, this, appId, element));
OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.uninstallApp, this, appId, element), {
text: t('settings', 'Uninstalling apps requires you to confirm your password'),
confirm: t('settings', 'Uninstall')
});
return;
}