This commit is contained in:
2022-08-13 20:26:23 -04:00
parent 7914a73df0
commit b2155d64ed
8 changed files with 137 additions and 42 deletions
+15 -11
View File
@@ -1,5 +1,9 @@
<?php include('common/jobstrip.php'); ?>
<form method="post" name="post_nav_find" action="">
<input type="hidden" name="jobUid" value="">
</form>
<!--begin::Row-->
<div class="row g-5 g-xl-8">
<?php include('common/jobside.php'); ?>
@@ -76,7 +80,7 @@
foreach ($jobs_list as $row){
?>
<option value="<?=$row['uid']?>"><?=$row['title']?></option>
<?php
<?php
}
?>
</select>
@@ -85,9 +89,10 @@
<a href="#" onclick="return viewJob()" class="btn btn-bg-light btn-block btn-active-color-primary btn-sm px-4 me-2">View</a>
</div>
<div class="col col-lg-2">
<a href="#" onclick="return cloneJob()" class="btn btn-bg-light btn-block btn-active-color-secondary btn-sm px-4 me-2">Clone</a>
<a href="#" onclick="return cloneJob()" class="btn btn-bg-primary btn-block btn-active-color-secondary btn-sm px-4 me-2">Clone</a>
</div>
</div>
</div>
</div>
<hr size="1" />
@@ -159,7 +164,9 @@
}
var job_id = $("select#select_job option").filter(":selected").val();
if (!job_id.length> 0 ) return;
alert(job_id);
// alert(job_id);
$.ajax({
url: "/jobs/job_modal?job_uid="+job_id
}).done(function (data) {
@@ -170,17 +177,14 @@
function cloneJob() {
if (typeof event !== 'undefined') {
event.preventDefault();
// event.preventDefault();
}
var job_id = $("select#select_job option").filter(":selected").val();
if (!job_id.length> 0 ) return;
alert(job_id);
$.ajax({
url: "/jobs/clonejob?job_uid="+job_id
}).done(function (data) {
//alert(data);
$('#modal-content').html(data);
});
// alert("Clone this job " + job_id);
document.post_nav_find.action = '/jobs/clonejob';
document.post_nav_find.jobUid.value = job_id;
document.post_nav_find.submit();
}
// -->
</script>