Skip to content
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

Price Field: Field Type: remove help, simplify label #31269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CRM/Price/Form/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ public function buildQuickForm() {
$this->assign('useForEvent', FALSE);
}

$sel = $this->add('select', 'html_type', ts('Input Field Type'),
$sel = $this->add('select', 'html_type', ts('Field Type'),
$htmlTypes, TRUE, $javascript
);

// price (for text inputs)
$this->add('text', 'price', ts('Price'));
$this->add('text', 'price', ts('Unit Price'));
$this->registerRule('price', 'callback', 'money', 'CRM_Utils_Rule');
$this->addRule('price', ts('must be a monetary value'), 'money');

Expand Down
20 changes: 4 additions & 16 deletions templates/CRM/Price/Form/Field.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -90,25 +90,13 @@
<td>{$form.html_type.html}
</td>
</tr>
{if $action neq 4 and $action neq 2}
<tr>
<td>&nbsp;</td>
<td class="description">{ts}Select the html type used to offer options for this field{/ts}
</td>
</tr>
{/if}
</table>

<div class="spacer"></div>
<div id="price-block" {if $action eq 2 && $form.html_type.value.0 eq 'Text'} class="show-block" {else} class="hiddenElement" {/if}>
<table class="form-layout">
<tr class="crm-price-field-form-block-price">
<td class="label">{$form.price.label|smarty:nodefaults} <span class="crm-marker" title="{ts}This field is required.{/ts}">*</span></td>
<td>{$form.price.html}
{if $action neq 4}
<br /><span class="description">{ts}Unit price.{/ts}</span> {help id="id-negative"}
{/if}
</td>
<td class="label">{$form.price.label|smarty:nodefaults} <span class="crm-marker" title="{ts}This field is required.{/ts}">*</span> {help id="id-negative"}</td>
<td>{$form.price.html}</td>
</tr>
<tr class="crm-price-field-form-block-non-deductible-amount">
<td class="label">{$form.non_deductible_amount.label|smarty:nodefaults}</td>
Expand Down Expand Up @@ -209,8 +197,8 @@
<td>&nbsp;{$form.is_required.html}</td>
</tr>
<tr class="crm-price-field-form-block-visibility_id">
<td class="label">{$form.visibility_id.label}</td>
<td>&nbsp;{$form.visibility_id.html} {help id="id-visibility"}</td>
<td class="label">{$form.visibility_id.label} {help id="id-visibility"}</td>
<td>&nbsp;{$form.visibility_id.html}</td>
</tr>
<tr class="crm-price-field-form-block-is_active">
<td class="label">{$form.is_active.label}</td>
Expand Down