Skip to content

Commit

Permalink
fix href locale empty data
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Jul 19, 2018
1 parent 29aba6b commit 4fa815e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,9 @@ Formbuilder.comp.type.formTypeBuilder = Class.create({

Ext.each(pimcore.settings.websiteLanguages, function (locale) {

var localeValue = fieldData && fieldData.hasOwnProperty(locale) ? fieldData[locale] : null;
var keyValueRepeater = new Formbuilder.comp.types.href(
fieldConfig, fieldData[locale], locale
fieldConfig, localeValue, locale
);

tabs.push({
Expand Down
10 changes: 5 additions & 5 deletions src/FormBuilderBundle/Resources/public/js/types/href.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ Formbuilder.comp.types.href = Class.create({
generateElement: function () {

this.data = {
id: this.storeData.id,
path: this.storeData.path,
type: this.storeData.type,
subtype: this.storeData.subtype,
id: this.storeData ? this.storeData.id : null,
path: this.storeData ? this.storeData.path : null,
type: this.storeData ? this.storeData.type : null,
subtype: this.storeData ? this.storeData.subtype : null
};

var options = {}
Expand All @@ -47,7 +47,7 @@ Formbuilder.comp.types.href = Class.create({

this.href = Ext.create('FormBuilder.HrefTextField', options);

if (this.storeData.id) {
if (this.storeData && this.storeData.id) {
this.href.setHrefObject(this.storeData);
}

Expand Down

0 comments on commit 4fa815e

Please sign in to comment.