headerpane.hbs customize for account module.

Hello

How can i  modify headerpane.hbs for acccount module.

i tried to add check boxes in Headerpane part of the account module.

i tried custom/modules/Accounts/clients/base/views/headerpane/headerpane.hbs

<div class="headerpane">

    <h1>

        {{#each meta.fields}}

            <span class="record-cell" data-type="{{type}}" data-name="{{name}}">

                <span class="table-cell-wrapper">

                    <span class="index" data-fieldname="{{name}}" data-index="">

                        {{field ../this model=../this.model}}

                    </span>

                </span>

            </span>

        {{/each}}

        <div class="btn-toolbar pull-right dropdown">

            {{#each meta.buttons}}

                {{field ../this}}

            {{/each}}

        </div>

    </h1>

   

</div>

<table width="100%" cellspacing="0" cellpadding="0" border="0">

    <form>

    <tr>

    <td colspan=5> 

            <fieldset style="text-align:left;border-bottom: 1px solid #98C6EA;border:1px solid #98C6EA;width: 50%;">

               <table width="100%" cellspacing="0" cellpadding="0" border="0" >

                <tr><td >                  

                     Name  

                        <input type="checkbox" name="account_name" id="account_name" {php} if($account_name == "on"){echo "CHECKED";}{/php}/>                      

                        </td></tr>

                     </form>

    </table>

but it is not working.

Parents
  • Hi Bhavin Patel,

    I've check your code, HTML syntax doesn't seem right. There are missing elements that could cause unexpected UI design.

    Other than that I'm not familiar with `{php} if($account_name == "on"){echo "CHECKED";}{/php}` notation.

    Just for testing try to remove this code block and run Quick Repair and Rebuild from Admin > Repairs.

    Hope this helps.

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

  • Hello Tevfik

    Thanks for reply.

    i remove this `{php} if($account_name == "on"){echo "CHECKED";}{/php}` and add simple <h1>Hello World</h1>.

    but still it is not displaying.

  • Hi Bhavin Patel,

    I double checked, the correct path needs to be like this: custom/modules/Accounts/clients/base/views/record/headerpane.hbs

    Can you try this? Let me know if it works.

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

  • Hi

     

     

     

  • Hi Bhavin,

    It's working for me on SugarCRM 7.7.0.0 ENT. Which Sugar version are you using?

    I'm not sure what you ask. Do you want to change only for Accounts module or all modules?

    If you want to change for all modules, all you need to do is clone headerpane.hbs file from

    ./clients/base/views/record/headerpane.hbs

    to

    custom/clients/base/views/record/headerpane.hbs

    I wanted to make sure that you are getting the headerpane.hbs from record folder. (I highlighted)

    Not from headerpane folder under ./clients/base/views/

    [All changes made on SugarCRM 7.7.0.0 ENT]

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

Reply
  • Hi Bhavin,

    It's working for me on SugarCRM 7.7.0.0 ENT. Which Sugar version are you using?

    I'm not sure what you ask. Do you want to change only for Accounts module or all modules?

    If you want to change for all modules, all you need to do is clone headerpane.hbs file from

    ./clients/base/views/record/headerpane.hbs

    to

    custom/clients/base/views/record/headerpane.hbs

    I wanted to make sure that you are getting the headerpane.hbs from record folder. (I highlighted)

    Not from headerpane folder under ./clients/base/views/

    [All changes made on SugarCRM 7.7.0.0 ENT]

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

Children
  • Hi Tevfik

    i m using SugarCRM Ultimate, Version 7.6.2.1

    I want to change only for Accounts modules.

    clone headerpane folder from following path clients/base/views/headerpane  to custom/modules/Accounts/clients/base/views/headerpane and modify headearpane.hbs but still it is not affecting.

  • Hi Bhavin,

    Okay I checked for 7.6.2.1.

    In order the change the headerpane, you need to clone

    ./clients/base/views/record/record.hbs

    to

    custom/modules/Accounts/clients/base/views/record/record.hbs

    and modify in between <div class="headerpane"> </div> tags. Have a look at this sample code;

    {{!--
    /*
     * Your installation or use of this SugarCRM file is subject to the applicable
     * terms available at
     * support.sugarcrm.com/.../.
     * If you do not agree to all of the applicable terms or do not have the
     * authority to bind the entity as an authorized representative, then do not
     * install or use this SugarCRM file.
     *
     * Copyright (C) SugarCRM Inc. All rights reserved.
     */
    --}}
    <div>
    {{#if model.isNotEmpty}}
        {{#if enableHeaderPane}}
            <div class="headerpane">
                <h1>
                    HERE ARE YOUR CHANGES
                </h1>
            </div>
        {{/if}}
    
    
        {{#if meta.useTabsAndPanels}}
        {{! if the first panel uses panels, then the rest use panels, so don't use tabview }}
            <div class="record tab-layout">
            {{#if meta.firstPanelIsTab}}
    .
    .
    .
    .
    
    
    

    Hope this helps.

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

  • Hi Tevfik

    Thank you.

    Can u give me idea for changes in list view headerpane.

  • Hi Bhavin,

    Glad that worked for you.

    Listviews should use list-headerpane. Take a look at them.

    Let me know if it doesn't work.

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

  • Hi Tevfik

    i have checked list-headerpane but in this folder there is no .hbs file.

    so how can i change list-headerpane.

  • Hi Bhavin,

    Correct, list-headerpane extends from headerpane. So making changes in custom/clients/base/views/headerpane/headerpane.hbs would reflects to List View.

    Best Regards

    Tevfik Tümer

    Developer Support Engineer

  • Hi Tevfik

    i have tried but it is work for all modules.

    how can i set for single module like Account.