Skip to content

Commit

Permalink
linting: template and JS
Browse files Browse the repository at this point in the history
  • Loading branch information
semteacher committed Oct 9, 2024
1 parent cf29dcf commit 094ec95
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 3 deletions.
2 changes: 1 addition & 1 deletion amd/src/gateways_modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import {
*
* @returns {Promise<Modal>}
*/
const showModalWithPlaceholder = async () => {
const showModalWithPlaceholder = async() => {
const modal = await ModalFactory.create({
body: await Templates.render('paygw_mpay24/mpay24_button_placeholder', {})
});
Expand Down
41 changes: 39 additions & 2 deletions templates/paymentoptions.mustache
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template paygw_mpay24/paymentoptions
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* none
Example context (json):
{
"component": "mpay24",
"paymentarea": "main",
"itemid": "1",
"tid": "dsafsadf353cbcbDSFDS423"
}

}}
<div>
<div class="row" style="margin-top: 30px;">
<div class="col">
Expand All @@ -22,11 +59,11 @@

{{#js}}
require(['jquery', 'paygw_mpay24/redirectpayment'], function($, redirectpayment) {
$('#more').click(function(e) {
$('#more').click(function() {
redirectpayment.init('{{component}}',
'{{paymentarea}}',
'{{itemid}}',
'{{tid}}');
})
});
});
{{/js}}

0 comments on commit 094ec95

Please sign in to comment.