<!-- email --> <?php if ($leyka_current_pm->is_field_supported('email')) { ?> <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label leyka-field email"> <input type="text" value="" id="leyka_donor_email" name="leyka_donor_email" class="required email mdl-textfield__input"> <label class="leyka-screen-reader-text mdl-textfield__label" for="leyka_donor_email">Ваш email</label> <span class="leyka_donor_email-error field-error mdl-textfield__error" id="leyka_donor_email-error"></span> </div> <?php } ?> <!-- pm fields --> <?php echo leyka_pf_get_pm_fields(); ?> <!-- agree --> <?php if ($leyka_current_pm->is_field_supported('agree')) { $agree_check_id = 'leyka_agree-' . $i; ?> <div class="leyka-field agree"> <label class="mdl-checkbox mdl-js-checkbox mdl-js-ripple-effect checkbox" for="<?php echo $agree_check_id; ?> "> <input type="checkbox" name="leyka_agree" id="<?php echo $agree_check_id; ?>
function leyka_currency_choice_action() { check_ajax_referer('leyka_payment_form', '_leyka_ajax_nonce'); if (empty($_POST['currency'])) { die('-1'); } $curr_currency = trim($_POST['currency']); $pm_selected = trim($_POST['current_pm']); $currently_active_pmethods = leyka_get_pm_list(true, $curr_currency); $curr_pm_is_active = false; foreach ($currently_active_pmethods as $pm) { if ($pm->id == $pm_selected) { $curr_pm_is_active = true; $pm_selected = $pm; break; } } if (!$curr_pm_is_active) { $pm_selected = reset($currently_active_pmethods); } leyka_setup_current_pm($pm_selected, $curr_currency); echo leyka_pf_get_hidden_fields((int) $_POST['campaign']); ?> <!-- pm selector --> <div id="pm-selector" class="form-part"> <ul class="leyka-pm-selector"> <?php foreach ($currently_active_pmethods as $pm) { ?> <li> <label class="radio"> <input type="radio" name="leyka_payment_method" value="<?php echo esc_attr($pm->full_id); ?> " <?php checked($pm_selected->id, $pm->id); ?> data-pm_id="<?php echo esc_attr($pm->id); ?> "> <?php echo $pm->label; ?> </label> </li> <?php } ?> </ul> </div> <!-- changeable area --> <div id="leyka-pm-data" class="changeable-fields form-part"> <div class="leyka-pm-fields"> <div class='leyka-user-data'> <!-- field for GA --> <input type="hidden" name="leyka_ga_payment_method" value="<?php echo esc_attr($curr_pm->label); ?> " /> <?php echo leyka_pf_get_name_field(); echo leyka_pf_get_email_field(); echo leyka_pf_get_pm_fields(); ?> </div> <?php echo leyka_pf_get_agree_field(); echo leyka_pf_get_submit_field(); $icons = leyka_pf_get_pm_icons(); if ($icons) { $list = array(); foreach ($icons as $i) { $list[] = "<li>{$i}</li>"; } echo "<ul class='leyka-pm-icons cf'>"; echo implode('', $list); echo "</ul>"; } ?> </div> <?php echo "<div class='leyka-pm-desc'>" . apply_filters('leyka_the_content', leyka_pf_get_pm_description()) . "</div>"; ?> </div> <?php die; }
<input name="leyka_ga_payment_method" value="<?php echo esc_attr($pm->label); ?> " type="hidden"> <input type='hidden' name="leyka_needy_id" value="<?php echo $needyId; ?> " /> <input type='hidden' name="leyka_needy_type" value="<?php echo $needyType; ?> " /> <div class='leyka-user-data'> <?php echo leyka_pf_get_name_field() . leyka_pf_get_email_field() . leyka_pf_get_pm_fields(); ?> </div> <?php echo leyka_pf_get_recurring_field() . leyka_pf_get_agree_field() . leyka_pf_get_submit_field(); $icons = leyka_pf_get_pm_icons(); if ($icons) { $list = array(); foreach ($icons as $i) { $list[] = "<li>{$i}</li>"; } echo '<ul class="leyka-pm-icons cf">' . implode('', $list) . '</ul>'; } ?>