ssossossosso

Forums

Covering OroCRM topics, including community updates and company announcements.  Subscribe

This topic contains 3 replies, has 2 voices, and was last updated by Mike Kudelya Mike Kudelya 1 year, 3 months ago.

  • Creator
    Topic
  • #18294

    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
  • #18315
    Mike Kudelya
    Mike Kudelya
    Oro Core

    Hello Alex!

    I’m investigating our question.

    #18316
    Mike Kudelya
    Mike Kudelya
    Oro Core

    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

    #18325
    Mike Kudelya
    Mike Kudelya
    Oro Core

    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)

You must be logged in to reply to this topic.