-
-
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
CRM-12252 Add in help_pre and help_post fields for price field options #8521
Conversation
seamuslee001
commented
Jun 6, 2016
•
edited by civicrm-builder
Loading
edited by civicrm-builder
- CRM-12252: What is price set price option description for?
$pre_help = isset($opt['help_pre']) ? | ||
'<span class="crm-price-amount-help-pre">' . $opt['help_pre'] . '</span>: ' : ''; | ||
$post_help = isset($opt['help_post']) ? | ||
': <span class="crm-price-amount-help-post">' . $opt['help_post'] . '</span>' : ''; |
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.
I think we need to also add description
class to make the span look similar to other help texts(custom fields, etc).
Can you please update this PR as it has gone stale due to generated data changes. |
3b3e1bc
to
46bcd21
Compare
$pre_help = isset($opt['help_pre']) ? | ||
'<span class="crm-price-amount-help-pre">' . $opt['help_pre'] . '</span>: ' : ''; | ||
$post_help = isset($opt['help_post']) ? | ||
': <span class="crm-price-amount-help-post">' . $opt['help_post'] . '</span>' : ''; |
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.
@seamuslee001 shouldn't description
class be added here too ?
@seamuslee001 I get an error on upgrade after the updated code.
Screenshot - http://goo.gl/Zds5N5 |
@mlutfy could you review where the i18n / l10n is going wrong in patch? |
I think you need to look at how you are calling executeQuery - here is the call sig
|
thanks Eileen :) @eileenmcnaughton |
@seamuslee001 After multilingual upgrade to 4.7.9 with this patch included, fields added here( Can you please check if this is replicated by you as well ? Thanks! |
@jitendrapurohit I don't have access to a multilingual DB so bit difficult for me but I have just pushed something to try and make it like we're adding label. I don't know what is causing the problem |
@@ -216,6 +216,8 @@ public function buildQuickForm() { | |||
$this->addRule('amount', ts('Please enter a monetary value for this field.'), 'money'); | |||
|
|||
$this->add('textarea', 'description', ts('Description')); | |||
$this->add('textarea', 'help_pre', ts('Pre Option Help'), NULL, TRUE); |
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.
I'm guessing the problem is in the postProcess on this file? You shouldn't need to do anything re multilingual - esp if you use the api
Nope, it still occurs for me :-(. I see that altering The PriceFieldValue takes the BAO object which doesn't have |
…e in table name as well
@jitendrapurohit Can you test it again please, I have tried again with the upgrade but not sure what else I can do |
Confirmed that this works fine now. I'll create a new PR for some minor fixes on display and optimization. Thanks @seamuslee001 :-) |
Additional PR at #8642 |