OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Programming Questions How to add a field to Log Call window

This topic contains 3 replies, has 2 voices, and was last updated by  Mike Kudelya 7 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #25206

    alexweb
    Participant

    Hello Folks

    I need to add a simple field, actually a custom link to the Log Call popup.
    Similar as Hangout button. I tried to take a look at the Hangout bundle, but view code so complicated…

    I’m familiar with Symfony, but Oro’s code looks a bit complicated.
    So again, how to add a field to Log Call window?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #25207

    Mike Kudelya
    Participant

    Hello Alex!

    I’m investigating our question.

    #25208

    Mike Kudelya
    Participant

    You should create new form type:

    Register it as service OroCRM/Bundle/CallBundle/Resources/config/form.yml:

    Create field html file:

    OroCRM/Bundle/CallBundle/Resources/views/Form/fields.html.twig

    with

    Add field to Call Type OroCRM/Bundle/CallBundle/Form/Type/CallType.php

    add translate to OroCRM/Bundle/CallBundle/Resources/translations/messages.en.yml:

    and include field to Log Call template at first line OroCRM/Bundle/CallBundle/Resources/views/Call/widget/update.html.twig

    Also you can add css to your field:

    Create less file: OroCRM/Bundle/CallBundle/Resources/public/css/less/main.less

    with

    Create assets file: OroCRM/Bundle/CallBundle/Resources/config/assets.yml

    with

    And run command: app/console oro:platform:update –force –timeout 9000

    #25209

    Mike Kudelya
    Participant

    If you want add field as customization, use this approach:

    Create Custom/Bundle/CallBundle directory in /src

    Add custom bundle to app/AppKernel.php in bundle variable:

    add bundle class src/Custom/Bundle/CallBundle/CustomCallBundle.php

    add DependencyInjection class src/Custom/Bundle/CallBundle/DependencyInjection/CustomCallExtension.php

    Add form extension src/Custom/Bundle/CallBundle/Form/Extension/CallTypeExtension.php

    add custom form src/Custom/Bundle/CallBundle/Form/Type/CallLinkType.php

    add src/Custom/Bundle/CallBundle/Resources/config/form.yml

    add src/Custom/Bundle/CallBundle/Resources/config/services.yml

    add src/Custom/Bundle/CallBundle/Resources/translations/messages.en.yml

    copy call log widget template
    from vendor/oro/crm/src/OroCRM/Bundle/CallBundle/Resources/views/Call/widget/update.html.twig
    to src/Custom/Bundle/CallBundle/Resources/views/Call/widget/update.html.twig
    and add this code at first line in copied file

    add custom html src/Custom/Bundle/CallBundle/Resources/views/Form/fields.html.twig

Viewing 3 replies - 1 through 3 (of 3 total)

The forum ‘OroCRM – Programming Questions’ is closed to new topics and replies.

Back to top