<?php

$panels = array(
    'newTab'        => $viewdefs['Leads']['base']['view']['record']['panels'][1]['newTab'] || false,
    'panelDefault'  => 'expanded',
    'name'          => 'SP',
    'label'         => 'LBL_SP_ENGAGEINTEGRATION',
    'columns'       => 2,
    'labelsOnTop'   => 1,
    'placeholders'  => 1,
    'fields'        => array(
        0 => array(
            'name'      => 'sp_synctosilverpop',
            'studio'    => true,
            'label'     => 'LBL_SP_SYNCTOSILVERPOP'
        ),
        1 => array(
            'name'      => 'sp_engageid',
            'studio'    => true,
            'label'     => 'LBL_SP_ENGAGEID'
        ),
        2 => array(
            'name'      => 'sp_convertedon',
            'studio'    => true,
            'label'     => 'LBL_SP_CONVERTEDON'
        )
    )
);

$contactinsight = array(
    'newTab'        => $viewdefs['Leads']['base']['view']['record']['panels'][1]['newTab'] || false,
    'panelDefault'  => 'expanded',
    'columns'       => 1,
    'name'          => 'sp_contactinsight',
    'label'         => 'LBL_SP_CONTACTINSIGHT',
    'labelsOnTop'   => true,
    'placeholders'  => true,
    'fields'        => array(
        array(
            'name'          => 'sp_contactinsight',
            'type'          => 'sp_contactinsight',
            'css_class'     => 'address',
            'scrolling'     => "no",
            'width'         => '100%',
            'height'        => '500px',
            'dismiss_label' => false,
            'readonly'      => true,
            'style'         => 'overflow-y: hidden;border: none;'
        )
    )
);

$button = array(
    'type'      => 'button',
    'name'      => 'sp_sendsilverpopemail',
    'label'     => 'LBL_SP_SENDSILVERPOPEMAIL',
    'css_class' => 'btn-primary',
    'events'    => array(
        'click' => 'button:sp_sendsilverpopemail:click'
    )
);

array_push($viewdefs['Leads']['base']['view']['record']['panels'], $panels);
array_push($viewdefs['Leads']['base']['view']['record']['panels'], $contactinsight);
array_unshift($viewdefs['Leads']['base']['view']['record']['buttons'], $button);
