-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose UI support for custom fields on financial types #12501
Conversation
(Standard links)
|
Can anyone please review this for me? |
I haven't reviewed but I peeked at the code & the coding approach taken here is consistent with the work we have been doing in this area. |
@pradpnayak the one issue I have with this is that you are enabling custom fields out of the box. My position so far has been that we should make it possible for extensions to enable these but not do it in core. My main concern with enabling in core is it sets expectations that we then accept things like making the data available in searches / reports etc & that is a whole extra conversation. I think we should remove that part before we merge it & discuss separately (ok to leave in for now as it might make it easier for a reviewer) |
<div class="crm-submit-buttons"> | ||
<a href="{crmURL p='civicrm/admin/financial/financialType/accounts' q="action=browse&reset=1&aid=$aid"}" class="button"><span>{ts}View or Edit Financial Accounts{/ts}</a></span> | ||
</div> | ||
{/if} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eileenmcnaughton I need a help!!
How i can place the div section for button just besides the Save and Cancel buttom? Can i use JS to move the link or will i need to CRM/Core/Form/EntityForm.tpl to include sections insertions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you open in a new tab the 'View or Edit Financial Accounts' button goes below of Save and Cancel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does overriding protected function addFormButtons()
{ help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm not sure maybe @colemanw has a good idea
I guess we could have an 'inner tpl' of
{if $action eq 8}
<div class="messages status no-popup">
<div class="icon inform-icon"></div>
{$deleteMessage|escape}
</div>
{else}
<table class="form-layout-compressed">
{foreach from=$entityFields item=fieldSpec}
{assign var=fieldName value=$fieldSpec.name}
<tr class="crm-{$entityInClassFormat}-form-block-{$fieldName}">
{include file="CRM/Core/Form/Field.tpl"}
</tr>
{/foreach}
</table>
{include file="CRM/common/customDataBlock.tpl"}
{/if}
that is included from CRM/Core/Form/EntityForm.tpl - so you can just include the inner if you want ... different buttons
@eileenmcnaughton I have updated the PR to include only form changes and moved installation code to an extension. |
@pradpnayak I tested this in view and edit mode and read through the code. I'm OK to merge this aside from your button alignment issue & I'm OK with that as a follow up too. |
test this please |
Thanks @eileenmcnaughton |
Overview
https://lab.civicrm.org/dev/financial/issues/29
Before
Custom fields were not supported for Financial Type
After