-- CRM-14115, added code to limit count on dashboard.
[civicrm-core.git] / CRM / Report / Form / Instance.php
index f5e307c071874f57a0de9cad8e9f47689af86200..f0e2a40231b5d44e6f62ba38842f8523c11f26f6 100644 (file)
@@ -80,7 +80,15 @@ class CRM_Report_Form_Instance {
       ts('CC'),
       $attributes['email_subject']
     );
-
+    
+    $form->add('text',
+      'row_count',
+      ts('Limit Dashboard Results'),
+      array('maxlength' => 64,
+        'size' => 5
+      )         
+    );
+    
     $form->add('textarea',
       'report_header',
       ts('Report Header'),
@@ -97,7 +105,8 @@ class CRM_Report_Form_Instance {
       array('onclick' => "return showHideByValue('is_navigation','','navigation_menu','table-row','radio',false);")
     );
 
-    $form->addElement('checkbox', 'addToDashboard', ts('Available for Dashboard?'));
+    $form->addElement('checkbox', 'addToDashboard', ts('Available for Dashboard?'), NULL,
+      array('onclick' => "return showHideByValue('addToDashboard','','limit_result','table-row','radio',false);"));
     $form->addElement('checkbox', 'is_reserved', ts('Reserved Report?'));
     if (!CRM_Core_Permission::check('administer reserved reports')) {
       $form->freeze('is_reserved');