again page title changes in form
This commit is contained in:
parent
89751a6499
commit
ae54fbd45e
@ -63,19 +63,23 @@ if (!empty($ReqPOType)) {
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4><?= "Edit Requisition"; ?><?= $ReqNo ? " - ".$ReqNo : ""; ?></h4>
|
||||
<a href="<?php echo base_url(); ?>Requisition"><button type="button" class="btn btn-dark waves-effect waves-light">Back</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<!-- Form row -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card" style="margin: 24px 0px !important;">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="pb-2 border-bottom border-light d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<h4 class="header-title"><?= "Edit Requisition"; ?><b><?= $ReqNo ? " - ".$ReqNo : ""; ?></b></h4>
|
||||
</div>
|
||||
<a href="<?php echo base_url(); ?>Requisition" ID="cancel"><button type="button" class="btn btn-dark waves-effect waves-light">Back</button></a>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<?php $attributes = array('class' => 'form-label-left requistion ', 'name' => 'requistion', 'id' => 'requistion');
|
||||
echo form_open(base_url() . 'EditRequisition', $attributes);
|
||||
?>
|
||||
|
||||
@ -17,18 +17,21 @@ if (!empty($Emp)) {
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4><?= "Add Requisition"; ?></h4>
|
||||
<a href="<?php echo base_url(); ?>Requisition"><button type="button" class="btn btn-dark waves-effect waves-light">Back</button></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<!-- Form row -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card" style="margin: 24px 0px !important;">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="pb-2 border-bottom border-light d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<h4 class="header-title"><?= "Add Requisition"; ?></h4>
|
||||
</div>
|
||||
<a href="<?php echo base_url(); ?>Requisition" ID="cancel"><button type="button" class="btn btn-dark waves-effect waves-light">Back</button></a>
|
||||
</div>
|
||||
|
||||
|
||||
<?php $attributes = array('class' => 'form-label-left requistion ', 'name' => 'requistion', 'id' => 'requistion');
|
||||
echo form_open(base_url() . 'Requisitionform::SearchRequistList', $attributes);
|
||||
|
||||
@ -41,26 +41,22 @@
|
||||
<div class="content">
|
||||
<!-- Start Content-->
|
||||
<div class="container-fluid">
|
||||
|
||||
<!-- start page title -->
|
||||
<div>
|
||||
<!-- start page title -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4><?= "Transporter Details"; ?></h4>
|
||||
<a data-toggle="modal" href="#transporterwizard" data-id="0" data-name="" class="btn btn-success">Add New Transporter</a> </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end page title -->
|
||||
<!-- Form row -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card" style="margin: 24px 0px !important;">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="pb-2 d-flex justify-content-between align-items-center">
|
||||
<div class="page-title-box page-title-box-alt">
|
||||
<h4 class="page-title">Transporter Details</h4>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<a data-toggle="modal" href="#transporterwizard" data-id="0" data-name="" class="btn btn-success">Add New Transporter</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table id="datatable-buttons" class="table table-striped dt-responsive nowrap w-100">
|
||||
<table id="datatable-buttons" class="table dt-responsive nowrap w-100">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Create Date</th>
|
||||
@ -110,7 +106,6 @@
|
||||
</div> <!-- end card -->
|
||||
</div><!-- end col-->
|
||||
</div>
|
||||
</div>
|
||||
</div> <!-- container -->
|
||||
</div> <!-- content -->
|
||||
</div>
|
||||
@ -128,10 +123,10 @@
|
||||
<form id="transporterForm" class="form-horizontal" role="form">
|
||||
<div class="form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-3 col-md-offset-2">
|
||||
<div class="col-md-4 col-md-offset-2">
|
||||
Transporter Name:
|
||||
</div>
|
||||
<div class="col-md-5">
|
||||
<div class="col-md-6">
|
||||
<input type="text" name="transportername" id="transportername" class="form-control">
|
||||
<input type="hidden" name="transporterid" id="transporterid" class="form-control">
|
||||
</div>
|
||||
@ -150,8 +145,53 @@
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- /.modal -->
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#transporterwizard").on("shown.bs.modal", function(e) {
|
||||
var id = $(e.relatedTarget).data('id');
|
||||
var name = $(e.relatedTarget).data('name');
|
||||
$('#transportername').val('');
|
||||
$('#transporterid').val(id);
|
||||
if (id == 0) {
|
||||
$('.modal-title').html("Add Transporter");
|
||||
} else {
|
||||
$('.modal-title').html("Edit Transporter");
|
||||
$('#transportername').val(name);
|
||||
}
|
||||
});
|
||||
|
||||
$('#tempClick').click(function() {
|
||||
if ($('#transportername').val() === '') {
|
||||
alert('Please Enter the Transporter Name');
|
||||
return;
|
||||
}
|
||||
|
||||
var formData = {
|
||||
transporterid: $('#transporterid').val(),
|
||||
transportername: $('#transportername').val()
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: "<?php echo base_url();?>fetchTransporterDetails",
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
if (response.status) {
|
||||
alert(response.message);
|
||||
$('#transporterwizard').modal('hide');
|
||||
location.reload();
|
||||
} else {
|
||||
alert(response.message);
|
||||
}
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
alert('An error occurred: ' + error);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
$('#datatable-buttons').DataTable({
|
||||
dom: 'Blfrtip', // Buttons, length menu, filter, table, information, pagination
|
||||
@ -159,14 +199,9 @@
|
||||
'copy', 'csv', 'excel', 'pdf', 'print' // Export buttons
|
||||
],
|
||||
pageLength: 10, // Default rows per page
|
||||
lengthMenu: [
|
||||
[10, 20, 30, 50, -1],
|
||||
[10, 20, 30, 50, "All"]
|
||||
], // Rows per page options
|
||||
lengthMenu: [ [10, 20, 30, 50, -1], [10, 20, 30, 50, "All"] ], // Rows per page options
|
||||
responsive: true, // Responsive table
|
||||
order: [
|
||||
[0, 'desc']
|
||||
], // Default ordering (column index 0, ascending)
|
||||
order: [[0, 'desc']], // Default ordering (column index 0, ascending)
|
||||
language: {
|
||||
paginate: {
|
||||
next: '<i class="fas fa-angle-right"></i>', // Next button icon
|
||||
|
||||
Loading…
Reference in New Issue
Block a user