PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / trunk
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More vtrunk
2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 All 66 releases
better-payment / includes / Admin / views / partials / custom-dropdown.php

custom-dropdown.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More trunk, at includes/Admin/views/partials/custom-dropdown.php

34 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 $inputFieldName = !empty($inputFieldName) ? $inputFieldName : 'status'; //demo_name
3 $inputFieldLabel = !empty($inputFieldLabel) ? $inputFieldLabel : 'Status'; //Demo Name
4 $dropdownDefaultValue = !empty($dropdownDefaultValue) ? $dropdownDefaultValue : ''; //demo-name
5 $dropdownItems = !empty($dropdownItems) ? $dropdownItems :
6 array(
7 //'value' => 'Label',
8 'all' => 'All',
9 'active' => 'Active',
10 'inactive' => 'Inactive',
11 );
12
13 ?>
14 <div class="bp-select-custom-button-wrap">
15 <button class="button fix-style fix-common bp-select-custom-button" data-target=".<?php esc_attr_e($inputFieldName, 'better-payment'); ?>-dropdown">
16 <span class="mr-2 <?php esc_attr_e($inputFieldName, 'better-payment'); ?>-button-text"><?php esc_html_e($inputFieldLabel, 'better-payment'); ?></span>
17 <svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg">
18 <path d="M7.99896 0L4.63636 3.41372L1.27377 0L0 1.29314L4.63636 6L9.27273 1.29314L7.99896 0Z" fill="#9095A2" />
19 </svg>
20 </button>
21
22 <div class="box bp-select-custom-button-dropdown is-hidden <?php esc_attr_e($inputFieldName, 'better-payment'); ?>-dropdown" <?php if(!empty($dropdownDefaultValue)): ?>data-defaultvalue='<?php esc_attr_e($dropdownDefaultValue, 'better-payment') ?>' <?php endif; ?> >
23 <?php if (count($dropdownItems)) : ?>
24 <?php foreach ($dropdownItems as $inputValue => $inputLabel) : ?>
25 <p class="mb-3">
26 <label class="checkbox">
27 <input class="<?php esc_attr_e($inputFieldName, 'better-payment'); ?>-<?php esc_attr_e($inputValue, 'better-payment'); ?>" <?php if($dropdownDefaultValue === $inputValue) : ?> checked <?php endif; ?> type="checkbox" name="<?php esc_attr_e($inputFieldName, 'better-payment'); ?>[]" value="<?php esc_attr_e($inputValue, 'better-payment'); ?>">
28 <?php esc_html_e($inputLabel, 'better-payment'); ?>
29 </label>
30 </p>
31 <?php endforeach; ?>
32 <?php endif; ?>
33 </div>
34 </div>