hotfix for service form
authorSteve Sutton <steve@gaslightmedia.com>
Mon, 30 Jun 2014 18:15:56 +0000 (14:15 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Mon, 30 Jun 2014 18:15:56 +0000 (14:15 -0400)
fixing the markup for the radio buttons
fix javascript

Toolkit/Contacts/ServiceRequest.php
libjs/serviceRequestForm.js

index 1dbfd8a..8de0d08 100755 (executable)
@@ -283,8 +283,7 @@ class Toolkit_Contacts_ServiceRequest
             'name'    => 'service_request',
             'display' => '',
             'opts'    => 'Yes',
-            'att'     => 'Yes',
-            'val'     => array(0, 1)
+            'att'     => 'Yes'
         );
         $e[] = array(
             'type'    => 'text',
@@ -298,8 +297,7 @@ class Toolkit_Contacts_ServiceRequest
             'name'    => 'service_request',
             'display' => '',
             'opts'    => 'No',
-            'att'     => 'No',
-            'val'     => array(0, 1)
+            'att'     => 'No'
         );
         $e[] = array(
             'type'    => 'text',
index 4d2e065..9397d98 100644 (file)
@@ -14,7 +14,7 @@ function toggleGroups(serviceRequest){
         $('input[name="delivery_date"]').prop('disabled', true);
         $('input[name="completion_date"]').prop('disabled', true);
         $('input[name="arrival_date"]').prop('disabled', false);
-    } else {
+    } else if (serviceRequest == 'No') {
         $('input[name="delivery_date"]').prop('disabled', false);
         $('input[name="completion_date"]').prop('disabled', false);
         $('input[name="arrival_date"]').prop('disabled', true);