mirror of
https://github.com/itflow-org/itflow
synced 2026-03-01 11:24:52 +00:00
Cleaned up empty vars and tags in Vendors listing add edit post
This commit is contained in:
@@ -1,34 +1,36 @@
|
|||||||
<div class="modal" id="addVendorModal" tabindex="-1">
|
<div class="modal" id="addVendorModal" tabindex="-1">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content bg-dark">
|
<div class="modal-content bg-dark">
|
||||||
<div class="modal-header text-white">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-building mr-2"></i>New Vendor</h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-building"></i> New Vendor</h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span aria-hidden="true">×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<form action="post.php" method="post" autocomplete="off">
|
<form action="post.php" method="post" autocomplete="off">
|
||||||
<input type="hidden" name="client_id" value="<?php echo $client_id; ?>">
|
|
||||||
|
<input type="hidden" name="client_id" value="<?php if(isset($_GET['client_id'])){ echo $client_id; }else{ echo 0; } ?>">
|
||||||
|
|
||||||
<div class="modal-body bg-white">
|
<div class="modal-body bg-white">
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-justified mb-3" id="pills-tab">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" id="pills-details-tab" data-toggle="pill" href="#pills-details">Details</a>
|
<a class="nav-link active" data-toggle="pill" href="#pills-details">Details</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" id="pills-address-tab" data-toggle="pill" href="#pills-address">Address</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-address">Address</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" id="pills-contact-tab" data-toggle="pill" href="#pills-contact">Contact</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-contact">Contact</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" id="pills-notes-tab" data-toggle="pill" href="#pills-notes">Notes</a>
|
<a class="nav-link" data-toggle="pill" href="#pills-notes">Notes</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="tab-content" id="pills-tabContent">
|
<div class="tab-content">
|
||||||
|
|
||||||
<div class="tab-pane fade show active" id="pills-details">
|
<div class="tab-pane fade show active" id="pills-details">
|
||||||
|
|
||||||
|
|||||||
@@ -215,15 +215,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<a class="dropdown-item" href="post.php?delete_client=<?php echo $client_id; ?>">Delete</a>
|
<a class="dropdown-item" href="post.php?delete_client=<?php echo $client_id; ?>">Delete</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php include("edit_client_modal.php"); ?>
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
include("edit_client_modal.php");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<div class="modal" id="editVendorModal<?php echo $vendor_id; ?>" tabindex="-1">
|
<div class="modal" id="editVendorModal<?php echo $vendor_id; ?>" tabindex="-1">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content bg-dark">
|
<div class="modal-content bg-dark">
|
||||||
<div class="modal-header text-white">
|
<div class="modal-header">
|
||||||
<h5 class="modal-title"><i class="fa fa-fw fa-building mr-2"></i><?php echo $vendor_name; ?></h5>
|
<h5 class="modal-title"><i class="fa fa-fw fa-building"></i> <?php echo $vendor_name; ?></h5>
|
||||||
<button type="button" class="close text-white" data-dismiss="modal">
|
<button type="button" class="close text-white" data-dismiss="modal">
|
||||||
<span>×</span>
|
<span>×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<input type="hidden" name="vendor_id" value="<?php echo $vendor_id; ?>">
|
<input type="hidden" name="vendor_id" value="<?php echo $vendor_id; ?>">
|
||||||
<div class="modal-body bg-white">
|
<div class="modal-body bg-white">
|
||||||
|
|
||||||
<ul class="nav nav-pills nav-justified mb-3" id="pills-tab<?php echo $vendor_id; ?>">
|
<ul class="nav nav-pills nav-justified mb-3">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active" data-toggle="pill" href="#pills-details<?php echo $vendor_id; ?>">Details</a>
|
<a class="nav-link active" data-toggle="pill" href="#pills-details<?php echo $vendor_id; ?>">Details</a>
|
||||||
</li>
|
</li>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div class="tab-content" id="pills-tabContent<?php echo $vendor_id; ?>">
|
<div class="tab-content">
|
||||||
|
|
||||||
<div class="tab-pane fade show active" id="pills-details<?php echo $vendor_id; ?>">
|
<div class="tab-pane fade show active" id="pills-details<?php echo $vendor_id; ?>">
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="pills-address<?php echo $vendor_id; ?>" role="tabpanel" aria-labelledby="pills-address-tab<?php echo $vendor_id; ?>">
|
<div class="tab-pane fade" id="pills-address<?php echo $vendor_id; ?>">
|
||||||
|
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label>Address</label>
|
<label>Address</label>
|
||||||
|
|||||||
@@ -90,7 +90,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-8">
|
<div class="col-sm-8">
|
||||||
<div class="btn-group float-right">
|
<div class="btn-group">
|
||||||
<a href="?status=%" class="btn <?php if($status == '%'){ echo 'btn-primary'; }else{ echo 'btn-default'; } ?>">All</a>
|
<a href="?status=%" class="btn <?php if($status == '%'){ echo 'btn-primary'; }else{ echo 'btn-default'; } ?>">All</a>
|
||||||
<a href="?status=Open" class="btn <?php if($status == 'Open'){ echo 'btn-primary'; }else{ echo 'btn-default'; } ?>">Open</a>
|
<a href="?status=Open" class="btn <?php if($status == 'Open'){ echo 'btn-primary'; }else{ echo 'btn-default'; } ?>">Open</a>
|
||||||
<a href="?status=In-Progress" class="btn <?php if($status == 'In-Progress'){ echo 'btn-primary'; }else{ echo 'btn-default'; } ?>">In-Progress</a>
|
<a href="?status=In-Progress" class="btn <?php if($status == 'In-Progress'){ echo 'btn-primary'; }else{ echo 'btn-default'; } ?>">In-Progress</a>
|
||||||
|
|||||||
56
vendors.php
56
vendors.php
@@ -39,7 +39,7 @@ if(isset($_GET['o'])){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Date From and Date To Filter
|
//Date From and Date To Filter
|
||||||
if(isset($_GET['dtf'])){
|
if(!empty($_GET['dtf'])){
|
||||||
$dtf = $_GET['dtf'];
|
$dtf = $_GET['dtf'];
|
||||||
$dtt = $_GET['dtt'];
|
$dtt = $_GET['dtt'];
|
||||||
}else{
|
}else{
|
||||||
@@ -60,28 +60,52 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="card mb-3">
|
<div class="card card-dark mb-3">
|
||||||
<div class="card-header bg-dark text-white">
|
<div class="card-header">
|
||||||
<h6 class="float-left mt-2"><i class="fa fa-fw fa-building mr-2"></i>Vendors</h6>
|
<h3 class="card-title mt-2"><i class="fa fa-fw fa-building"></i> Vendors</h3>
|
||||||
<button type="button" class="btn btn-primary btn-sm float-right" data-toggle="modal" data-target="#addVendorModal"><i class="fas fa-fw fa-plus"></i></button>
|
<div class="card-tools">
|
||||||
|
<button type="button" class="btn btn-primary" data-toggle="modal" data-target="#addVendorModal"><i class="fas fa-fw fa-plus"></i> New Vendor</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<form autocomplete="off">
|
<form class="mb-4" autocomplete="off">
|
||||||
<div class="input-group">
|
<div class="row">
|
||||||
<input type="search" class="form-control col-md-4" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Invoices">
|
<div class="col-sm-4">
|
||||||
<div class="input-group-append">
|
<div class="input-group">
|
||||||
<button class="btn btn-primary"><i class="fa fa-search"></i></button>
|
<input type="search" class="form-control" name="q" value="<?php if(isset($q)){echo stripslashes($q);} ?>" placeholder="Search Vendors">
|
||||||
|
<div class="input-group-append">
|
||||||
|
<button class="btn btn-secondary" type="button" data-toggle="collapse" data-target="#advancedFilter"><i class="fas fa-filter"></i></button>
|
||||||
|
<button class="btn btn-primary"><i class="fa fa-search"></i></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="collapse mt-3 <?php if(!empty($_GET['dtf'])){ echo "show"; } ?>" id="advancedFilter">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Date From</label>
|
||||||
|
<input type="date" class="form-control" name="dtf" value="<?php echo $dtf; ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Date To</label>
|
||||||
|
<input type="date" class="form-control" name="dtt" value="<?php echo $dtt; ?>">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<hr>
|
<hr>
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
<table class="table table-striped table-borderless table-hover">
|
<table class="table table-striped table-hover table-borderless">
|
||||||
<thead class="text-dark <?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
<thead class="<?php if($num_rows[0] == 0){ echo "d-none"; } ?>">
|
||||||
<tr>
|
<tr>
|
||||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=vendor_name&o=<?php echo $disp; ?>">Vendor</a></th>
|
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=vendor_name&o=<?php echo $disp; ?>">Vendor</a></th>
|
||||||
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=vendor_description&o=<?php echo $disp; ?>">Description</a></th>
|
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=vendor_description&o=<?php echo $disp; ?>">Description</a></th>
|
||||||
<th>Contact</th>
|
<th><a class="text-dark" href="?<?php echo $url_query_strings_sb; ?>&sb=vendor_contact&o=<?php echo $disp; ?>">Contact</a></th>
|
||||||
<th class="text-center">Action</th>
|
<th class="text-center">Action</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -110,9 +134,6 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<?php include("edit_vendor_modal.php"); ?>
|
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<a class="text-dark" href="#" data-toggle="modal" data-target="#editVendorModal<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?><a>
|
<a class="text-dark" href="#" data-toggle="modal" data-target="#editVendorModal<?php echo $vendor_id; ?>"><?php echo $vendor_name; ?><a>
|
||||||
@@ -168,13 +189,14 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
include("edit_vendor_modal.php");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<?php include("pagination.php"); ?>
|
<?php include("pagination.php"); ?>
|
||||||
|
|||||||
Reference in New Issue
Block a user