FIX_CLIENT_BRANCH_MOBILE_VALIDATAION : RV
This commit is contained in:
parent
115f472951
commit
b42704f25d
@ -88,7 +88,7 @@
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Contact Mobile ( starting with 6, 7, 8, or 9 only. )" name="mobile[]" id="mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" minlength="10" pattern="^[6-9]\d{9}$" data-parsley-type-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9." data-parsley-required-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9." required>
|
||||
<input value="" type="text" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" minlength="10" data-parsley-type-message="Please enter a valid 10-digit mobile number." data-parsley-required-message="Please enter a valid 10-digit mobile number." required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="designation">Designation<span class="text-danger">*</span></label>
|
||||
@ -97,7 +97,7 @@
|
||||
</div>
|
||||
<div class="form-group" style="display: flex;">
|
||||
<button style="margin-right: 10px;" type="button" class="btn btn-primary btn-sm ac" onclick="appendContactHtml()" id="add">Add Contact</button>
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)" id="${uniqueId}_remove">Remove</button>
|
||||
<button type="button" class="btn btn-danger btn-sm" onclick="removeContact(this)" id="remove_btn">Remove</button>
|
||||
</div>
|
||||
|
||||
<div id="container"></div>
|
||||
@ -293,7 +293,6 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('body').on('click', '.btnBranchEdit', function () {
|
||||
|
||||
console.log(branch_form_action);
|
||||
@ -352,6 +351,13 @@ $(document).ready(function () {
|
||||
});
|
||||
|
||||
|
||||
$("#remove_btn").click(function(){
|
||||
$("#name").val('');
|
||||
$("#email").val('');
|
||||
$("#mobile").val('');
|
||||
$("#designation").val('');
|
||||
})
|
||||
|
||||
// Initialize the contact count
|
||||
function appendContactHtml(contact = false, reset = false) {
|
||||
|
||||
@ -379,7 +385,7 @@ $(document).ready(function () {
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_mobile">Mobile<span class="text-danger">*</span></label>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.mobile : ''}" type="text" class="form-control" placeholder="Enter Contact Mobile ( starting with 6, 7, 8, or 9 only. )" name="mobile[]" id="${uniqueId}_mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" min="10" pattern="^[6-9]\d{9}$" data-parsley-type-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9." data-parsley-required-message="Please enter a valid 10-digit mobile number starting with 6, 7, 8, or 9." required>
|
||||
<input value="${contact !== undefined && contact !== false ? contact.mobile : ''}" type="text" class="form-control" placeholder="Enter Contact Mobile" name="mobile[]" id="${uniqueId}_mobile" onkeypress = "return onlyNumbers(event)" maxlength="10" min="10" data-parsley-type-message="Please enter a valid 10-digit mobile number." data-parsley-required-message="Please enter a valid 10-digit mobile number." required>
|
||||
</div>
|
||||
<div class="form-group col-md-6">
|
||||
<label for="${uniqueId}_designation">Designation<span class="text-danger">*</span></label>
|
||||
|
||||
@ -160,6 +160,12 @@
|
||||
$('#table_list').hide();
|
||||
$('.btnBack').show();
|
||||
$('.btnAdd').hide();
|
||||
$('#insurer').val('');
|
||||
$('#tpa').val('');
|
||||
$('#start_date').val('');
|
||||
$('#end_date').val('');
|
||||
$('#policy').html('<option value="" selected>Select Policy</option>');
|
||||
$('#is_addon').prop('checked', false);
|
||||
$('#policy_form_action').val('<?= base_url("client/policy/create"); ?>');
|
||||
|
||||
})
|
||||
@ -299,6 +305,13 @@
|
||||
`;
|
||||
});
|
||||
$('#policy_table').append(policyTable);
|
||||
|
||||
$('#insurer').val('');
|
||||
$('#tpa').val('');
|
||||
$('#start_date').val('');
|
||||
$('#end_date').val('');
|
||||
$('#policy').html('<option value="" selected>Select Policy</option>');
|
||||
$('#is_addon').prop('checked', false);
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
console.error(xhr.responseText);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user