diff options
-rw-r--r-- | browser/src/control/Permission.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/browser/src/control/Permission.js b/browser/src/control/Permission.js index b604d7eb34..629c5cc8d8 100644 --- a/browser/src/control/Permission.js +++ b/browser/src/control/Permission.js @@ -149,6 +149,13 @@ L.Map.include({ var fileName = this['wopi'].BaseFileName; var extension = this._getFileExtension(fileName); var extensionInfo = this.readonlyStartingFormats[extension]; + + var buttonList = []; + if (!this['wopi'].UserCanNotWriteRelative) { + buttonList.push($.extend({}, vex.dialog.buttons.YES, { text: _('Save as ODF format') })); + } + buttonList.push($.extend({}, vex.dialog.buttons.NO, { text: extensionInfo.canEdit ? _('Continue editing') : _('Continue read only')})); + vex.dialog.open({ message: _('This document may contain formatting or content that cannot be saved in the current file format.'), overlayClosesOnClick: false, @@ -160,10 +167,7 @@ L.Map.include({ this._proceedEditMode(); } }, that), - buttons: [ - $.extend({}, vex.dialog.buttons.YES, { text: _('Save as ODF format') }), - $.extend({}, vex.dialog.buttons.NO, { text: extensionInfo.canEdit ? _('Continue editing') : _('Continue read only')}) - ] + buttons: buttonList }); } else { this._proceedEditMode(); |