This topic contains 1 reply, has 1 voice, and was last updated by cappypulpy2 5 years, 8 months ago.
- Topic
Hello, there is any possibility to modify or override the “a2lix_translations_gedmo_widget” ?
there is part of my update.html.twig
123456789101112131415161718192021222324{% block content_data %}{% set id = 'subscribecategory-edit' %}{% set dataBlocks = [{'title': 'subscribe_category.trans_block'|trans,'subblocks':[{'title': '','data': [form_widget(form.translations)]}]}] %}{# the data variable is a special variable that is used in theparent content_data block to render the visual content "blocks"of a page #}{% set data = {'formErrors': form_errors(form) ? form_errors(form) : null,'dataBlocks': dataBlocks,} %}{{ parent() }}{% endblock content_data %}123{% form_theme form with ['SubscribeBundle:Form:fields.html.twig']%}fields.html.twig
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667{% block subscribe_category_translatation_widget %}{% import 'OroUIBundle::macros.html.twig' as UI %}<div class="subscribe-category-translatation oro-tabs tabbable" {{ UI.renderPageComponentAttributes({view: 'subscribe/js/app/views/subscribe-category-translation-view'}) }}><ul class="nav nav-tabs">{% spaceless %}{% if simple_way %}{% for translationsField in form %}{{ _self.renderTabNavItem(translationsField, labels) }}{% endfor %}{% else %}{% for translationsLocales in form %}{% for translationsField in translationsLocales %}{{ _self.renderTabNavItem(translationsField, labels, ('defaultLocale' == translationsLocales.vars.name)) }}{% endfor %}{% endfor %}{% endif %}{% endspaceless %}<div class="tab-content">{% spaceless %}{% if simple_way %}{% for translationsField in form %}{{ _self.renderTab(translationsField) }}{% endfor %}{% else %}{% for translationsLocales in form %}{% for translationsField in translationsLocales %}{{ _self.renderTab(translationsField) }}{% endfor %}{% endfor %}{% endif %}{% endspaceless %}</div></div>{% endblock %}{#Renders tab <code>li</code> tag for bootstrap tab panelsparamters:form - instance of FormView, it's a view for localized fieldlocaleLabels - array with user friendly labels for locale codesisDefault - is current locale's tab label should be marked as default#}{% macro renderTabNavItem(form, localeLabels, isDefault = false) %}{% set locale = form.vars.name %}<li {% if (app.request.locale == locale) %}class="active"{% endif %}><a href="void(0);" rel="nofollow">{{- localeLabels[locale]|default('N/A')|trans -}}{% if isDefault %} {% trans %}[Default]{% endtrans %}{% endif -%}</a>{% endmacro %}{#Renders content of bootstrap tab panelparamters:form - instance of FormView, it's a view for localized field#}{% macro renderTab(form) %}{% set locale = form.vars.name %}<div class="subscribe-category-translatation-fields-{{ locale }} tab-pane{% if (app.request.locale == locale) %} active{% endif %}">{{ form_widget(form) }}</div>{% endmacro %}in the SubscribeCategoryTranslationType.php i use as parent ‘a2lix_translations_gedmo’ same as is present in EmailTemplateTranslationType, but having this fields.html.twig that suppose to override the default translation block widget, but it doesen’t, i couldn’t manage to customize this view
similar to this one from the email templates
i have the twig.yml that contains the reference to fields.html.twig, i’ve tried to use the ‘OroFormBundle:Form:fields.html.twig’ as form theme but still don’t understand what’s missing
The forum ‘OroCRM – How do I? Questions’ is closed to new topics and replies.