Skip to content

Commit

Permalink
Show button text "share" if creating a new share
Browse files Browse the repository at this point in the history
  • Loading branch information
felixheidecke committed Dec 13, 2017
1 parent 582087b commit 9e4bbb2
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions core/js/sharedialoglinkshareview.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit 9e4bbb2

Please sign in to comment.