$this->add('textarea', 'honor_block_text', ts('Honoree Introductory Message'), array('rows' => 2, 'cols' => 50));
- $softCreditTypes = &$this->add('select', 'soft_credit_types',
- ts('Honor Types'),
- CRM_Core_OptionGroup::values("soft_credit_type", FALSE),
- FALSE,
- array(
- 'id' => 'soft_credit_types',
- 'multiple' => 'multiple',
- 'class' => 'crm-select2',
- )
- );
+ $this->addSelect('soft_credit_types', array(
+ 'label' => ts('Honor Types'),
+ 'entity' => 'ContributionSoft',
+ 'field' => 'soft_credit_type_id',
+ 'multiple' => TRUE,
+ 'class' => 'huge'
+ ));
$entities = array(
array(
{$form.soft_credit_types.label}
</td>
<td>
- <dt style="text-align:left;">{$form.soft_credit_types.html|crmAddClass:huge}</dt>
- <dd>
- <a class="optionvalue-link" href="#" title='Click to edit available soft credit types'>
- <span class="batch-edit"></span>
- </a>
- </dd>
+ {$form.soft_credit_types.html}
</td>
</tr>
<tr class="crm-contribution-contributionpage-custom-form-block-custom_pre_id">
document.getElementById("honor").style.display = "none";
}
}
- cj('.optionvalue-link').click(function() {
- {/literal}"{crmAPI var='result' entity='OptionGroup' action='get' sequential=1 name='soft_credit_type'}"{literal};
- var postURL = {/literal}"{crmURL p='civicrm/admin/options' q="gid="}{$result.id}"{literal};
- CRM.loadForm(postURL).on('crmFormSuccess', function(e, data) {
- cj('.ui-dialog a').click(function(){
- //Todo: inline edit facility for soft_credit_type option group in jquery popup dialog
- });
- });
- return false;
- })
-
{/literal}
</script>