Fixed add invoice, quote, recurring under client area, added alternative contact photo if one is not present using fontawesome stacked circle with contact initials inside
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<input type="hidden" name="client_net_terms" value="<?php echo $client_net_terms; ?>">
|
||||
|
||||
<?php if(isset($_GET['client_id'])){ ?>
|
||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
||||
<?php } ?>
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
<div class="form-group">
|
||||
<label>Client</label>
|
||||
@@ -16,7 +21,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<select class="form-control" id="selectIt" name="client" required <?php if(isset($_GET['client_id'])){ echo "disabled"; } ?>>
|
||||
<select class="form-control" name="client" required <?php if(isset($_GET['client_id'])){ echo "disabled"; } ?>>
|
||||
<option value="">- Client -</option>
|
||||
<?php
|
||||
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
<?php if(isset($_GET['client_id'])){ ?>
|
||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
||||
<?php } ?>
|
||||
<div class="modal-body bg-white">
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
</button>
|
||||
</div>
|
||||
<form action="post.php" method="post" autocomplete="off">
|
||||
|
||||
<?php if(isset($_GET['client_id'])){ ?>
|
||||
<input type="hidden" name="client" value="<?php echo $client_id; ?>">
|
||||
<?php } ?>
|
||||
|
||||
<div class="modal-body bg-white">
|
||||
<div class="form-group">
|
||||
<label>Client</label>
|
||||
@@ -15,7 +20,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-user"></i></span>
|
||||
</div>
|
||||
<select class="form-control" name="client" required>
|
||||
<select class="form-control" name="client" required <?php if(isset($_GET['client_id'])){ echo "disabled"; } ?>>
|
||||
<option value="">- Client -</option>
|
||||
<?php
|
||||
|
||||
@@ -24,7 +29,7 @@
|
||||
$client_id = $row['client_id'];
|
||||
$client_name = $row['client_name'];
|
||||
?>
|
||||
<option value="<?php echo "$client_id"; ?>"><?php echo "$client_name"; ?></option>
|
||||
<option <?php if($_GET['client_id'] == $client_id) { echo "selected"; } ?> value="<?php echo "$client_id"; ?>"><?php echo "$client_name"; ?></option>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
|
||||
|
||||
while($row = mysqli_fetch_array($sql)){
|
||||
$contact_id = $row['contact_id'];
|
||||
$contact_name = $row['contact_name'];
|
||||
@@ -29,6 +29,7 @@
|
||||
}
|
||||
$contact_email = $row['contact_email'];
|
||||
$contact_photo = $row['contact_photo'];
|
||||
$contact_initials = initials($contact_name);
|
||||
|
||||
?>
|
||||
<tr>
|
||||
@@ -38,8 +39,15 @@
|
||||
<div class="text-secondary"><?php echo $contact_name; ?></div>
|
||||
</td>
|
||||
<?php }else{ ?>
|
||||
<td class="text-center"><?php echo $contact_name; ?></td>
|
||||
<?php } ?>
|
||||
<td class="text-center">
|
||||
<span class="fa-stack fa-2x">
|
||||
<i class="fa fa-circle fa-stack-2x text-secondary"></i>
|
||||
<span class="fa fa-stack-1x text-white"><?php echo $contact_initials; ?></span>
|
||||
</span>
|
||||
<br>
|
||||
<div class="text-secondary"><?php echo $contact_name; ?></div>
|
||||
</td>
|
||||
<?php } ?>
|
||||
<td><?php echo $contact_title; ?></td>
|
||||
<td><a href="mailto:<?php echo $contact_email; ?>"><?php echo $contact_email; ?></a></td>
|
||||
<td><?php echo $contact_phone; ?></td>
|
||||
|
||||
@@ -88,8 +88,9 @@
|
||||
|
||||
<?php
|
||||
|
||||
include("edit_invoice_modal.php");
|
||||
include("add_invoice_copy_modal.php");
|
||||
include("edit_invoice_modal.php");
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -16,4 +16,11 @@ function keygen()
|
||||
return $key;
|
||||
}
|
||||
|
||||
function initials($str) {
|
||||
$ret = '';
|
||||
foreach (explode(' ', $str) as $word)
|
||||
$ret .= strtoupper($word[0]);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -3,7 +3,7 @@
|
||||
include("config.php");
|
||||
include("check_login.php");
|
||||
include("vendor/Parsedown.php");
|
||||
//include("functions.php");
|
||||
include("functions.php");
|
||||
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user