184 lines
7.5 KiB
PHP
184 lines
7.5 KiB
PHP
<!-- Main content -->
|
|
<form method="post" name="post_nav_find" action="">
|
|
<input type="hidden" name="jobID" value="<?php echo $jobID; ?>">
|
|
</form>
|
|
<script type="text/javascript">
|
|
<!--
|
|
function post_nav_find_action(what, value) {
|
|
alert(what);
|
|
document.post_nav_find.action = what + '';
|
|
document.post_nav_find.jobID.value = value;
|
|
document.post_nav_find.submit();
|
|
return false;
|
|
}
|
|
// -->
|
|
</script>
|
|
<div class="content-wrapper">
|
|
<!-- Quick stats boxes -->
|
|
<?php include('common/jobstrip.php'); ?>
|
|
<!-- /quick stats boxes -->
|
|
|
|
<!-- Marketing campaigns -->
|
|
<div class="panel panel-flat">
|
|
<div class="panel-heading">
|
|
<div class="table-responsive">
|
|
<?php echo $job_table ?>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="panel-heading">
|
|
|
|
<div class="row">
|
|
|
|
<form name="job_detail">
|
|
<table class='table table-striped table-hover table-bordered table-condensed'>
|
|
<thead>
|
|
<tr>
|
|
<th><b>Job Details: Please provide clear deliverables for this task.</b></th></tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><textarea cols="18" rows="3" name='jobdescription' class="wysihtml5 wysihtml5-min form-control" style="height:180px;" placeholder="Enter description here ..."><?php echo $job_description; ?></textarea></td></tr>
|
|
</tbody>
|
|
</table>
|
|
</form>
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
|
|
<div class="panel panel-flat">
|
|
|
|
<div class="panel-body">
|
|
<div class="tabbable">
|
|
<ul class="nav nav-tabs">
|
|
<li class="active"><a href="#basic-tab1" data-toggle="tab">Place Job/Task in public</a></li>
|
|
<li><a href="#basic-tab2" data-toggle="tab">Send to Specific Email</a></li>
|
|
<li><a href="#basic-tab3" data-toggle="tab">Send to my Group</a></li>
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
<div class="tab-pane active" id="basic-tab1">
|
|
|
|
<h5>Offer this job to public</h5>
|
|
<form name="offer_public">
|
|
<?php echo $my_post_duration; ?>
|
|
<input id="public_submit" type="button" name='send' class="btn btn-primary btn-sm" value='Show Task to Public' onclick="return offerPublic();"><div id="public_result"></div>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="tab-pane" id="basic-tab2">
|
|
|
|
<h5>Offer this job to individual.</h5>
|
|
<form name="offer_individual">
|
|
<input type="text" class="form-control" id="rec_email" name="rec_email" value='' placeholder="Enter email to send offer...">
|
|
<input id="individ_submit" type="button" class="btn btn-primary btn-sm" name='send' value='Send Offer to Individual' onclick="return offerIndividual();"><div id="individ_result"></div>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="tab-pane" id="basic-tab3">
|
|
<h5>Offer this job to your Group.</h5>
|
|
<form name="offer_group">
|
|
<?php echo $my_job_group; ?>
|
|
<input id="group_submit" type="button" name='send' class="btn btn-primary btn-sm" value='Send Offer to Group' onclick="return offerGroup();"><div id="group_result"></div>
|
|
</form>
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
<!-- /marketing campaigns -->
|
|
|
|
</div>
|
|
<!-- /main content -->
|
|
<script type="text/javascript">
|
|
<!--
|
|
function isEmail(email) {
|
|
var regex = /^([a-zA-Z0-9_.+-])+\@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/;
|
|
return regex.test(email);
|
|
}
|
|
function offerIndividual() {
|
|
var email = document.offer_individual.rec_email.value;
|
|
if (email == '' || !isEmail(email)) {
|
|
alert('You must enter e-mail!');
|
|
return false;
|
|
}
|
|
if (document.job_detail.jobdescription.value == '') {
|
|
alert('Missing job description!');
|
|
return false;
|
|
}
|
|
var job_description = encodeURIComponent(JSON.stringify(document.job_detail.jobdescription.value));
|
|
// alert(job_description);
|
|
$('#individ_result').html('Processing...');
|
|
$('#individ_submit').prop('disabled', true);
|
|
$.ajax({
|
|
url: "/jobs/processjob_individ?jobID=<?php echo $jobID; ?>&rec_email=" + encodeURIComponent($('#rec_email').val()) + "&jobdescription=" + job_description
|
|
|
|
|
|
}).done(function (data) {
|
|
$('#individ_result').html(data);
|
|
document.offer_individual.rec_email.value = '';
|
|
$('#individ_submit').prop('disabled', false);
|
|
});
|
|
return false;
|
|
}
|
|
function offerGroup() {
|
|
if (document.offer_group.job_group.value == '') {
|
|
alert('You must select group!');
|
|
return false;
|
|
}
|
|
if (document.job_detail.jobdescription.value == '') {
|
|
alert('Missing job description!');
|
|
return false;
|
|
}
|
|
|
|
var job_description = encodeURIComponent(JSON.stringify(document.job_detail.jobdescription.value));
|
|
$('#group_result').html('Processing...');
|
|
$('#group_submit').prop('disabled', true);
|
|
//alert(element.value);
|
|
$.ajax({
|
|
url: "/jobs/processjob_group?jobID=<?php echo $jobID; ?>&job_group=" + document.offer_group.job_group.value + "&jobdescription=" + job_description
|
|
}).done(function (data) {
|
|
$('#group_result').html(data);
|
|
document.offer_group.job_group.value = '';
|
|
$('#group_submit').prop('disabled', false);
|
|
});
|
|
return false;
|
|
}
|
|
function offerPublic() {
|
|
if (document.offer_public.job_duration.value == '') {
|
|
alert('You must select duration!');
|
|
return false;
|
|
}
|
|
if (document.job_detail.jobdescription.value == '') {
|
|
alert('Missing job description!');
|
|
return false;
|
|
}
|
|
var job_description = encodeURIComponent(JSON.stringify(document.job_detail.jobdescription.value));
|
|
|
|
$('#public_result').html('Processing...');
|
|
$('#public_submit').prop('disabled', true);
|
|
//alert(element.value);
|
|
$.ajax({
|
|
url: "/jobs/processjob_public?jobID=<?php echo $jobID; ?>&job_duration=" + document.offer_public.job_duration.value + "&jobdescription=" + job_description
|
|
}).done(function (data) {
|
|
$('#public_result').html(data);
|
|
document.offer_group.job_group.value = '';
|
|
$('#public_submit').prop('disabled', false);
|
|
});
|
|
return false;
|
|
}
|
|
// -->
|
|
</script>
|
|
|