fields.php 5.65 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
<?php
global $fields;

/** General Settings **/
$fields['settings_general']['general'][] = array(
    'id'      =>  WC_QD_DB.'redirect_user',
    'type'    => 'select',
    'label'   => __( 'Redirect User To', WC_QD_TXT),
    'desc'    => __( 'After Donation Added To Cart',WC_QD_TXT),
    'size '   => 'small',
11
    'options' => array('cart' => __('Cart Page',WC_QD_TXT) , 'checkout' => __('Checkout Page',WC_QD_TXT)),
12 13 14
    'attr'    => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')
);

15 16 17 18 19 20 21
/** General Settings **/
$fields['settings_general']['general'][] = array(
    'id'      =>  WC_QD_DB.'already_exist_redirect_user',
    'type'    => 'select',
    'label'   => __( 'Donation Exist Redirect', WC_QD_TXT),
    'desc'    => __( 'Redirect User When Donation Already Exist In Cart',WC_QD_TXT),
    'size '   => 'small',
22
    'options' => array('cart' => __('Cart Page',WC_QD_TXT) , 'checkout' => __('Checkout Page',WC_QD_TXT)),
23 24 25
    'attr'    => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')
);

26 27 28 29 30 31 32 33
$fields['settings_general']['general'][] = array(
	'label'    => __( 'Donation Payment Gateway', WC_QD_TXT),
	'desc'     => __( 'Select Payment gateway for users to pay for donation',WC_QD_TXT),
	'id'       =>  WC_QD_DB.'payment_gateway',
    'type'     => 'select',
    'attr'     => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;','multiple'=> 'multiple'),
    'multiple' => true, 
    'options'  => WC_QD()->f()->get_admin_pay_gate()
34
); 
35 36 37

/** Message Settings **/
$fields['settings_message']['message'][] =  array(
38 39 40
	'desc'  => sprintf(__( '<span> Add <code>%s</code> To Get Ented Amount By User.</span>  <br/>
               <span> Add <code>%s</code> To Get Minimum Required Amount From Selected Project </span>   <br/>
               <span> Add <code>%s</code> To Get Minimum Required Amount From Selected Project  </span>',WC_QD_TXT),'{donation_amount}','{min_amount}','{max_amount}'),
41
	'id'    =>  WC_QD_DB.'empty_donation_msg_1',
42
    'attr'  => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
43 44 45 46
	'type'  => 'content'
);


47 48 49 50
$fields['settings_message']['message'][] =  array(
	'label' => __( 'Donation Conflict', WC_QD_TXT),
	'desc'  => __( 'Custom Message To Show When User Trying To Add Donation With Other Products',WC_QD_TXT),
	'id'    =>   WC_QD_DB.'donation_with_other_products',
51
    'attr'  => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
52 53 54
	'type'  => 'textarea'
);

55 56 57 58
$fields['settings_message']['message'][] =  array(
	'label' => __( 'Empty Donation Amount', WC_QD_TXT),
	'desc'  => __( 'Custom Message To Show When Empty Donation Entered',WC_QD_TXT),
	'id'    =>   WC_QD_DB.'empty_donation_msg',
59
    'attr'  => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
60 61
	'type'  => 'textarea'
);
Varun Sridharan's avatar
Varun Sridharan committed
62 63 64 65 66

$fields['settings_message']['message'][] = array(
	'label'     => __( 'Donation Already Exist', WC_QD_TXT),
	'desc'     => __( 'Custom Message To Show When User Trying To Add Another Donation To Cart',WC_QD_TXT),
	'id'       =>  WC_QD_DB.'donation_already_exist',
67
	'attr'  => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
Varun Sridharan's avatar
Varun Sridharan committed
68 69 70 71
	'type'     => 'textarea',
	
);

72 73 74 75
$fields['settings_message']['message'][] =  array(
	'label' => __( 'Invalid Donation Amount', WC_QD_TXT),
	'desc'  => __( 'Custom Message To Show When Invalid Donation Entered',WC_QD_TXT),
	'id'    =>  WC_QD_DB.'invalid_donation_msg',
76
    'attr'  => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
77 78 79 80 81 82 83
	'type'  => 'textarea'
);
 
$fields['settings_message']['message'][] =  array(
	'label' => __( 'Minimum Required Donation Amount', WC_QD_TXT),
	'desc'  => __( 'Custom Message To Show When Minimum Required Donation Not Entered',WC_QD_TXT),
	'id'    =>  WC_QD_DB.'min_rda_msg',
84
    'attr'  => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
85 86 87 88 89 90 91
	'type'  => 'textarea'
);

$fields['settings_message']['message'][] =  array(
	'label' =>__( 'Maximum Required Donation Amount', WC_QD_TXT),
	'desc'  => __( 'Custom Message To Show When Maximum Required Donation Not Entered ',WC_QD_TXT),
	'id'    =>  WC_QD_DB.'max_rda_msg',
92
    'attr'  => array('style' => 'min-width:50%; width:auto;max-width:75%;'),
93
	'type'  => 'textarea'
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
);


/** Shortcode Settings **/
$fields['settings_shortcode']['shortcode'][] = array(
	'id'      =>  WC_QD_DB.'default_render_type',
    'type'    => 'select',
    'label'   => __( 'Pre Selected Project Name', WC_QD_TXT),
    'desc'    => __( 'default project render type',WC_QD_TXT),
    'size '   => 'small',
    'options' => array('select' => __('Select Box',WC_QD_TXT), 'radio' => __('Radio Button',WC_QD_TXT)),
    'attr'    => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')		
);

$fields['settings_shortcode']['shortcode'][] = array(
	'id'      =>  WC_QD_DB.'shortcode_show_errors',
    'type'    => 'select',
    'label'   => __( 'Show Errors', WC_QD_TXT),
    'desc'    => __( 'Set to hide errors when <code> wc_print_notice</code> called before loading dontion form',WC_QD_TXT),
    'size '   => 'small',
    'options' => array('true' => __('Show Errors',WC_QD_TXT), 'false' => __('Hide Errors',WC_QD_TXT)),
    'attr'    => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')		
);


$fields['settings_shortcode']['shortcode'][] = array(
	'id'      =>  WC_QD_DB.'pre_selected_project',
    'type'    => 'select',
    'label'   => __( 'Pre Selected Project Name', WC_QD_TXT),
    'desc'    => __( 'this value will be selected in donation project box',WC_QD_TXT),
    'size '   => 'small',
    'options' => WC_QD()->f()->get_porject_list(),
    'attr'    => array('class' => 'wc-enhanced-select','style' => 'width:auto;max-width:35%;')		
);
//WC_QD()->f()->get_porject_list()
?>