{* add campaigns to various components CRM-7362 *} {if $campaignContext eq 'componentSearch'} {* add campaign in component search *} {assign var=elementName value=$campaignInfo.elementName} {$form.$elementName.label}
{$form.$elementName.html}
{else} {if $campaignInfo.showAddCampaign} {$form.campaign_id.label} {* lets take a call, either show campaign select drop-down or show add campaign link *} {if $campaignInfo.hasCampaigns} {$form.campaign_id.html|crmAddClass:huge} {help id="id-campaign_id" file="CRM/Campaign/Form/addCampaignToComponent.hlp"} {* show for add and edit actions *} {if ( $action eq 1 or $action eq 2 ) and !$campaignInfo.alreadyIncludedPastCampaigns and $campaignInfo.includePastCampaignURL}
» {ts}Show past campaign(s) in this select list.{/ts} {/if} {else}
{ts}There are currently no active Campaigns.{/ts} {if $campaignInfo.addCampaignURL} {capture assign="link"}href="{$campaignInfo.addCampaignURL}" class="action-item action-item-first"{/capture} {ts 1=$link}If you want to associate this record with a campaign, you can create a campaign here.{/ts} {/if} {help id="id-campaign_id" file="CRM/Campaign/Form/addCampaignToComponent.hlp"}
{/if} {literal} {/literal} {/if}{* add campaign to component if closed. *} {/if}{* add campaign to component search if closed. *}