Skip to content

Commit

Permalink
fix: "box.php form"
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranzafar4343 committed Sep 9, 2024
1 parent b00f08f commit 234da53
Show file tree
Hide file tree
Showing 13 changed files with 87 additions and 72 deletions.
2 changes: 1 addition & 1 deletion Branches.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@


<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion Companies.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@
</li><!-- End Tables Nav -->

<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion CompanyInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
</li><!-- End Tables Nav -->

<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down
8 changes: 4 additions & 4 deletions box.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,10 +495,10 @@
<tr>

<!-- <th scope="col">Comp name</th> -->
<th scope="col">Box name</th>
<th scope="col">Created at</th>
<th scope="col">Barcode</th>
<th scope="col">Action</th>
<th scope="col" style="width: 25%;">Box name</th>
<th scope="col" style="width: 30%;">Created at</th>
<th scope="col" style="width: 35%;">Barcode</th>
<th scope="col" style="width: 10%;">Action</th>
</tr>
</thead>
<tbody style="table-layout: fixed;">
Expand Down
2 changes: 1 addition & 1 deletion create.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@
</li><!-- End Tables Nav -->

<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down
109 changes: 57 additions & 52 deletions createBox.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,6 @@
}


/*styles for form*/
.card-body {
padding: 0 20px 20px 20px;
font-size: 0.8rem;
}

.form-control[type=file]:not(:disabled):not([readonly]) {
cursor: pointer;
font-size: 0.8rem;
Expand Down Expand Up @@ -239,6 +233,12 @@

border: none;
}

/*styles for form*/
.card-body {
padding: 0 20px 20px 20px;
font-size: 0.8rem;
}
</style>

<!-- Template Main CSS File -->
Expand Down Expand Up @@ -395,56 +395,61 @@


<!--form--------------------------------------form--------------------------------------->
<div class="container mt-5">
<div class="row">
<div class="col-md-6 offset-md-3">
<div class="card">
<div class="card-body mt-4">
<form action="" method="POST">

<div class="form-group">
<label for="box_name">Box Name:</label>
<input type="text" class="form-control" id="box_name" name="box_name" required>
</div>

<div class="form-group">
<label for="company">Select Company:</label>
<select id="company" class="form-select" name="company" required>
<option value=""> Select a Company </option>

<?php

//fetch companies
$result = $conn->query("SELECT comp_id, comp_name FROM compani");
while ($row = $result->fetch_assoc()) {
echo "<option value='{$row['comp_id']}'>{$row['comp_name']}</option>";
}
?>

</select>
</div>

<div class="form-group">
<label for="branch">Select Branch:</label>
<select id="branch" class="form-select" name="branch" required>
<option value="">Select a Branch</option>
</select>
</div>

<div class="form-group">
<label for="barcode">Barcode:</label>
<input type="text" class="form-control" id="barcode" name="barcode" required>
</div>

<button type="submit" class="btn btn-primary btn-block">Create Box</button>

</form>
<div class="headerimg text-center">
<img src="image/create.png" alt="network-logo" width="50" height="50">
<h2>Add a box</h2>
</div>
<!-- End Header form -->
<div class="container d-flex justify-content-center">
<div class="card custom-card shadow-lg mt-3">
<!-- <h5 class="card-title ml-4">Create Company </h5> -->
<div class="card-body">
<br>
<!-- Multi Columns Form -->
<form class="row g-3 needs-validation" action="" method="POST" enctype="multipart/form-data">

<div class="col-md-6">
<label for="company">Select Company:</label>
<select id="company" class="form-select" name="company" required>
<option value=""> Select a Company </option>

<?php

//fetch companies
$result = $conn->query("SELECT comp_id, comp_name FROM compani");
while ($row = $result->fetch_assoc()) {
echo "<option value='{$row['comp_id']}'>{$row['comp_name']}</option>";
}
?>

</select>
</div>

<div class="col-md-6">
<label for="branch">Select a Branch:</label>
<select id="branch" class="form-select" name="branch" required>
<option value="">Select a Branch</option>
</select>
</div>

<div class="col-md-6">
<label for="box_name" class="form-label">Box Name</label>
<input type="text" class="form-control" name="box_name" required pattern="[A-Za-z\s\.]+" required minlength="3" maxlength="38" title="only letters allowed; at least 3">
</div>
</div>

<div class="col-md-6">
<label class="form-label">Barcode</label>
<input type="text" class="form-control" name="barcode">
</div>

<div class="text-center mt-4 mb-2">
<button type="submit" class="btn btn-outline-primary mr-2" name="submit" value="submit">Submit</button>
<button type="reset" class="btn btn-outline-secondary ">Reset</button>
</div>
</form>
</div>
</div>
</div>

<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>

<script>
Expand Down
14 changes: 13 additions & 1 deletion createBranch.php
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,15 @@
<span>Dashboard</span>
</a>
</li><!-- End Dashboard Nav -->
<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="Companies.php">
<i class="ri-building-4-line"></i><span>Companies</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>


<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down Expand Up @@ -388,6 +393,13 @@
</a>
</li><!-- End Login Page Nav -->

<li class="nav-item">
<a class="nav-link collapsed" href="logout.php">
<i class="bi bi-box-arrow-in-right"></i>
<span>Logout</span>
</a>
</li><!-- End Login Page Nav -->


<li class="nav-item">
<a class="nav-link collapsed" href="pages-contact.php">
Expand Down
8 changes: 3 additions & 5 deletions createitem.php
Original file line number Diff line number Diff line change
Expand Up @@ -328,19 +328,19 @@


<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="Companies.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="Companies.php">
<i class="ri-building-4-line"></i><span>Companies</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li><!-- End Tables Nav -->

<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>

<li class="nav-item">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="showItems.php">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="showItems.php">
<i class="ri-shopping-cart-line"></i><span>Items</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down Expand Up @@ -471,8 +471,6 @@
<button type="reset" class="btn btn-outline-secondary ">Reset</button>
</div>
</form>


</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
</li><!-- End Tables Nav -->

<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion itemUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@
</li><!-- End Tables Nav -->

<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion pages-contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</li><!-- End Tables Nav -->
<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down
4 changes: 2 additions & 2 deletions showItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,13 @@
</li><!-- End Tables Nav -->

<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>

<li class="nav-item">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="showItems.php">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="showItems.php">
<i class="ri-shopping-cart-line"></i><span>Items</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion update.php
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@
</li><!-- End Tables Nav -->

<li class="nav-item">
<a class="nav-link active" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<a class="nav-link collapsed" data-bs-target="#tables-nav" data-bs-toggle="" href="box.php">
<i class="ri-archive-stack-fill"></i><span>Boxes</span><i class="bi bi-chevron ms-auto"></i>
</a>
</li>
Expand Down

0 comments on commit 234da53

Please sign in to comment.