<?php

/**
 * SP Engage Integration - sync to silverpop trigger.
 * @author Celenia Software
 */

$dependencies['Leads']['sp_synctosilverpop'] = array(
    'hooks'             => array(
        0 => 'edit'
    ),
    'trigger'           => 'equal($sp_synctosilverpop, "1")',
    'triggerFields'     => array(
        0 => 'sp_synctosilverpop',
        1 => 'sp_engageid'
    ),
    'onload'            => true,
    'actions'           => array(
        0 => array(
            'name'      => 'ReadOnly',
            'params'    => array(
                'target'    => 'sp_synctosilverpop',
                'value'     => 'true'
            )
        ),
        1 => array(
            'name'      => 'ReadOnly',
            'params'    => array(
                'target'    => 'sp_engageid',
                'value'     => 'true'
            )
        )
    )
);
