[IMP] website_slides: upload document doesn't rewrite title everytime
Before when you uploaded a document, the title was set to the filename even when the field was set by the user before. Now, the field title is set to the filename only when it is empty. task-2161391
This commit is contained in:
@@ -516,7 +516,9 @@ var SlideUploadDialog = Dialog.extend({
|
||||
if (!preventOnchange) {
|
||||
var input = file.name;
|
||||
var inputVal = input.substr(0, input.lastIndexOf('.')) || input;
|
||||
this._formSetFieldValue('name', inputVal);
|
||||
if (this._formGetFieldValue('name') === "") {
|
||||
this._formSetFieldValue('name', inputVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
_onChangeSlideUrl: function (ev) {
|
||||
|
||||
Reference in New Issue
Block a user