CRM-15679 - Fix translation popup for price set option form
authorColeman Watts <coleman@civicrm.org>
Fri, 12 Dec 2014 14:31:42 +0000 (09:31 -0500)
committerColeman Watts <coleman@civicrm.org>
Fri, 12 Dec 2014 14:34:18 +0000 (09:34 -0500)
CRM/Price/Form/Option.php
templates/CRM/Price/Form/Option.tpl

index 543ed011402c3f2b4b2e03e710043a2152d33d65..91b7c1a3779d252e3531c2a2b34be2c0bfd64bd1 100644 (file)
@@ -146,6 +146,9 @@ class CRM_Price_Form_Option extends CRM_Core_Form {
       // hidden Option Id for validation use
       $this->add('hidden', 'optionId', $this->_oid);
 
+      // Needed for i18n dialog
+      $this->assign('optionId', $this->_oid);
+
       //hidden field ID for validation use
       $this->add('hidden', 'fieldId', $this->_fid);
 
index 22337a36a33a86c7128143405d5eaf8fd19d5b44..071abc965c6e1df6b40b512f2d23919fd010317d 100644 (file)
@@ -45,7 +45,7 @@
       {/if}
       <tr class="crm-price-option-form-block-label">
         <td class="label">{$form.label.label}</td>
-        <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='label' id=$sid}{/if}{$form.label.html}</td>
+        <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='label' id=$optionId}{/if}{$form.label.html}</td>
       </tr>
       <tr class="crm-price-option-form-block-amount">
         <td class="label">{$form.amount.label}</td>
@@ -53,7 +53,7 @@
       </tr>
       <tr class="crm-price-option-form-block-description">
         <td class="label">{$form.description.label}</td>
-        <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='description' id=$sid}{/if}{$form.description.html}</td>
+        <td>{if $action == 2}{include file='CRM/Core/I18n/Dialog.tpl' table='civicrm_price_field_value' field='description' id=$optionId}{/if}{$form.description.html}</td>
       </tr>
       <tr class="crm-price-option-form-block-financial-type">
         <td class="label">{$form.financial_type_id.label}</td>