Unverified Commit 0e51fc70 authored by eileen's avatar eileen 🎱 Committed by GitHub

Merge pull request #11520 from JMAConsulting/CRM-21654

CRM-21654: Support custom file field on Batch Entry Profile
parents c71645bd 6454484c
......@@ -153,11 +153,8 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
// remove file type field and then limit fields
$suppressFields = FALSE;
$removehtmlTypes = array('File');
foreach ($this->_fields as $name => $field) {
if ($cfID = CRM_Core_BAO_CustomField::getKeyID($name) &&
in_array($this->_fields[$name]['html_type'], $removehtmlTypes)
) {
if ($cfID = CRM_Core_BAO_CustomField::getKeyID($name) && $this->_fields[$name]['html_type'] == 'Autocomplete-Select') {
$suppressFields = TRUE;
unset($this->_fields[$name]);
}
......
......@@ -118,7 +118,12 @@
{/if}
</div>
{else}
<div class="compressed crm-grid-cell">{$form.field.$rowNumber.$n.html}</div>
<div class="compressed crm-grid-cell">
{$form.field.$rowNumber.$n.html}
{if $fields.$n.html_type eq 'File' && !empty($form.field.$rowNumber.$fieldName.value.size)}
{ts}Attached{/ts}: {$form.field.$rowNumber.$fieldName.value.name}
{/if}
</div>
{/if}
{/foreach}
</div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment