CRM-16908 - Show tooltip for disabled buttons
authorColeman Watts <coleman@civicrm.org>
Sat, 25 Jul 2015 19:04:55 +0000 (15:04 -0400)
committerColeman Watts <coleman@civicrm.org>
Sat, 25 Jul 2015 19:04:55 +0000 (15:04 -0400)
ang/crmMailing/BlockPreview.html
ang/crmUi/wizard.html

index b711c59f93fc8dd3579dc4f9b24e622069fc59e1..7266e2fe1d45c01adede7726950612e5c4ade8df 100644 (file)
@@ -36,7 +36,7 @@ Vars: mailing:obj, testContact:obj, testGroup:obj, crmMailing:FormController
         placeholder="example@example.org"
         />
     </div>
-    <button crm-icon="mail-closed" ng-disabled="crmMailing.$invalid || !testContact.email" ng-click="doSend({email: testContact.email})">{{ts('Send test')}}</button>
+    <button crm-icon="mail-closed" title="{{crmMailing.$invalid || !testContact.email ? ts('Complete all required fields first') : ts('Send test message to %1', {1: testContact.email})}}" ng-disabled="crmMailing.$invalid || !testContact.email" ng-click="doSend({email: testContact.email})">{{ts('Send test')}}</button>
   </div>
   <div class="preview-group" ng-form>
     <div>
@@ -55,7 +55,7 @@ Vars: mailing:obj, testContact:obj, testGroup:obj, crmMailing:FormController
         <option value=""></option>
       </select>
     </div>
-    <button crm-icon="mail-closed" ng-disabled="crmMailing.$invalid || !testGroup.gid" crm-confirm="{resizable: true, width: '40%', height: '40%', open: previewTestGroup}" on-yes="doSend({gid: testGroup.gid})">{{ts('Send test')}}</button>
+    <button crm-icon="mail-closed" title="{{crmMailing.$invalid || !testGroup.gid ? ts('Complete all required fields first') : ts('Send test message to group')}}"ng-disabled="crmMailing.$invalid || !testGroup.gid" crm-confirm="{resizable: true, width: '40%', height: '40%', open: previewTestGroup}" on-yes="doSend({gid: testGroup.gid})">{{ts('Send test')}}</button>
   </div>
   <div class="clear"></div>
 </div>
index f10a1388f9ffa7b540019ebcda54b53752d47cb7..aa4e8f0afff6d9bc974d5e0402d22fc13b538c13 100644 (file)
@@ -10,6 +10,6 @@
   <div class="crm-wizard-body" ng-transclude/>
   <div class="crm-wizard-buttons">
     <button crm-icon="triangle-1-w" ng-click="crmUiWizardCtrl.previous()" ng-show="!crmUiWizardCtrl.$first()">{{ts('Previous')}}</button>
-    <button crm-icon="triangle-1-e" ng-click="crmUiWizardCtrl.next()" ng-show="!crmUiWizardCtrl.$last()" ng-disabled="!crmUiWizardCtrl.$validStep()">{{ts('Next')}}</button>
+    <button crm-icon="triangle-1-e" title="{{!crmUiWizardCtrl.$validStep() ? ts('Complete all required fields first') : ts('Next step')}}" ng-click="crmUiWizardCtrl.next()" ng-show="!crmUiWizardCtrl.$last()" ng-disabled="!crmUiWizardCtrl.$validStep()">{{ts('Next')}}</button>
   </div>
 </div>