Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | 61x 61x 77x 77x 77x 77x 77x 77x 2x 77x 77x 77x 77x | 'use strict';
define(
[
'underscore',
'oro/translator',
'pim/controller/front',
'pim/form-builder',
'pim/fetcher-registry',
'pim/user-context',
'pim/dialog',
'pim/page-title',
'pim/i18n'
],
function (_, __, BaseController, FormBuilder, FetcherRegistry, UserContext, Dialog, PageTitle, i18n) {
return BaseController.extend({
/**
* {@inheritdoc}
*/
renderForm: function (route) {
return FetcherRegistry.getFetcher('family').fetch(
route.params.code,
{cached: false, full_attributes: false}
).then((family) => {
Iif (!this.active) {
return;
}
var label = _.escape(
i18n.getLabel(
family.labels,
UserContext.get('catalogLocale'),
family.code
)
);
PageTitle.set({'family.label': _.escape(label) });
return FormBuilder.build(family.meta.form)
.then((form) => {
this.on('pim:controller:can-leave', function (event) {
form.trigger('pim_enrich:form:can-leave', event);
});
form.setData(family);
form.trigger('pim_enrich:form:entity:post_fetch', family);
form.setElement(this.$el).render();
return form;
});
});
}
});
}
);
|