mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-01-18 22:38:00 -05:00
- Replaced TRUE/FALSE constants with true/false keywords - Replaced NULL constant with null keyword - Replaced `<?php echo` in views with shortened `<?=` - Added missing variable declaration - Added missing function return type in declaration - replaced `== true`, `== false`, `=== true` and `=== false` in if statements with simplified forms
47 lines
1.6 KiB
PHP
47 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
* @var array $customer_rewards
|
|
*/
|
|
?>
|
|
<?php
|
|
$i = 0;
|
|
|
|
foreach($customer_rewards as $reward_key => $reward_category)
|
|
{
|
|
$customer_reward_id = $reward_category['package_id'];
|
|
$customer_reward_name = $reward_category['package_name'];
|
|
$customer_points_percent = $reward_category['points_percent'];
|
|
++$i;
|
|
?>
|
|
<div class="form-group form-group-sm" style="<?= $reward_category['deleted'] ? 'display:none;' : 'display:block;' ?>">
|
|
<?= form_label(lang('Config.customer_reward') . " $i", "customer_reward_$i", ['class' => 'required control-label col-xs-2']) ?>
|
|
<div class='col-xs-2'>
|
|
<?php $form_data = [
|
|
'name' => 'customer_reward_' . $customer_reward_id,
|
|
'id' => 'customer_reward_' . $customer_reward_id,
|
|
'class' => 'customer_reward valid_chars form-control input-sm required',
|
|
'value' => $customer_reward_name
|
|
];
|
|
$reward_category['deleted'] && $form_data['disabled'] = 'disabled';
|
|
echo form_input($form_data);
|
|
?>
|
|
</div>
|
|
<div class='col-xs-2'>
|
|
<?php $form_data = [
|
|
'name' => 'reward_points_' . $customer_reward_id,
|
|
'id' => 'reward_points_' . $customer_reward_id,
|
|
'class' => 'customer_reward valid_chars form-control input-sm required',
|
|
'value' => $customer_points_percent
|
|
];
|
|
$reward_category['deleted'] && $form_data['disabled'] = 'disabled';
|
|
echo form_input($form_data);
|
|
?>
|
|
</div>
|
|
<span class="add_customer_reward glyphicon glyphicon-plus" style="padding-top: 0.5em;"></span>
|
|
<span> </span>
|
|
<span class="remove_customer_reward glyphicon glyphicon-minus" style="padding-top: 0.5em;"></span>
|
|
</div>
|
|
<?php
|
|
}
|
|
?>
|