From b82c9857d1056d86de926cd0d1d5a6e2a03a4dcd Mon Sep 17 00:00:00 2001 From: kurund Date: Wed, 18 Sep 2013 11:22:54 +0530 Subject: [PATCH] CRM-13328, fixes ---------------------------------------- * CRM-13328: Add support for image scaling http://issues.civicrm.org/jira/browse/CRM-13328 --- CRM/Badge/Form/Layout.php | 4 ++-- templates/CRM/Badge/Form/Layout.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CRM/Badge/Form/Layout.php b/CRM/Badge/Form/Layout.php index d70cca65b3..ac1d6cdf68 100644 --- a/CRM/Badge/Form/Layout.php +++ b/CRM/Badge/Form/Layout.php @@ -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)); diff --git a/templates/CRM/Badge/Form/Layout.js b/templates/CRM/Badge/Form/Layout.js index 044b4f99d3..183331393f 100644 --- a/templates/CRM/Badge/Form/Layout.js +++ b/templates/CRM/Badge/Form/Layout.js @@ -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; }); }); -- 2.25.1