<commit_before><?php
    if (!function_exists('clean_echo'))
    {
        function clean_echo ($string)
        {
            echo htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
        }
    }
?>

<div class="checkout-content">
    <form action="<?php echo clean_echo($action) ?>" method="post" id="mollie_payment_form">

        <div class="buttons">
			<?php if (!empty($issuers)) { ?>
			<div class="left pull-left">
				<label style="width:auto !important">
					<img src="https://www.mollie.com/images/payscreen/methods/ideal.png" width="20" style="float:left; margin-right:0.5em; margin-top:-3px" />
					<strong><?php clean_echo($text_issuer) ?>:</strong>

					<select name="mollie_issuer" style="margin-left:1em" id="mollie_issuers">
						<option value="">&mdash;</option>
						<?php foreach ($issuers as $issuer) { ?>
						<option value="<?php clean_echo($issuer->id) ?>"><?php clean_echo($issuer->name) ?></option>
						<?php } ?>
					</select>
				</label>
			</div>
			<?php } ?>
            <div class="right pull-right">
                <input type="submit" value="<?php echo $message->get('button_confirm') ?>" id="button-confirm" class="button btn btn-primary" form="mollie_payment_form">
            </div>
        </div>

		<script type="text/javascript">
			(function ($)
			{
				// Run after pageload.
				$(function ()
				{
					var issuers               = $("#mollie_issuers"),
						confirm_button_exists = ($("#qc_confirm_order").length > 0);

					if (issuers.find("option").length == 1)
					{
						$.post("<?php clean_echo ($set_issuer_url) ?>", {mollie_issuer_id:issuers.val()});
					}

					issuers.bind("change", function() {
						$.post("<?php clean_echo ($set_issuer_url) ?>", {mollie_issuer_id:$(this).val()});
					});

					// See if we can find a a confirmation button on the page (i.e. ajax checkouts).
					if (confirm_button_exists)
					{
						// If we have issuers, show the form.
						if (issuers.length)
						{
							$("#mollie_payment_form").parent().show();
						}

						return;
					}

					// No confirmation button found. Show our own confirmation button.
					$("#button-confirm").show();

					$("#button-confirm").click(function ()
					{
						$("#mollie_payment_form").submit();
					});
				});
			}) (window.jQuery || window.$);
		</script>
    </form>
</div>
<commit_msg>Show order confirmation button form<commit_after><?php
    if (!function_exists('clean_echo'))
    {
        function clean_echo ($string)
        {
            echo htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
        }
    }
?>

<div class="checkout-content">
    <form action="<?php echo clean_echo($action) ?>" method="post" id="mollie_payment_form">

        <div class="buttons">
			<?php if (!empty($issuers)) { ?>
			<div class="left pull-left">
				<label style="width:auto !important">
					<img src="https://www.mollie.com/images/payscreen/methods/ideal.png" width="20" style="float:left; margin-right:0.5em; margin-top:-3px" />
					<strong><?php clean_echo($text_issuer) ?>:</strong>

					<select name="mollie_issuer" style="margin-left:1em" id="mollie_issuers">
						<option value="">&mdash;</option>
						<?php foreach ($issuers as $issuer) { ?>
						<option value="<?php clean_echo($issuer->id) ?>"><?php clean_echo($issuer->name) ?></option>
						<?php } ?>
					</select>
				</label>
			</div>
			<?php } ?>
            <div class="right pull-right">
                <input type="submit" value="<?php echo $message->get('button_confirm') ?>" id="button-confirm" class="button btn btn-primary" form="mollie_payment_form">
            </div>
        </div>

		<script type="text/javascript">
			(function ($)
			{
				// Run after pageload.
				$(function ()
				{
					var issuers               = $("#mollie_issuers"),
						confirm_button_exists = ($("#qc_confirm_order").length > 0);

					if (issuers.find("option").length == 1)
					{
						$.post("<?php clean_echo ($set_issuer_url) ?>", {mollie_issuer_id:issuers.val()});
					}

					issuers.bind("change", function() {
						$.post("<?php clean_echo ($set_issuer_url) ?>", {mollie_issuer_id:$(this).val()});
					});

					// See if we can find a a confirmation button on the page (i.e. ajax checkouts).
					if (confirm_button_exists)
					{
						// If we have issuers, show the form.
						if (issuers.length)
						{
							$("#mollie_payment_form").parent().show();
						}

						return;
					}

					// No confirmation button found. Show our own confirmation button.
					$("#button-confirm").show();

					// on some opencarts the whole form is not displayed. so show form if not visible.
					if ($("div.checkout-content").css('display') == "none")
					{
						$("div.checkout-content").show();
					}

					$("#button-confirm").click(function ()
					{
						$("#mollie_payment_form").submit();
					});
				});
			}) (window.jQuery || window.$);
		</script>
    </form>
</div>

{'fraction_non_alphanumeric': 0.18963414634146342, 'fraction_numerical': 0.003658536585365854, 'mean_word_length': 2.747905559786748, 'pattern_counts': {'":': 0, '<': 75, '<?xml version=': 0, '>': 83, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '418787', 'n_tokens_mistral': 2014, 'n_tokens_neox': 1621, 'n_words': 315}