Production fix
This commit is contained in:
parent
d0bfc15f57
commit
c0a840fa51
@ -1,4 +1,26 @@
|
||||
|
||||
<script>
|
||||
function BlockSpecial(evt) {
|
||||
var charCode;
|
||||
if (window.event)
|
||||
charCode = window.event.keyCode; //for IE
|
||||
else
|
||||
charCode = evt.which; //for firefox
|
||||
|
||||
if (charCode >= 91 && charCode <= 96)
|
||||
return false;
|
||||
if (charCode >= 123 && charCode <= 126)
|
||||
return false;
|
||||
if (charCode >= 33 && charCode <= 47)
|
||||
return false;
|
||||
if (charCode >= 58&& charCode <= 64)
|
||||
return false;
|
||||
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Content Header (Page header) -->
|
||||
<section class="content-header">
|
||||
@ -32,7 +54,7 @@
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<span for="MaterialName">Material Name</span>
|
||||
<input type="text" class="form-control required " required id="MaterialName" name="MaterialName" maxlength="255">
|
||||
<input type="text" class="form-control required " onkeypress="return BlockSpecial(event);" required id="MaterialName" name="MaterialName" maxlength="255">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
@ -56,7 +78,7 @@
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group">
|
||||
<span for="UOM">Unit of Mesurement</span>
|
||||
<span for="UOM">Unit of Measurement</span>
|
||||
<select class="form-control required" id="UOM" name="UOM">
|
||||
<option value="-1" required>Select UOM</option>
|
||||
<?php
|
||||
|
||||
@ -260,7 +260,7 @@ function onlyAlphabets(evt) {
|
||||
</div>
|
||||
<div class="col-md-3 pad">
|
||||
<span for="TIN">TIN</span><span class="badge">*</span>
|
||||
<input type="text" class="form-control required" pattern="(.){11,11}" id="TIN" name="TIN" minlength="11" maxlength="11" onkeypress="return event.charCode >= 48 && event.charCode <= 57" title="Please Enter 11 digit Number">
|
||||
<input type="text" class="form-control required" pattern="(.){11,11}" id="TIN" name="TIN" minlength="11" maxlength="11" onkeypress="return event.charCode >= 48 && event.charCode <= 57" required title="Please Enter 11 digit Number">
|
||||
</div>
|
||||
<div class="col-md-3 pad">
|
||||
<span for="UANumber">UA Number</span>
|
||||
@ -333,7 +333,7 @@ function onlyAlphabets(evt) {
|
||||
<div class="col-md-3 col-md-offset-9">
|
||||
<div class="pull-right">
|
||||
<input type="reset" id="reset" class="btn btn-info" value="Reset" />
|
||||
<input type="submit" onclick="validate();" class="btn btn-primary">
|
||||
<input type="submit" onclick="return Validate();" class="btn btn-primary">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -384,9 +384,15 @@ function Validate()
|
||||
{
|
||||
if(!validatePAN())
|
||||
{
|
||||
return false;
|
||||
|
||||
$('#panno').focus();
|
||||
return false;
|
||||
}
|
||||
if(!validateEmail())
|
||||
{
|
||||
$('#emailid').focus();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//Call to ajax existing PAN
|
||||
@ -404,15 +410,18 @@ function Validate()
|
||||
if(data)
|
||||
{
|
||||
|
||||
var answer = confirm(data+""+" supplier details is already exists in the database.Do you want to change the SUPPLIER details?")
|
||||
if (answer) {
|
||||
$('#panno').val('');
|
||||
var answer = confirm(data + " " +" supplier details is already exists in the database.Do you want to change the SUPPLIER details?")
|
||||
if (answer)
|
||||
{
|
||||
$('#panno').val('');
|
||||
|
||||
$('#panno').focus();
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
alert('Please edit the supplier details in the Edit screen and change the supplier status to Active');
|
||||
window.location = 'supplier/supplierListing';
|
||||
window.location = 'supplier/supplierListing';
|
||||
}
|
||||
|
||||
}
|
||||
@ -424,6 +433,7 @@ function Validate()
|
||||
{
|
||||
alert('Please enter the PAN Number');
|
||||
$('#panno').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -67,24 +67,7 @@ if(!empty($supplier))
|
||||
?>
|
||||
<script>
|
||||
|
||||
//Email Validate
|
||||
function validateEmail() {
|
||||
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
|
||||
|
||||
var email = $('#EmailAddress').val();
|
||||
if(email != "")
|
||||
{
|
||||
if (reg.test(email) == false)
|
||||
{
|
||||
alert('Please Enter Valid Email Address');
|
||||
return (false);
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function blockKeyPress(evt)
|
||||
{
|
||||
var charCode = (evt.which) ? evt.which : evt.keyCode;
|
||||
@ -112,7 +95,7 @@ function validateEmail() {
|
||||
|
||||
//PAN Validate
|
||||
function validatePAN() {
|
||||
var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}$/;
|
||||
var reg = /(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}$/;
|
||||
|
||||
var PAN = $('#panno').val();
|
||||
|
||||
@ -136,7 +119,7 @@ function validatePAN() {
|
||||
|
||||
}
|
||||
function validateECCNumber() {
|
||||
var reg = /(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}(?=.*[A-Za-z]).{2,}(?=.*[0-9]).{3,}$/;
|
||||
var reg = /(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}(?=.*[A-Z]).{2,}(?=.*[0-9]).{3,}$/;
|
||||
|
||||
var ECC = $('#Exciseregistration').val();
|
||||
|
||||
@ -292,7 +275,7 @@ function onlyAlphabets(evt) {
|
||||
|
||||
<div class="col-md-2 pad">
|
||||
<span for="EmailAddress">Email ID</span><span class="badge">*</span>
|
||||
<input type="email" name="emailid" id="emailid" required maxlength="100" class="form-control" value="<?php echo $EmailAddress;?>">
|
||||
<input type="email" name="emailid" id="emailid" pattern="([A-Z0-9_\-\.])+\@([A-Z0-9_\-\.])+\.([A-Z]{2,4})" required maxlength="100" class="form-control" value="<?php echo $EmailAddress;?>" title="Please Enter valid mail address" onchange="validateEmail();">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
</br><input type="checkbox" id="isactive" <?php echo $IsActive;?> name="isactive" > IsActive </div>
|
||||
@ -313,7 +296,7 @@ function onlyAlphabets(evt) {
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
<span for="PAN">PAN</span> <span class="badge">*</span>
|
||||
<input type="text" id="panno" maxlength="10" name="panno" required pattern="(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}" onchange="validatePAN();" class="form-control" value="<?php echo $PAN;?>" title="Please Enter 5 Character and 4 digit numbers and 1 Character format">
|
||||
<input type="text" id="panno" maxlength="10" name="panno" required pattern="(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}" onchange="validatePAN();" class="form-control" value="<?php echo $PAN;?>" title="Please Enter 5 Character and 4 digit numbers and 1 Character format">
|
||||
</div>
|
||||
<div class="col-md-3 pad">
|
||||
<span for="TIN">TIN</span><span class="badge">*</span>
|
||||
@ -326,7 +309,7 @@ function onlyAlphabets(evt) {
|
||||
|
||||
<div class="col-md-3 pad">
|
||||
<span for="Exciseregistration">Excise Registration</span>
|
||||
<input type="text" class="form-control required" onchange="validateECCNumber();" id="Exciseregistration" name="Exciseregistration" minlength="15" maxlength="15" value="<?php echo $Exiseregistration;?>" title="Please enter PAN Number and EM/ED option and 3 digit Numbers format" pattern="(?=.*[A-Za-z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Za-z]).{1,}(?=.*[A-Za-z]).{2,}(?=.*[0-9]).{3,}">
|
||||
<input type="text" class="form-control required" onchange="validateECCNumber();" id="Exciseregistration" name="Exciseregistration" minlength="15" maxlength="15" value="<?php echo $Exiseregistration;?>" title="Please enter PAN Number and EM/ED option and 3 digit Numbers format" pattern="(?=.*[A-Z]).{5,}(?=.*[0-9]).{4,}(?=.*[A-Z]).{1,}(?=.*[A-Z]).{2,}(?=.*[0-9]).{3,}">
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<span for="GSTNo">GST Number</span>
|
||||
@ -461,6 +444,7 @@ function Validate()
|
||||
if (answer) {
|
||||
$('#panno').val('');
|
||||
$('#panno').focus();
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -477,6 +461,7 @@ function Validate()
|
||||
{
|
||||
alert('Please enter the PAN Number');
|
||||
$('#panno').focus();
|
||||
return false;
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user