fix
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm col-8">
|
||||
<select name="language" aria-label="Select a previous task" data-control="select2" data-placeholder="Select a previous task ..." class="form-select form-select-solid form-select-sm">
|
||||
<select id="select_job" name="select_job" aria-label="Select a previous task" data-control="select2" data-placeholder="Select a previous task ..." class="form-select form-select-solid form-select-sm">
|
||||
<option value="">Select a previous task...</option>
|
||||
<?php
|
||||
foreach ($jobs_list as $row){
|
||||
@@ -82,10 +82,10 @@
|
||||
</select>
|
||||
</div>
|
||||
<div class="col col-lg-2">
|
||||
<a href="/jobs/create/" class="btn btn-bg-light btn-block btn-active-color-primary btn-sm px-4 me-2">View</a>
|
||||
<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="/jobs/create/" 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-light btn-block btn-active-color-secondary btn-sm px-4 me-2">Clone</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -146,10 +146,41 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function viewJob() {
|
||||
if (typeof event !== 'undefined') {
|
||||
event.preventDefault();
|
||||
}
|
||||
var job_id = $("select#select_job option").filter(":selected").val();
|
||||
if (!job_id.length> 0 ) return;
|
||||
alert(job_id);
|
||||
$.ajax({
|
||||
url: "/jobs/job_modal?job_uid="+job_id
|
||||
}).done(function (data) {
|
||||
//alert(data);
|
||||
$('#modal-content').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
function cloneJob() {
|
||||
if (typeof event !== 'undefined') {
|
||||
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);
|
||||
});
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user