GWM
This commit is contained in:
parent
400dc5996a
commit
2fdcf00e22
@ -87,7 +87,7 @@ class Customer extends BaseController
|
||||
$data = [
|
||||
'first_name' => $this->request->getPost('cfname'),
|
||||
'last_name' => $this->request->getPost('csname'),
|
||||
'mobile_no' => $this->request->getPost('cmobile'),
|
||||
'mobile_no' => $this->request->getPost('mobile'),
|
||||
'email' => $this->request->getPost('cmail'),
|
||||
'date_of_birth' => $dob,
|
||||
'pan_no' => $pan,
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
<!-- Customer Details Tab -->
|
||||
<div class="tab-pane fade show active" id="customerDetails" role="tabpanel" aria-labelledby="customerDetails-tab">
|
||||
<!-- Customer details form fields -->
|
||||
<form class="needs-validation" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_donor"; ?>" id="myForm" name="myForm">
|
||||
<form class="parsley-examples" novalidate method="POST" enctype="multipart/form-data" action="<?= base_url() . "insert_donor"; ?>" id="myForm" name="myForm">
|
||||
<!-- <img src="<?= base_url() . "public/assets/images/plugins/loading.gif" ?>" alt="loader1" style="display:none; height:30px; width:auto;" id="loaderImg"> -->
|
||||
|
||||
<div class="form-row">
|
||||
@ -30,8 +30,8 @@
|
||||
<label for="DonorType" class="col-form-label">Donor Type<span class="text-danger"> *</span></label>
|
||||
<select class="form-control" id="DonorType" name="DonorType" required>
|
||||
<option value="" disabled>Select Donor Type</option>
|
||||
<option value="option1" <?= isset($customer['donor_type']) && $customer['donor_type'] === 'option1' ? 'selected' : '' ?>>Individual</option>
|
||||
<option value="option2" <?= isset($customer['donor_type']) && $customer['donor_type'] === 'option2' ? 'selected' : '' ?>>Organization</option>
|
||||
<option value="option1" <?= isset($customer['donor_type']) && $customer['donor_type'] === 'option1' ? 'selected' : '' ?>>Individual</option>
|
||||
<option value="option2" <?= isset($customer['donor_type']) && $customer['donor_type'] === 'option2' ? 'selected' : '' ?>>Organization</option>
|
||||
|
||||
</select>
|
||||
<div class="invalid-feedback">Please provide.</div>
|
||||
@ -68,7 +68,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">+91</div>
|
||||
</div>
|
||||
<input name="mobile[]"class="form-control" pattern="[0-9]{10}" value="<?= isset($customer['mobile_no']) ? $customer['mobile_no'] : '' ?>" type="tel" data-parsley-type="number" data-parsley-length="[10,10]" class="form-control" placeholder="Enter Contact Mobile" id="mobile" required>
|
||||
<input name="mobile"class="form-control" pattern="[0-9]{10}" value="<?= isset($customer['mobile_no']) ? $customer['mobile_no'] : '' ?>" type="tel" data-parsley-type="number" data-parsley-length="[10,10]" class="form-control" placeholder="Enter Contact Mobile" id="mobile" maxlength="10" onkeypress = "return onlyNumbers(event)" required>
|
||||
|
||||
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
@ -111,13 +111,13 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="baddress1" class="col-form-label">Address</label>
|
||||
<textarea type="text" class="form-control" id="baddress1" name="address" placeholder="Address (eg : 1234 Main St)" style="width:202%" required><?= isset($customer['address']) ? $customer['address'] : '' ?></textarea>
|
||||
<textarea type="text" class="form-control" id="baddress1" name="address" placeholder="Address (eg : 1234 Main St)" style="width:202%" ><?= isset($customer['address']) ? $customer['address'] : '' ?></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-3">
|
||||
<label for="bcountry" class="col-form-label">Country</label>
|
||||
<select class="form-control" id="bcountry" name="country"required>
|
||||
<select class="form-control" id="bcountry" name="country">
|
||||
<option value="<?= isset($customer['country']) ? $customer['country'] : '';?>"><?= isset($customer['country']) ? $customer['country'] : 'Choose your Country';?></option>
|
||||
<?php foreach ($country_details as $value) { ?>
|
||||
<option value="<?php echo $value['country_name']; ?>">
|
||||
@ -131,17 +131,17 @@
|
||||
<div class="form-group col-md-3">
|
||||
<div id="billinput" style="display: block">
|
||||
<label for="bistate" class="col-form-label">State</label>
|
||||
<input type="text" class="form-control" id="bistate" name="state_text"required placeholder="State" value="<?= isset($customer['state']) ? $customer['state'] : ''?>"/>
|
||||
<input type="text" class="form-control" id="bistate" name="state_text" placeholder="State" value="<?= isset($customer['state']) ? $customer['state'] : ''?>"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="bcity" class="col-form-label">City</label>
|
||||
<input type="text" class="form-control" id="bcity" name="city" required value="<?= isset($customer['city']) ? $customer['city'] : '' ?>" placeholder="City" />
|
||||
<input type="text" class="form-control" id="bcity" name="city" value="<?= isset($customer['city']) ? $customer['city'] : '' ?>" placeholder="City" />
|
||||
<div class="invalid-feedback"> Please provide. </div>
|
||||
</div>
|
||||
<div class="form-group col-md-3">
|
||||
<label for="bzip" class="col-form-label">Postal Code</label>
|
||||
<input type="text" class="form-control" id="bzip" name="zip" required value="<?= isset($customer['postal_code']) ? $customer['postal_code'] : '' ?>" placeholder="Postal Code" pattern="\d*" maxlength="10" />
|
||||
<input type="text" class="form-control" id="bzip" name="zip" value="<?= isset($customer['postal_code']) ? $customer['postal_code'] : '' ?>" placeholder="Postal Code" pattern="\d*" maxlength="10" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -189,6 +189,12 @@
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
function onlyNumbers(event){
|
||||
var charcode;
|
||||
charcode = event.which || event.keyCode;
|
||||
if(charcode>= 48 && charcode <= 57)return true;
|
||||
return false;
|
||||
}
|
||||
function validateEmail(email) {
|
||||
// Regular expression for a Gmail, Yahoo, or Hotmail email address validation
|
||||
var emailPattern = /^[a-zA-Z0-9._%+-]+@(gmail\.com|yahoo\.com|hotmail\.com|email\.com)$/;
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<?php foreach ($customer as $value) :?>
|
||||
<?php foreach ($customer as $value) :?>
|
||||
<tr>
|
||||
<td hidden><?$value['donor_id'];?></td>
|
||||
<?php if($value['donor_type'] == 'option2') { ?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user