Files
WrenchBackOffice/application/views/bko/configure/extra/appfaq_form.php
T
CHIEFSOFT\ameye cd6c6c4e2b back office help
2024-02-03 08:16:13 -05:00

82 lines
2.3 KiB
PHP

<div class="panel-heading">
<b>App Help</b>
</div>
<form>
<div class="table-responsive">
<table class="table">
<tbody>
<?php
foreach ($faq_result as $row)
{
// echo $row->title;
// echo $row->name;
// echo $row->body;
// id | uid | icon | title | contents
?>
<tr>
<td style="width:50px;">
<?=$row->id?>
</td>
<td>
<table class="table table-striped">
<tbody>
<tr>
<td>
<input type="text" class="form-control" id="title<?=$row->id?>" name="title<?=$row->id?>" aria-describedby="titleHelp" placeholder="Enter Title" value="<?=$row->title?>">
</td>
</tr>
<tr>
<td>
<textarea class="form-control" id="msg<?=$row->id?>" name="msg<?=$row->id?>" rows="3"><?=$row->contents?></textarea>
</td>
</tr>
<tr>
<td>
<?=$row->uid?>
</td>
</tr>
<tr>
<td style="text-align:right;">
<div id='updt<?=$row->id?>'></div> <button type="button" class="btn btn-info" onclick="updaHelpFAQ('<?=$row->id?>','<?=$row->uid?>');">Update</button>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</form>
<script type="text/javascript">
<!--
function updaHelpFAQ(page_id, page_uid) {
let title= $('#title'+page_id).val();
let msg= $('#msg'+page_id).val();
// alert(title);
$.ajax({
url: "/confg/updateHelpfaq?faq_id=" + page_id + "&title=" + title + "&msg=" + msg +"&faq_uid="+page_uid
}).done(function (data) {
$('#updt'+page_id).html(data);
// $('#acc' + page_id).prop('disabled', false);
});
return false;
}
// -->
</script>