forked from itflow-org/itflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvendor_add_from_template_modal.php
47 lines (40 loc) · 2.45 KB
/
vendor_add_from_template_modal.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<div class="modal" id="addVendorFromTemplateModal" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content bg-dark">
<div class="modal-header">
<h5 class="modal-title"><i class="fas fa-fw fa-building mr-2"></i>New Vendor from Template</h5>
<button type="button" class="close text-white" data-dismiss="modal">
<span>×</span>
</button>
</div>
<form action="post.php" method="post" autocomplete="off">
<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">
<label>Template</label>
<div class="form-group">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-puzzle-piece"></i></span>
</div>
<select class="form-control" name="vendor_template_id" required>
<option value="">- Select Template -</option>
<?php
$sql_vendor_templates = mysqli_query($mysqli, "SELECT * FROM vendors WHERE vendor_template = 1 AND vendor_archived_at IS NULL ORDER BY vendor_name ASC");
while ($row = mysqli_fetch_array($sql_vendor_templates)) {
$vendor_template_id = intval($row['vendor_id']);
$vendor_template_name = nullable_htmlentities($row['vendor_name']);
?>
<option value="<?php echo $vendor_template_id ?>"><?php echo $vendor_template_name; ?></option>
<?php } ?>
</select>
</div>
</div>
</div>
<div class="modal-footer bg-white">
<button type="submit" name="add_vendor_from_template" class="btn btn-primary text-bold"><i class="fas fa-check mr-2"></i>Create Vendor</button>
<button type="button" class="btn btn-light" data-dismiss="modal"><i class="fa fa-times mr-2"></i>Cancel</button>
</div>
</form>
</div>
</div>
</div>