Last active
May 4, 2022 07:46
-
-
Save dpalou/3b83f817e825c5ac7512d2086a63353e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.saveData = (params) => { | |
this.CoreDomUtilsProvider.showModalLoading().then((modal) => { | |
params.vote = prep_data(); | |
this.CoreSitePluginsProviders.callWS('mod_vote_vote', params, {getFromCache: 0, saveToCache: 0}).then((result) => { | |
check_response(result); | |
}).catch((error) => { | |
this.CoreDomUtilsProvider.showErrorModalDefault(error, 'core.serverconnection', true); | |
}).finally(() => { | |
modal.dismiss(); | |
}); | |
}); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ion-button expand="full" (click)="saveData({id: <% id %>, type: <% type %})"> | |
{{ 'plugin.mod_vote.submit' | translate }} | |
</ion-button> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment