Skip to content

Commit

Permalink
feat(debtor groups): put a cancel button (#1527)
Browse files Browse the repository at this point in the history
This commit puts a cancel button on the debtor groups page to increase familiarity by users.
  • Loading branch information
lomamech authored and jniles committed Apr 20, 2017
1 parent 2f2cb6d commit 0a708fb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion client/src/modules/debtors/groups.update.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,13 @@
</label>
</div>

<!-- <button class="btn btn-default">Cancel</button> -->
<button data-method="submit" type="submit" ng-click="GroupUpdateCtrl.submit(debtorGroup)" class="btn btn-primary">
{{ "FORM.BUTTONS.SUBMIT" | translate }}
</button>

<button data-method="cancel" class="btn btn-default" type="button" ng-click="GroupUpdateCtrl.cancel()" data-method="cancel" translate>
FORM.BUTTONS.CANCEL
</button>
</div>
</div>
</div>
Expand Down
5 changes: 5 additions & 0 deletions client/src/modules/debtors/groups.update.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function DebtorGroupsUpdateController($state, DebtorGroups, Accounts, Prices, Sc

vm.$loading = true;
vm.$loaded = false;
vm.cancel = cancel;

vm.deleteGroup = deleteGroup;

Expand Down Expand Up @@ -77,6 +78,10 @@ function DebtorGroupsUpdateController($state, DebtorGroups, Accounts, Prices, Sc
.catch(Notify.handleError);
}

function cancel(){
$state.go('debtorGroups.list');
}

function billingServiceSubscriptions() {
var modal = DebtorGroups.manageBillingServices(vm.group);
modal.result
Expand Down

0 comments on commit 0a708fb

Please sign in to comment.