Files
dev-chiefworks f76abffdcd first commit
2022-05-31 16:21:53 -04:00

110 lines
4.1 KiB
PHP

<div class="row">
<div class="col-lg-8">
<!-- Media library -->
<div class="panel panel-white">
<form class="search-block" action="/Descision/personaltycards/" method="GET" autocomplete="off">
<div class="search-block-item">
<div class="form-group">
<label for="dkey">Dkey</label>
<input type="search" class="form-control" id="dkey" name="dkey" value='<?= isset($dkey) ? $dkey : '' ?>'>
</div>
<div class="form-group">
<label for="search_text">Status</label>
<?= $card_status ?>
</div>
<div class="form-group">
<label for="title">Description</label>
<input type="search" class="form-control" id="description" name="description" value='<?= isset($description) ? $description : '' ?>'>
</div>
<div class="form-group">
<label for="search_text">Personality</label>
<input type="search" class="form-control" id="personality" name="personality" value='<?= isset($personality) ? $personality : '' ?>'>
</div>
<div class="form-group">
<button class="btn btn-primary btn-search" type="submit">Search</button>
</div>
</div>
</form>
</div>
<?= $link ?>
<div class="panel panel-white">
<table class='table table-striped table-hover table-bordered table-condensed' style='font-size:10px;'>
<thead class='bg-teal'>
<tr>
<th style="width:50px">ID</th>
<th style="width:50px">Lorder</th>
<th style="width:50px">Dkey</th>
<th style="width:50px">Status</th>
<th>Description</th>
<th>Personality</th>
</tr>
</thead>
<tbody>
<? foreach ($pers_data as $row) { ?>
<tr style="background-color:lightgreen;">
<td><?=$row['id']?></td>
<td><?=$row['lorder']?></td>
<td><?=$row['dkey']?></td>
<td><?=$row['status']?></td>
<td><?=$row['description']?></td>
<td><?=$row["personality"]?></td>
</tr>
<tr>
<td colspan="6">
<table>
<td><?= $row["card_list"] ?></td>
<td><?= $row["card_group"] ?></td>
<td><?= $row["card_country"] ?></td>
</table>
</td>
</tr>
<? } ?>
</tbody>
</table>
</div>
<!-- /media library -->
</div>
<div class="col-lg-4">
</div>
</div>
<script type="text/javascript">
function updatePersonaltyName(id, dkey) {
// alert(card_id);
var result = confirm("Continue saving prsonality text ? ");
if (result) {
//alert(110);
var pers_text = "txt" + dkey;
var pers_text_value = document.getElementById(pers_text).value;
alert(pers_text_value);
//Logic to delete the item
$.ajax({
url: "/descision/updatePersonaltyName?id=" + id + "&pers_text=" + pers_text_value + "&dkey=" + dkey
}).done(function (data) {
$('#pres' + dkey).html(data);
//alert(data);
});
}
return false;
}
</script>
<style>
.search-block-item {
display: flex;
justify-content: space-around;
align-items: flex-end;
}
</style>