-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #113 from ruthra-kumar/backport_clear_button
refactor: 'Clear' button on Razorpay settings
- Loading branch information
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
17 changes: 13 additions & 4 deletions
17
payments/payment_gateways/doctype/razorpay_settings/razorpay_settings.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,17 @@ | ||
// Copyright (c) 2016, Frappe Technologies and contributors | ||
// For license information, please see license.txt | ||
|
||
frappe.ui.form.on('Razorpay Settings', { | ||
refresh: function(frm) { | ||
|
||
} | ||
}); | ||
frappe.ui.form.on("Razorpay Settings", { | ||
refresh: function (frm) { | ||
frm.add_custom_button(__("Clear"), function () { | ||
frm.call({ | ||
doc: frm.doc, | ||
method: "clear", | ||
callback: function (r) { | ||
frm.refresh(); | ||
}, | ||
}); | ||
}); | ||
}, | ||
}); |
This file contains 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