Skip to content
Snippets Groups Projects

Drupal 10 compatibility

Closed durum requested to merge issue/paytr_payment-3467122:3467122-drupal-10-compatibility into 9.1.x
4 files
+ 8
6
Compare changes
  • Side-by-side
  • Inline
Files
4
(function ($, Drupal, drupalSettings) {
(function ($, Drupal, drupalSettings, once) {
'use strict';
Drupal.behaviors.offsiteForm = {
attach: function (context) {
let data = JSON.parse(drupalSettings.paytr_payment_iframe);
$($(context).find('#paytr-payment-checkout')).append('<iframe src="https://www.paytr.com/odeme/guvenli/'+data.token+'" id="paytriframe" frameBorder="0" scrolling="no" style="width: 100%;"></iframe><script>iFrameResize({},\'#paytriframe\');</script>');
once('offsiteForm', '#paytr-payment-checkout', context).forEach(function (element) {
$(element).append('<iframe src="https://www.paytr.com/odeme/guvenli/' + data.token + '" id="paytriframe" frameBorder="0" scrolling="no" style="width: 100%;"></iframe><script>iFrameResize({},\'#paytriframe\');</script>');
});
}
};
}(jQuery, Drupal, drupalSettings));
}(jQuery, Drupal, drupalSettings, once));
Loading