40 lines
1.9 KiB
PHP
40 lines
1.9 KiB
PHP
<div class="modal fade" id="select-columns" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog" role="document">
|
|
<div class="modal-content">
|
|
<form action="?select-columns" method="post">
|
|
@csrf
|
|
<div class="modal-header">
|
|
<h5 class="modal-title" id="exampleModalLabel"><?php echo e2("Select Column") ?></h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<?php
|
|
$excepts = ['id'];
|
|
$selectedColumns = $columns;
|
|
if(isset($_SESSION['select-columns'][$tableName])) {
|
|
$selectedColumns = $_SESSION['select-columns'][$tableName];
|
|
}
|
|
|
|
foreach($columns AS $column) {
|
|
|
|
?>
|
|
@if(!in_array($column, $excepts))
|
|
<label><input type="checkbox" name="column[]"
|
|
@if(in_array($column, $selectedColumns))
|
|
checked
|
|
@endif
|
|
value="{{$column}}" id=""> {{e2($column)}}</label> <br>
|
|
@endif
|
|
<?php
|
|
} ?>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo e2("Close") ?></button>
|
|
<button type="submit" class="btn btn-primary save"><?php echo e2("Save changes") ?></button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|