Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #375 from LiskHQ/373-close-delegate-registration-m…
Browse files Browse the repository at this point in the history
…odal

Hide modal in cancel method - Closes #373
  • Loading branch information
reyraa authored Jun 9, 2017
2 parents 2911aa2 + 53b7212 commit d6ea9b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/delegateRegistration/delegateRegistration.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import './delegateRegistration.less';
*/
app.component('delegateRegistration', {
template: require('./delegateRegistration.pug')(),
controller($scope, $mdDialog, delegateApi, Account, dialog, $rootScope) {
bindings: {
closeDialog: '&',
},
controller($scope, delegateApi, Account, dialog, $rootScope) {
function checkPendingRegistration() {
delegateApi.getDelegate({
username: $scope.username,
Expand Down Expand Up @@ -42,7 +45,7 @@ app.component('delegateRegistration', {
checkPendingRegistration();
});
$scope.reset(form);
$mdDialog.hide();
this.closeDialog();
});
})
.catch((error) => {
Expand Down Expand Up @@ -74,7 +77,7 @@ app.component('delegateRegistration', {
*/
$scope.cancel = (form) => {
$scope.reset(form);
// $mdDialog.hide();
this.closeDialog();
};
},
});

0 comments on commit d6ea9b0

Please sign in to comment.