Add in Wrapper template around DatePickerRange template to have better layout of...
authorSeamus Lee <seamuslee001@gmail.com>
Fri, 10 May 2019 00:16:19 +0000 (10:16 +1000)
committerSeamus Lee <seamuslee001@gmail.com>
Fri, 10 May 2019 02:54:50 +0000 (12:54 +1000)
Allow for colspan and class to be set when adding in wrapper

Update the wrapper to be only one td and not all and fix activity template appropriately

templates/CRM/Activity/Form/Search/Common.tpl
templates/CRM/Core/DatePickerRangeWrapper.tpl [new file with mode: 0644]

index 315f6cd34e153105bd63956f84365213d5e741e4..e9ac9139fa3ef882b4d372eb6faf2d3c6e931239 100644 (file)
@@ -89,9 +89,8 @@
 </tr>
 
 <tr>
-  <td>
-    {include file="CRM/Core/DatePickerRange.tpl" fieldName="activity_date_time"}
-  </td>
+  {include file="CRM/Core/DatePickerRangeWrapper.tpl" fieldName="activity_date_time" colspan="2"}
+  <td>&nbsp;</td>
 </tr>
 <tr>
   <td>
diff --git a/templates/CRM/Core/DatePickerRangeWrapper.tpl b/templates/CRM/Core/DatePickerRangeWrapper.tpl
new file mode 100644 (file)
index 0000000..9396375
--- /dev/null
@@ -0,0 +1,29 @@
+{*
+ +--------------------------------------------------------------------+
+ | CiviCRM version 5                                                  |
+ +--------------------------------------------------------------------+
+ | Copyright CiviCRM LLC (c) 2004-2018                                |
+ +--------------------------------------------------------------------+
+ | This file is a part of CiviCRM.                                    |
+ |                                                                    |
+ | CiviCRM is free software; you can copy, modify, and distribute it  |
+ | under the terms of the GNU Affero General Public License           |
+ | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
+ |                                                                    |
+ | CiviCRM is distributed in the hope that it will be useful, but     |
+ | WITHOUT ANY WARRANTY; without even the implied warranty of         |
+ | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
+ | See the GNU Affero General Public License for more details.        |
+ |                                                                    |
+ | You should have received a copy of the GNU Affero General Public   |
+ | License and the CiviCRM Licensing Exception along                  |
+ | with this program; if not, contact CiviCRM LLC                     |
+ | at info[AT]civicrm[DOT]org. If you have questions about the        |
+ | GNU Affero General Public License or the licensing of CiviCRM,     |
+ | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
+ +--------------------------------------------------------------------+
+*}
+{* Wrapper around DatePickerRange TPL file *}
+<td {if $colspan} colspan="{$colspan}" {else} colspan="2" {/if} {if $class} class="{$class}" {/if}>
+    {include file="CRM/Core/DatePickerRange.tpl" fieldName=$fieldName}
+</td>