mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-04-04 07:12:48 -04:00
- Fix string interpolation in data-href attributes (use double quotes for PHP variable interpolation) - Add missing name attributes to message_config.php form inputs (msg_uid, msg_pwd, msg_src) - Fix HTML tag mismatch in profile.php (</a> to </button>) - Add modal-dlg class to buttons for proper modal dialog handling - Add missing IDs for delete/generate_barcodes buttons in item_kits/manage.php - Fix esc() wrapping around lang() calls where inappropriate - Fix disabled attribute rendering in dinner_tables.php - Fix date format bug in daterangepicker.php (use timeformat instead of dateformat for time component) - Fix JavaScript selector fallback logic in bs-tab_anchor_linking.js - Add Bootstrap guard in bs-tooltips.js to prevent errors when Bootstrap JS is not loaded
58 lines
1.9 KiB
PHP
58 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* @var string $controller_name
|
|
* @var string $table_headers
|
|
* @var array $config
|
|
*/
|
|
?>
|
|
|
|
<?= view('partial/header') ?>
|
|
|
|
<?php
|
|
$title_info['config_title'] = 'Item Kits';
|
|
echo view('configs/config_header', $title_info);
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
<?= view('partial/bootstrap_tables_locale') ?>
|
|
|
|
table_support.init({
|
|
resource: '<?= esc($controller_name) ?>',
|
|
headers: <?= $table_headers ?>,
|
|
pageSize: <?= $config['lines_per_page'] ?>,
|
|
uniqueId: 'item_kit_id'
|
|
});
|
|
|
|
$('#generate_barcodes').click(function() {
|
|
window.open(
|
|
'index.php/item_kits/generateBarcodes/' + table_support.selected_ids().join(':'),
|
|
'_blank' // <- This is what makes it open in a new window.
|
|
);
|
|
});
|
|
});
|
|
</script>
|
|
|
|
<div class="d-flex gap-2 justify-content-end">
|
|
<button type="button" class="btn btn-primary modal-dlg" data-btn-submit="<?= esc(lang('Common.submit')) ?>" data-href="<?= esc("$controller_name/view") ?>" title="<?= esc(lang(ucfirst($controller_name) . '.new')) ?>">
|
|
<i class="bi bi-tags me-2"></i><?= lang(ucfirst($controller_name) .".new") ?>
|
|
</button>
|
|
</div>
|
|
|
|
<div id="toolbar">
|
|
<div class="d-flex gap-2">
|
|
<button type="button" class="btn btn-secondary" id="delete">
|
|
<i class="bi bi-trash"></i><span class="d-none d-sm-inline ms-2"><?= lang('Common.delete') ?></span>
|
|
</button>
|
|
<button type="button" class="btn btn-secondary" id="generate_barcodes" data-href="<?= esc($controller_name . '/generateBarcodes') ?>" title="<?= esc(lang('Items.generate_barcodes')) ?>">
|
|
<i class="bi bi-upc-scan"></i><span class="d-none d-sm-inline ms-2"><?= lang('Items.generate_barcodes') ?></span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="table_holder">
|
|
<table id="table"></table>
|
|
</div>
|
|
|
|
<?= view('partial/footer') ?>
|