mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2025-12-30 13:07:55 -05:00
* Improve code style and PSR-12 compliance - refactored code formatting to adhere to PSR-12 guidelines - standardized coding conventions across the codebase - added missing framework files and reverted markup changes - reformatted arrays for enhanced readability - updated language files for consistent styling and clarity - minor miscellaneous improvements
47 lines
1.8 KiB
PHP
47 lines
1.8 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 } ?>
|