assigned issues fixes
This commit is contained in:
parent
06dd5af078
commit
2c036b28da
@ -918,7 +918,7 @@ class Employeedetails extends BaseController
|
||||
$empPayUpdate = $this->emppaydate_model->editemppay($emppay);
|
||||
|
||||
if ($result + $empPayUpdate > 0) {
|
||||
$this->session->setFlashdata('success', 'You Have Successfully updated the Employee Record!');
|
||||
$this->session->setFlashdata('success', 'You Have Successfully Updated the Employee Record!');
|
||||
return json_encode(true);
|
||||
} else {
|
||||
$this->session->setFlashdata('error', 'Record Not Updated!');
|
||||
|
||||
@ -2234,11 +2234,11 @@ join t_purchaseorder_master po on po.PONO = pl.PONO
|
||||
join t_supplierdetailsn sup on sup.SupplierID=po.SupplierID
|
||||
join t_materialmaster mm on mm.MaterialCode=pl.MaterialCode
|
||||
join t_configdetails cd on cd.key = mm.Category
|
||||
where po.Status != 'ST030' and po.Status = 'ST026 and po.IsOpenOrder != '1'
|
||||
where po.Status != 'ST030' and po.Status = 'ST026' and (po.IsOpenOrder IS NULL OR po.IsOpenOrder = 1)
|
||||
";
|
||||
if ($cname != '') {
|
||||
|
||||
$sql .= "and sup.SupplierName = '" . $cname . "'";
|
||||
$sql .= " and sup.SupplierName = '" . $cname . "'";
|
||||
}
|
||||
|
||||
|
||||
@ -2249,14 +2249,14 @@ where po.Status != 'ST030' and po.Status = 'ST026 and po.IsOpenOrder != '1'
|
||||
}
|
||||
if ($m != '') {
|
||||
|
||||
$sql .= "and monthname(po.PODate) = '" . $m . "'";
|
||||
$sql .= " and monthname(po.PODate) = '" . $m . "'";
|
||||
}
|
||||
|
||||
if ($frm and $t != '') {
|
||||
$fromd = date("Y-m-d", strtotime($frm));
|
||||
$tod = date("Y-m-d", strtotime($t));
|
||||
|
||||
$sql .= "and date(po.PODate) >= '" . $fromd . "'
|
||||
$sql .= " and date(po.PODate) >= '" . $fromd . "'
|
||||
and date(po.PODate) <= '" . $tod . "'";
|
||||
}
|
||||
if ($prod != '') {
|
||||
@ -2272,7 +2272,7 @@ where po.Status != 'ST030' and po.Status = 'ST026 and po.IsOpenOrder != '1'
|
||||
if ($purchaseorder_number != '') {
|
||||
$sql .= " and po.PONO = '" . $purchaseorder_number . "' ";
|
||||
}
|
||||
$sql .= "order by date(po.PODate) desc";
|
||||
$sql .= " order by date(po.PODate) desc";
|
||||
$query = $this->db->query($sql);
|
||||
//echo $sql;
|
||||
return $query->getResult();
|
||||
|
||||
@ -192,6 +192,7 @@
|
||||
<th>Driver</th>
|
||||
<th>Transporter</th>
|
||||
<th>IGR Status</th>
|
||||
<th>Remark</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -253,9 +254,10 @@
|
||||
}
|
||||
?>
|
||||
<td><?php echo $igrStatusUpdate; ?></td>
|
||||
<td style="width: 3% !important;"><?php echo $record->Remark; ?></td>
|
||||
<td>
|
||||
|
||||
<a target="_blank" data-toggle="modal" data-target="#Historyshow" data-id="<%=index%>" title="IGR History" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>">
|
||||
<a target="_blank" href="#" data-toggle="modal" data-target="#Historyshow" data-id="<%=index%>" title="IGR History" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>">
|
||||
<i class="fa fa-history" style="text-align: center;"></i>
|
||||
</a>
|
||||
|
||||
|
||||
@ -1,3 +1,9 @@
|
||||
<!-- Include jQuery first -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
|
||||
|
||||
<!-- Include jQuery Validation plugin -->
|
||||
<script src="https://cdn.jsdelivr.net/jquery.validation/1.19.3/jquery.validate.min.js"></script>
|
||||
|
||||
<?php
|
||||
|
||||
$EmpId = '';
|
||||
@ -75,17 +81,13 @@ if (!empty($EmpList)) {
|
||||
<div class="col-md-3">
|
||||
<label class="col-form-label">Role</label>
|
||||
<select class="form-control required" id="role" name="role" required>
|
||||
<option value="0">Select Role</option>
|
||||
<?php
|
||||
if (!empty($roles)) {
|
||||
foreach ($roles as $rl) {
|
||||
$selected = ($rl->roleId == $Role) ? 'selected' : '';
|
||||
?>
|
||||
<option value="<?php echo $rl->roleId ?>" <?php echo $selected; ?>><?php echo $rl->role ?></option>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<option value="">Select Role</option>
|
||||
<?php if (!empty($roles)) {
|
||||
foreach ($roles as $rl): ?>
|
||||
<option value="<?= $rl->roleId ?>" <?= ($rl->roleId == $Role) ? 'selected' : '' ?>>
|
||||
<?= $rl->role ?>
|
||||
</option>
|
||||
<?php endforeach; } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -313,4 +315,4 @@ if (!empty($EmpList)) {
|
||||
alert("Invalid email address");
|
||||
}
|
||||
});
|
||||
</script>>
|
||||
</script>
|
||||
@ -234,7 +234,7 @@
|
||||
<th>Driver</th>
|
||||
<th>Transporter</th>
|
||||
<th>IGR Status</th>
|
||||
<!-- <th>Remark</th> -->
|
||||
<th>Remark</th>
|
||||
<th>Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -297,12 +297,12 @@
|
||||
<td><?php echo $record->DriverName ?></td>
|
||||
<td><?php echo $record->TransporterName ?></td>
|
||||
<td><?php if($record->IGRStatus == 'ST029'){ echo 'Cancel'; } elseif($record->IGRStatus == 'ST074'){ echo 'Draft'; } else{ echo 'Completed'; } ?></td>
|
||||
<!-- <td style="width: 3% !important;"><?php // echo $record->Remark; ?></td> -->
|
||||
<td style="width: 3% !important;"><?php echo $record->Remark; ?></td>
|
||||
<td>
|
||||
|
||||
|
||||
|
||||
<a target="_blank" data-toggle="modal" data-target="#Historyshow" data-id="<%=index%>" title="IGR History" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>">
|
||||
<a target="_blank" data-toggle="modal" href="#" data-target="#Historyshow" data-id="<%=index%>" title="IGR History" data-igrno="<?php echo $record->IGRNO ?>" data-pono="<?php echo $record->PONO ?>">
|
||||
<i class="fa fa-history" style="text-align: center;"></i>
|
||||
</a>
|
||||
|
||||
@ -2469,421 +2469,6 @@
|
||||
|
||||
|
||||
<!-- 28/02/2025 -->
|
||||
|
||||
|
||||
<!-- add gas shortage calculator -->
|
||||
|
||||
<script>
|
||||
$('#grossWeightId, #tareWeightId,#actualWeightId').change(function() {
|
||||
|
||||
console.log("fine here ");
|
||||
|
||||
let grossWeightVal = $('#grossWeightId').val().trim();
|
||||
let tareWeightVal = $('#tareWeightId').val().trim();
|
||||
|
||||
// Ensure both fields have values before calculation
|
||||
if (grossWeightVal === '' || tareWeightVal === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
let grossWeight = validateNumber(grossWeightVal);
|
||||
let tareWeight = validateNumber(tareWeightVal);
|
||||
|
||||
let netWeight = grossWeight - tareWeight;
|
||||
$('#netWeightId').val(netWeight);
|
||||
|
||||
let actualWeightVal = $('#actualWeightId').val().trim();
|
||||
|
||||
// Ensure both fields have values before calculation
|
||||
if (actualWeightVal === '' || netWeight === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
let actualWeight = validateNumber(actualWeightVal);
|
||||
|
||||
let shortage = actualWeight - netWeight;
|
||||
$('#shortageId').val(shortage);
|
||||
});
|
||||
|
||||
|
||||
function validateNumber(givenValue) {
|
||||
givenValue = givenValue.trim();
|
||||
|
||||
if (/^\d+$/.test(givenValue)) {
|
||||
return parseInt(givenValue, 10); // Convert string to number
|
||||
} else {
|
||||
alert('Please Enter a Valid Number..!!');
|
||||
return 0; // Invalid number
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- while opening add gas shortage modal -->
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#gasShortageCalculator').on("shown.bs.modal", function(e){
|
||||
|
||||
//invoice needed to store it in the shortage table ,
|
||||
// coz based on this we can limit the addition of shortage must not exceed than given qty
|
||||
let invoiceNo = $('#Invoice_No').val();
|
||||
|
||||
|
||||
let materialReceivedDate = $('#MaterialRcvdDate').val().split("-");
|
||||
|
||||
//converting it to y-m-d format;
|
||||
console.log(`${materialReceivedDate[2]}-${materialReceivedDate[1]}-${materialReceivedDate[0]}`);
|
||||
|
||||
$('#invoiceNoId').val(invoiceNo);
|
||||
$('#fullCylinderDateId').val(`${materialReceivedDate[2]}-${materialReceivedDate[1]}-${materialReceivedDate[0]}`);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- while closing add gas shortage modal -->
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#gasShortageCalculator').on("hide.bs.modal", function(e){
|
||||
|
||||
$('#invoiceNoId').val(' ');
|
||||
$('#fullCylinderDateId').val(" ");
|
||||
$('#emptyCylinderDateId').val(" ");
|
||||
$('#cylinderNoId').val(" ");
|
||||
$('#grossWeightId').val(" ");
|
||||
$('#tareWeightId').val(" ");
|
||||
$('#actualWeightId').val(" ");
|
||||
$('#netWeightId').val(" ");
|
||||
$('#shortageId').val(" ");
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- end of add gas shortage calculator -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- edit gasShortageCalculator -->
|
||||
|
||||
<script>
|
||||
$('#editGrossWeightId,#editTareWeightId,#editActualWeightId').change(function() {
|
||||
let grossWeightVal = $('#editGrossWeightId').val().trim();
|
||||
let tareWeightVal = $('#editTareWeightId').val().trim();
|
||||
|
||||
// Ensure both fields have values before calculation
|
||||
if (grossWeightVal === '' || tareWeightVal === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
let grossWeight = validateNumber(grossWeightVal);
|
||||
let tareWeight = validateNumber(tareWeightVal);
|
||||
|
||||
let netWeight = grossWeight - tareWeight;
|
||||
$('#editNetWeightId').val(netWeight);
|
||||
|
||||
let actualWeightVal = $('#editActualWeightId').val().trim();
|
||||
|
||||
// Ensure both fields have values before calculation
|
||||
if (actualWeightVal === '' || netWeight === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
let actualWeight = validateNumber(actualWeightVal);
|
||||
|
||||
let shortage = actualWeight - netWeight;
|
||||
$('#editShortageId').val(shortage);
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<!-- while opening edit gas shortage modal -->
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#editGasShortageCalculator').on("shown.bs.modal", function(e){
|
||||
|
||||
|
||||
//invoice needed to store it in the shortage table ,
|
||||
// coz based on this we can limit the addition of shortage must not exceed than given qty
|
||||
let invoiceNo = $('#Invoice_No').val();
|
||||
|
||||
|
||||
let materialReceivedDate = $('#MaterialRcvdDate').val().split("-");
|
||||
|
||||
//converting it to y-m-d format;
|
||||
console.log(`${materialReceivedDate[2]}-${materialReceivedDate[1]}-${materialReceivedDate[0]}`);
|
||||
|
||||
$('#editInvoiceNoId').val(invoiceNo);
|
||||
$('#editFullCylinderDateId').val(`${materialReceivedDate[2]}-${materialReceivedDate[1]}-${materialReceivedDate[0]}`);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- while closing edit gas shortage modal -->
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
$('#editGasShortageCalculator').on("hide.bs.modal", function(e){
|
||||
$('#editInvoiceNoId').val(' ');
|
||||
$('#editFullCylinderDateId').val(" ");
|
||||
$('#editEmptyCylinderDateId').val(" ");
|
||||
$('#editCylinderNoId').val(" ");
|
||||
$('#editGrossWeightId').val(" ");
|
||||
$('#editTareWeightId').val(" ");
|
||||
$('#editActualWeightId').val(" ");
|
||||
$('#editNetWeightId').val(" ");
|
||||
$('#editShortageId').val(" ");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<!-- end of edit gasShortageCalculator -->
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- while opening gasShortageList -->
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#gasShortageList').on("shown.bs.modal",function(e){
|
||||
|
||||
let invoiceNo = $('#Invoice_No').val();
|
||||
|
||||
console.log("invoice no", invoiceNo);
|
||||
|
||||
$('#loader').show();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo base_url()?>/gasShortageList", // 🔹 Change this to your actual backend endpoint
|
||||
data: {invoiceNo},
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.status === "success") {
|
||||
|
||||
let data = response.data ;
|
||||
|
||||
let tableData = '';
|
||||
|
||||
data.forEach((val) => {
|
||||
|
||||
let fullCylinderDate = val.fullCylinderDate.split("-").reverse().join("-");
|
||||
let emptyCylinderDate = val.emptyCylinderDate.split("-").reverse().join('-');
|
||||
|
||||
tableData += `
|
||||
<tr>
|
||||
<td>${fullCylinderDate}</td>
|
||||
<td>${emptyCylinderDate}</td>
|
||||
<td>${val.invoiceNo}</td>
|
||||
<td>${val.cylinderNo}</td>
|
||||
<td>${val.grossWeight}</td>
|
||||
<td>${val.tareWeight}</td>
|
||||
<td>${val.netWeight}</td>
|
||||
<td>${val.actualWeight}</td>
|
||||
<td>${val.shortage}</td>
|
||||
<td style="display:none">${val.id}</td>
|
||||
<td style="width: 25px; cursor: pointer;">
|
||||
<i class="fa fa-solid fa-edit btnEditGasShortageCalculator"
|
||||
style="text-align: center;"
|
||||
data-toggle="modal"
|
||||
data-target="#editGasShortageCalculator"
|
||||
data-id="${val.id}"
|
||||
title="Edit Gas Shortage List">
|
||||
</i>
|
||||
</td>
|
||||
</tr>`;
|
||||
});
|
||||
|
||||
// Assuming you have a table with ID "gasShortageTable"
|
||||
$("#gasShortageTable tbody").html(tableData);
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
alert("Error: " + response.message);
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.log(xhr.responseText);
|
||||
alert("Something went wrong! Please try again.");
|
||||
},
|
||||
complete:function(){
|
||||
console.log("ajax call is completed..!!");
|
||||
$('#loader').hide();
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<!-- while closing gasShortageList -->
|
||||
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
|
||||
$('#gasShortageList').on("hide.bs.modal",function(){
|
||||
$("#gasShortageTable tbody").html(" ");
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- ajax call for gas Shortage -->
|
||||
<script>
|
||||
|
||||
$("#gasShortageCalculator, #editGasShortageCalculator").submit(function (event) {
|
||||
|
||||
event.preventDefault(); // Prevent form reload
|
||||
|
||||
let formData;
|
||||
|
||||
let method = $(this).closest(".modal").data("form");
|
||||
|
||||
// Prepare form data
|
||||
let addFormData = {
|
||||
fullCylinderDate: $('#fullCylinderDateId').val(),
|
||||
emptyCylinderDate: $('#emptyCylinderDateId').val(),
|
||||
invoiceNo: $('#invoiceNoId').val(),
|
||||
cylinderNo: $('#cylinderNoId').val(),
|
||||
grossWeight: $('#grossWeightId').val(),
|
||||
tareWeight: $('#tareWeightId').val(),
|
||||
actualWeight: $('#actualWeightId').val(),
|
||||
netWeight: $('#netWeightId').val(),
|
||||
shortage: $('#shortageId').val()
|
||||
};
|
||||
|
||||
let editFormData = {
|
||||
fullCylinderDate: $('#editFullCylinderDateId').val(),
|
||||
emptyCylinderDate: $('#editEmptyCylinderDateId').val(),
|
||||
invoiceNo: $('#editInvoiceNoId').val(),
|
||||
cylinderNo: $('#editCylinderNoId').val(),
|
||||
grossWeight: $('#editGrossWeightId').val(),
|
||||
tareWeight: $('#editTareWeightId').val(),
|
||||
actualWeight: $('#editActualWeightId').val(),
|
||||
netWeight: $('#editNetWeightId').val(),
|
||||
shortage: $('#editShortageId').val(),
|
||||
id : $('#editId').val()
|
||||
};
|
||||
|
||||
if(method == "add"){ formData = addFormData ;}
|
||||
if(method == "edit"){ formData = editFormData ;}
|
||||
|
||||
|
||||
$('#loader').show();
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo base_url()?>/updateGasShortage", // 🔹 Change this to your actual backend endpoint
|
||||
data: formData,
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.status === "success") {
|
||||
alert("Gas Shortage Data Saved Successfully!");
|
||||
$('#gasShortageCalculator').modal('hide'); // Close modal
|
||||
$('#editGasShortageCalculator').modal('hide');
|
||||
} else {
|
||||
alert("Error: " + response.message);
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.log(xhr.responseText);
|
||||
alert("Something went wrong! Please try again.");
|
||||
},
|
||||
complete:function(){
|
||||
console.log("ajax call is completed..!!");
|
||||
$('#loader').hide();
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<script>
|
||||
$(document).on("click", ".btnEditGasShortageCalculator", function () {
|
||||
console.log("Edit modal opening place");
|
||||
|
||||
let id = $(this).data("id");
|
||||
console.log("Editing ID:", id);
|
||||
|
||||
// Smooth transition: First hide, then show after 300ms
|
||||
$("#gasShortageList").modal("hide");
|
||||
|
||||
setTimeout(() => {
|
||||
$("#editGasShortageCalculator").modal("show");
|
||||
}, 300);
|
||||
|
||||
$('#loader').show();
|
||||
// AJAX request to fetch data
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "<?php echo base_url()?>/getGasShortageDetail",
|
||||
data: { id: id },
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
if (response.status === "success") {
|
||||
let data = response.data;
|
||||
|
||||
console.log(data);
|
||||
|
||||
if(data.length > 0){
|
||||
|
||||
data = data[0];
|
||||
|
||||
console.log(data);
|
||||
|
||||
// Populate the modal fields
|
||||
$("#editFullCylinderDateId").val(data.fullCylinderDate);
|
||||
$("#editEmptyCylinderDateId").val(data.emptyCylinderDate);
|
||||
$("#editInvoiceNoId").val(data.invoiceNo);
|
||||
$("#editCylinderNoId").val(data.cylinderNo);
|
||||
$("#editGrossWeightId").val(data.grossWeight);
|
||||
$("#editTareWeightId").val(data.tareWeight);
|
||||
$("#editNetWeightId").val(data.netWeight);
|
||||
$("#editActualWeightId").val(data.actualWeight);
|
||||
$("#editShortageId").val(data.shortage);
|
||||
$("#editId").val(data.id); // Hidden field for ID
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
alert("Error: " + response.message);
|
||||
}
|
||||
},
|
||||
error: function (xhr, status, error) {
|
||||
console.log(xhr.responseText);
|
||||
alert("Something went wrong! Please try again.");
|
||||
},
|
||||
complete:function(){
|
||||
console.log("ajax call is completed..!!");
|
||||
$('#loader').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
@ -5,25 +5,64 @@
|
||||
*
|
||||
* @author Kishor Mali
|
||||
*/
|
||||
$(document).ready(function(){
|
||||
|
||||
var editUserForm = $("#editUser");
|
||||
|
||||
var validator = editUserForm.validate({
|
||||
|
||||
rules:{
|
||||
fname :{ required : true },
|
||||
email : { required : true, email : true, remote : { url : baseURL + "checkEmailExists", type :"post", data : { userId : function(){ return $("#userId").val(); } } } },
|
||||
cpassword : {equalTo: "#password"},
|
||||
mobile : { required : true, digits : true },
|
||||
role : { required : true, selected : true}
|
||||
},
|
||||
messages:{
|
||||
fname :{ required : "This field is required" },
|
||||
email : { required : "This field is required", email : "Please enter valid email address", remote : "Email already taken" },
|
||||
cpassword : {equalTo: "Please enter same password" },
|
||||
mobile : { required : "This field is required", digits : "Please enter numbers only" },
|
||||
role : { required : "This field is required", selected : "Please select atleast one option" }
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).ready(function () {
|
||||
var editUserForm = $("#editUser");
|
||||
var baseURL = '<?php echo base_url(); ?>checkEmailExists';
|
||||
|
||||
var validator = editUserForm.validate({
|
||||
rules: {
|
||||
fname: { required: true },
|
||||
email: {
|
||||
required: true,
|
||||
email: true,
|
||||
remote: {
|
||||
param: {
|
||||
url: baseURL,
|
||||
type: "post",
|
||||
data: {
|
||||
userId: function () {
|
||||
return $("#userId").val();
|
||||
}
|
||||
}
|
||||
},
|
||||
depends: function () {
|
||||
return $("#email").val().length > 0;
|
||||
}
|
||||
}
|
||||
},
|
||||
cpassword: { equalTo: "#password" },
|
||||
mobile: { required: true, digits: true },
|
||||
// role: { required: true, selected: true }
|
||||
role: { required: true }
|
||||
},
|
||||
messages: {
|
||||
fname: { required: "This field is required" },
|
||||
email: {
|
||||
required: "This field is required",
|
||||
email: "Please enter valid email address",
|
||||
remote: "Email already taken"
|
||||
},
|
||||
cpassword: { equalTo: "Please enter same password" },
|
||||
mobile: {
|
||||
required: "This field is required",
|
||||
digits: "Please enter numbers only"
|
||||
},
|
||||
role: {
|
||||
required: "Please select the option"
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#reset").on("click", function (e) {
|
||||
|
||||
editUserForm[0].reset();
|
||||
|
||||
|
||||
validator.resetForm();
|
||||
|
||||
|
||||
editUserForm.find(".error").removeClass("error");
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user