Skip to content

Commit

Permalink
Merge branch '1.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Sep 24, 2018
2 parents 774b853 + 307e869 commit 6acb0f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -140,14 +140,16 @@ YUI.add('ez-contentcreateviewservice', function (Y) {
* @param {EventFacade} e
*/
_selectLanguage: function (e) {
var isTranslationAllowed = this.get('content').isNew();

e.preventDefault();
this.fire('languageSelect', {
config: {
title: Y.eZ.trans('change.language.to', {}, 'contentedit'),
languageSelectedHandler: Y.bind(this._setLanguage, this, e.target, e.fields),
cancelLanguageSelectionHandler: null,
canBaseTranslation: false,
translationMode: true,
translationMode: isTranslationAllowed,
referenceLanguageList: [this.get('languageCode')]
},
});
Expand Down
Expand Up @@ -333,6 +333,11 @@ YUI.add('ez-contentcreateviewservice-tests', function (Y) {
this.request = {params: {languageCode: this.languageCode}};
this.capi = {};

Mock.expect(this.content, {
method: 'isNew',
returns: true
});

Mock.expect(this.version, {
method: 'get',
args: ['versionId'],
Expand Down

0 comments on commit 6acb0f6

Please sign in to comment.