Skip to content

Commit

Permalink
Add in new classe to buttons in CiviMail Interface to allow them to b…
Browse files Browse the repository at this point in the history
…e themed up independantly by themes
  • Loading branch information
seamuslee001 committed Apr 28, 2018
1 parent 1dcce95 commit 9f4bf5e
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 15 deletions.
4 changes: 2 additions & 2 deletions ang/crmMailing/BlockPreview.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
crm-multiple-email
/>
</div>
<button crm-icon="fa-paper-plane" 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>
<button crm-icon="fa-paper-plane" 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})" class="crmMailing-btn-primary">{{ts('Send test')}}</button>
</div>
<div class="preview-group" ng-form="">
<div>
Expand All @@ -51,7 +51,7 @@
class="crm-action-menu fa-envelope-o"
/>
</div>
<button crm-icon="fa-paper-plane" 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>
<button crm-icon="fa-paper-plane" 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})" class="crmMailing-btn-primary">{{ts('Send test')}}</button>
</div>
<div class="clear"></div>
</div>
5 changes: 3 additions & 2 deletions ang/crmMailing/EditMailingCtrl/2step.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<div crm-mailing-block-schedule crm-mailing="mailing"></div>
</div>
<center>
<a class="button crmMailing-submit-button" ng-click="submit()" ng-class="{blocking: block.check(), disabled: crmMailingSubform.$invalid}">
<a class="button crmMailing-submit-button crmMailing-btn-primary" ng-click="submit()" ng-class="{blocking: block.check(), disabled: crmMailingSubform.$invalid}">
<div>{{ts('Submit Mailing')}}</div>
</a>
</center>
Expand All @@ -52,10 +52,11 @@
<button
crm-icon="fa-trash"
ng-show="checkPerm('delete in CiviMail')"
class="crmMailing-btn-danger-outline"
ng-disabled="block.check()"
crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}"
on-yes="delete()">{{ts('Delete Draft')}}</button>
<button crm-icon="fa-floppy-o" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
<button crm-icon="fa-floppy-o" ng-disabled="block.check()" ng-click="save().then(leave)" class="crmMailing-btn-secondary-outline">{{ts('Save Draft')}}</button>
</span>
</div>
</div>
Expand Down
5 changes: 3 additions & 2 deletions ang/crmMailing/EditMailingCtrl/unified.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@
<div crm-mailing-block-schedule crm-mailing="mailing"></div>
</div>

<button crm-icon="fa-paper-plane" ng-disabled="block.check() || crmMailingSubform.$invalid" ng-click="submit()">{{ts('Submit Mailing')}}</button>
<button crm-icon="fa-floppy-o" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
<button crm-icon="fa-paper-plane" class="crmMailing-btn-primary" ng-disabled="block.check() || crmMailingSubform.$invalid" ng-click="submit()">{{ts('Submit Mailing')}}</button>
<button crm-icon="fa-floppy-o" class="crmMailing-btn-secondary-outline" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
<button
crm-icon="fa-trash"
ng-show="checkPerm('delete in CiviMail')"
class="crmMailing-btn-danger-outline"
ng-disabled="block.check()"
crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}"
on-yes="delete()">{{ts('Delete Draft')}}</button>
Expand Down
5 changes: 3 additions & 2 deletions ang/crmMailing/EditMailingCtrl/unified2.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@
<div crm-mailing-block-schedule crm-mailing="mailing"></div>
</div>

<button crm-icon="fa-paper-plane" ng-disabled="block.check() || crmMailingSubform.$invalid" ng-click="submit()">{{ts('Submit Mailing')}}</button>
<button crm-icon="fa-floppy-o" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
<button crm-icon="fa-paper-plane" class="crmMailing-btn-primary" ng-disabled="block.check() || crmMailingSubform.$invalid" ng-click="submit()">{{ts('Submit Mailing')}}</button>
<button crm-icon="fa-floppy-o" class="crmMailing-secondary-outline" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
<button
crm-icon="fa-trash"
ng-show="checkPerm('delete in CiviMail')"
class="crmMailing-btn-danger-outline"
ng-disabled="block.check()"
crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}"
on-yes="delete()">{{ts('Delete Draft')}}</button>
Expand Down
5 changes: 3 additions & 2 deletions ang/crmMailing/EditMailingCtrl/wizard.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div crm-mailing-block-review crm-mailing="mailing" crm-mailing-attachments="attachments"></div>
</div>
<center>
<a class="button crmMailing-submit-button" ng-click="submit()" ng-class="{blocking: block.check(), disabled: crmMailingSubform.$invalid}">
<a class="button crmMailing-submit-button crmMailing-btn-primary" ng-click="submit()" ng-class="{blocking: block.check(), disabled: crmMailingSubform.$invalid}">
<div>{{ts('Submit Mailing')}}</div>
</a>
</center>
Expand All @@ -55,10 +55,11 @@
<button
crm-icon="fa-trash"
ng-show="checkPerm('delete in CiviMail')"
class="crmMailing-btn-danger-outline"
ng-disabled="block.check()"
crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}"
on-yes="delete()">{{ts('Delete Draft')}}</button>
<button crm-icon="fa-floppy-o" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
<button crm-icon="fa-floppy-o" class="crmMailing-btn-secondary-outline" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
</span>
</div>
</div>
Expand Down
7 changes: 4 additions & 3 deletions ang/crmMailing/EditMailingCtrl/workflow.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
<div crm-mailing-block-approve crm-mailing="mailing"></div>
</div>
<center ng-if="!checkPerm('approve mailings') && !checkPerm('access CiviMail')">
<a class="button crmMailing-submit-button" ng-click="submit()" ng-class="{blocking: block.check(), disabled: crmMailingSubform.$invalid}">
<a class="button crmMailing-submit-button crmMailing-btn-primary" ng-click="submit()" ng-class="{blocking: block.check(), disabled: crmMailingSubform.$invalid}">
<div>{{ts('Submit Mailing')}}</div>
</a>
</center>
<center ng-if="checkPerm('approve mailings') || checkPerm('access CiviMail')">
<a class="button crmMailing-submit-button" ng-click="approve('Approved')" ng-class="{blocking: block.check(), disabled: crmMailingSubform.$invalid}">
<a class="button crmMailing-submit-button crmMailing-btn-primary" ng-click="approve('Approved')" ng-class="{blocking: block.check(), disabled: crmMailingSubform.$invalid}">
<div>{{ts('Submit and Approve Mailing')}}</div>
</a>
</center>
Expand All @@ -62,10 +62,11 @@
<button
crm-icon="fa-trash"
ng-show="checkPerm('delete in CiviMail')"
class="crmMailing-btn-danger-outline"
ng-disabled="block.check()"
crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}"
on-yes="delete()">{{ts('Delete Draft')}}</button>
<button crm-icon="fa-floppy-o" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
<button crm-icon="fa-floppy-o" ng-disabled="block.check()" ng-click="save().then(leave)" class="crmMailing-btn-secondary">{{ts('Save Draft')}}</button>
</span>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions ang/crmUi/wizard.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</ul>
<div class="crm-wizard-body" ng-transclude></div>
<div class="crm-wizard-buttons">
<button crm-icon="fa-chevron-left" ng-click="crmUiWizardCtrl.previous()" ng-show="!crmUiWizardCtrl.$first()">{{ts('Previous')}}</button>
<button crm-icon="fa-chevron-right" 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>
<button crm-icon="fa-chevron-left" ng-click="crmUiWizardCtrl.previous()" ng-show="!crmUiWizardCtrl.$first()" class="btn btn-primary">{{ts('Previous')}}</button>
<button crm-icon="fa-chevron-right" title="{{!crmUiWizardCtrl.$validStep() ? ts('Complete all required fields first') : ts('Next step')}}" ng-click="crmUiWizardCtrl.next()" ng-show="!crmUiWizardCtrl.$last()" ng-disabled="!crmUiWizardCtrl.$validStep()" class="btn btn-primary">{{ts('Next')}}</button>
</div>
</div>

0 comments on commit 9f4bf5e

Please sign in to comment.