Add tooltips to billing section.
authorSteve Sutton <steve@gaslightmedia.com>
Fri, 3 Aug 2018 15:15:53 +0000 (11:15 -0400)
committerSteve Sutton <steve@gaslightmedia.com>
Fri, 3 Aug 2018 15:15:53 +0000 (11:15 -0400)
To explain lock and unlock of the billing fields.

views/admin/billing/contact.html

index 466890d..4dc31b7 100644 (file)
@@ -1,10 +1,15 @@
 <table id="billing-contact-data" class="glm-admin-table glm-admin-table-inner">
     <tbody>
         <tr>
-            <th>Update Billing Account</th>
-            <td>
+            <td colspan="2">
                 <input id="use_billing_account" type="checkbox" name="use_billing" />
-            </td>
+                Update Billing Account
+                <a class="glm_tooltip tooltip" href="#" onclick="return false;" onkeypress="return false;">
+                    <p id="billing-locked">Billing is locked. <br>Enable 'Update Billing Account'<br>to unlock it.</p>
+                    <p id="billing-unlocked" class="glm-hidden">Billing is unlocked. <br>Disable 'Update Billing Account'<br>to lock it.</p>
+                    <i class="fa fa-question-circle"></i>
+                </a>
+            </th>
         </tr>
         <tr>
             <th class="{if $account.fieldRequired.email} glm-required{/if}">Billing Email</th>
@@ -225,6 +230,8 @@ jQuery(document).ready(function($){
             setFieldRequired( 'billing_state', 'select' );
             setFieldRequired( 'billing_zip', 'input' );
             enableBillingForm();
+            $('#billing-locked').addClass('glm-hidden');
+            $('#billing-unlocked').removeClass('glm-hidden');
         } else {
             setFieldUnRequired( 'billing_email', 'input' );
             setFieldUnRequired( 'billing_fname', 'input' );
@@ -234,6 +241,8 @@ jQuery(document).ready(function($){
             setFieldUnRequired( 'billing_state', 'select' );
             setFieldUnRequired( 'billing_zip', 'input' );
             disableBillingForm();
+            $('#billing-locked').removeClass('glm-hidden');
+            $('#billing-unlocked').addClass('glm-hidden');
         }
     }
     $('#use_billing_account').click(function(){
@@ -383,5 +392,6 @@ jQuery(document).ready(function($){
         $('#newBillingCityDialog').dialog('close');
 
     });
+
 });
 </script>