From 9e4bbb2d3c1989b18fc302d87b376168d0f5e67c Mon Sep 17 00:00:00 2001 From: Felix Heidecke Date: Wed, 13 Dec 2017 10:33:15 +0100 Subject: [PATCH] Show button text "share" if creating a new share --- core/js/sharedialoglinkshareview.js | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/core/js/sharedialoglinkshareview.js b/core/js/sharedialoglinkshareview.js index 51e38cc4a744..126e2a63b351 100644 --- a/core/js/sharedialoglinkshareview.js +++ b/core/js/sharedialoglinkshareview.js @@ -311,18 +311,27 @@ var self = this; var title = t('files_sharing', 'Edit link share: {name}', {name: this.itemModel.getFileInfo().getFullPath()}); var buttons = [{ - text: t('core', 'Share'), - click: _.bind(this._onClickSave, this), - defaultButton: true - }, { text: t('core', 'Cancel'), click: _.bind(this._onClickCancel, this) }]; if (this.model.isNew()) { title = t('files_sharing', 'Create link share: {name}', {name: this.itemModel.getFileInfo().getFullPath()}); + buttons.unshift({ + text: t('core', 'Share'), + click: _.bind(this._onClickSave, this), + defaultButton: true + }) } - else if (this.model.get('encryptedPassword')) { + else { + buttons.unshift({ + text: t('core', 'Save'), + click: _.bind(this._onClickSave, this), + defaultButton: true + }) + } + + if (this.model.get('encryptedPassword')) { buttons.push({ classes: 'removePassword -float-left', text: t('core', 'Remove password'),