activity_duration field -> number
authorColeman Watts <coleman@civicrm.org>
Thu, 6 Dec 2018 18:50:39 +0000 (13:50 -0500)
committerColeman Watts <coleman@civicrm.org>
Thu, 27 Dec 2018 20:50:51 +0000 (15:50 -0500)
CRM/Activity/Form/Activity.php
CRM/Case/Form/Activity/OpenCase.php

index da392e6f1e74f196697dc914817f4d7db1e53eed..2e9ea0d3330e61da713ceace7141ff1c6b2f284c 100644 (file)
@@ -163,9 +163,9 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
         ),
       ),
       'duration' => array(
-        'type' => 'text',
+        'type' => 'number',
         'label' => ts('Duration'),
-        'attributes' => array('size' => 4, 'maxlength' => 8),
+        'attributes' => array('class' => 'four', 'min' => 1),
         'required' => FALSE,
       ),
       'location' => array(
index 55e475134a65dbe55537d5e050db748afaf74a4a..64e64deb0e60de776583f1c8246048a1630d2c7b 100644 (file)
@@ -175,7 +175,7 @@ class CRM_Case_Form_Activity_OpenCase {
       $csElement->freeze();
     }
 
-    $form->add('text', 'duration', ts('Activity Duration'), array('size' => 4, 'maxlength' => 8));
+    $form->add('number', 'duration', ts('Activity Duration'), ['class' => 'four', 'min' => 1]);
     $form->addRule('duration', ts('Please enter the duration as number of minutes (integers only).'), 'positiveInteger');
 
     if ($form->_currentlyViewedContactId) {