56 lines
1.4 KiB
PHP
56 lines
1.4 KiB
PHP
|
|
<?php
|
|
$query = db("welder_test_plans")->where("hash",get("hash"))->orderBy("id","DESC")->first();
|
|
$color = "#fff";
|
|
if($query) {
|
|
$color = $query->color;
|
|
}
|
|
|
|
|
|
|
|
if(getisset("update")) {
|
|
$post = $_POST;
|
|
unset($post['_token']);
|
|
$post['user_id'] = u()->id;
|
|
ekle2($post,"welder_test_plans");
|
|
?>
|
|
<?php
|
|
exit();
|
|
} ?>
|
|
<form action="?ajax=welder-test-plan-detail&hash={{get("hash")}}&update" method="post" class="serialize">
|
|
@csrf
|
|
|
|
<?php
|
|
/*
|
|
$columns = table_columns("welder_test_plans");
|
|
$except = ['index', 'hash', 'id', 'alias', 'user_id','third_party', 'emplooyer'];
|
|
$columns = array_diff($columns, $except);
|
|
dump($columns);
|
|
*/
|
|
?>
|
|
<input type="hidden" name="hash" value="{{get("hash")}}">
|
|
{{e2("Color")}}
|
|
<input type="color" name="color" value="{{$color}}" id="" class="form-control">
|
|
{{e2("Remarks")}}
|
|
<input type="text" name="remarks" id="" class="form-control">
|
|
<br>
|
|
<button type="submit" class="btn btn-outline-primary">{{e2("Add Comment")}}</button>
|
|
|
|
</form>
|
|
<script>
|
|
$(".history").load("?ajax=welder-test-plan-history&hash={{get("hash")}}");
|
|
|
|
|
|
$(".btn").on("click", function(){
|
|
$(".history").html("Loading...");
|
|
window.setTimeout(function(){
|
|
$(".history").load("?ajax=welder-test-plan-history&hash={{get("hash")}}");
|
|
},1000);
|
|
|
|
|
|
});
|
|
|
|
</script>
|
|
@include("scripts.serialize")
|
|
|
|
<div class="history"></div>
|