From b4c9c7700f853c2cdcb5c0a4ef4c23129638c75c Mon Sep 17 00:00:00 2001 From: yflory Date: Thu, 31 Oct 2019 12:12:45 +0100 Subject: [PATCH] Blob password change UI --- www/common/common-ui-elements.js | 40 +++++++++++++++++++++++++------ www/common/sframe-common-outer.js | 9 +++---- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/www/common/common-ui-elements.js b/www/common/common-ui-elements.js index 7a5eb0c1c..af2b86f86 100644 --- a/www/common/common-ui-elements.js +++ b/www/common/common-ui-elements.js @@ -553,13 +553,15 @@ define([ if (!data.noEditPassword && owned && parsed.type !== "sheet") { // FIXME SHEET fix password change for sheets var sframeChan = common.getSframeChannel(); - var changePwTitle = Messages.properties_changePassword; - var changePwConfirm = Messages.properties_confirmChange; - var isSharedFolder = parsed.type === 'drive'; + var isFile = parsed.hashData.type === 'file'; + var isSharedFolder = parsed.type === 'drive'; + + var changePwTitle = Messages.properties_changePassword; + var changePwConfirm = isFile ? Messages.properties_confirmChangeFile : Messages.properties_confirmChange; if (!hasPassword) { changePwTitle = Messages.properties_addPassword; - changePwConfirm = Messages.properties_confirmNew; + changePwConfirm = isFile ? Messages.properties_confirmNewFile : Messages.properties_confirmNew; } $('