CRM-13328, fixes
authorkurund <kurund@civicrm.org>
Wed, 18 Sep 2013 05:52:54 +0000 (11:22 +0530)
committerkurund <kurund@civicrm.org>
Wed, 18 Sep 2013 05:52:54 +0000 (11:22 +0530)
----------------------------------------
* CRM-13328: Add support for image scaling
  http://issues.civicrm.org/jira/browse/CRM-13328

CRM/Badge/Form/Layout.php
templates/CRM/Badge/Form/Layout.js

index d70cca65b3d4487c56f119bdfcac2f39eb4035fb..ac1d6cdf682f57fe9f24e028f0947606331cd125 100644 (file)
@@ -115,12 +115,12 @@ class CRM_Badge_Form_Layout extends CRM_Admin_Form {
 
 
     $attributes = array('readonly'=> true);
-    $this->add('text', 'image_1', ts('Image (top right)'),
+    $this->add('text', 'image_1', ts('Image (top left)'),
       $attributes + CRM_Core_DAO::getAttribute('CRM_Core_DAO_PrintLabel', 'title'));
     $this->add('text', 'width_image_1', ts('Width'), array('size' => 6));
     $this->add('text', 'height_image_1', ts('Height'), array('size' => 6));
 
-    $this->add('text', 'image_2', ts('Image (top left)'),
+    $this->add('text', 'image_2', ts('Image (top right)'),
       $attributes + CRM_Core_DAO::getAttribute('CRM_Core_DAO_PrintLabel', 'title'));
     $this->add('text', 'width_image_2', ts('Width'), array('size' => 6));
     $this->add('text', 'height_image_2', ts('Height'), array('size' => 6));
index 044b4f99d321c4e69712f7eba354a430550ed2ad..183331393f48024d7ee61f54962655854c2a4f36 100644 (file)
@@ -34,7 +34,10 @@ cj(function ($) {
   });
 
   $('.clear-image').click(function(){
-    $('#' + $(this).attr('imgname')).val('');
+    var imgName = $(this).attr('imgname');
+    $('#' + imgName).val('');
+    $('#width_' + imgName).val('');
+    $('#height_' + imgName).val('');
     return false;
   });
 });