changes in Neb1, Neb arise form - team3
Specific Folder FTP Upload / ftp-deploy (push) Successful in 35s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 35s
Details
This commit is contained in:
parent
413f812494
commit
cfc9ed70d2
|
|
@ -190,6 +190,15 @@
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
|
|
||||||
|
|
||||||
|
// Chemist Shop Name - Alphabetic only
|
||||||
|
$('#field-chemist_name').on('input', function () {
|
||||||
|
this.value = this.value.replace(/[^A-Za-z ]/g, '');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Name of Staff - Alphabetic only
|
||||||
|
$('#field-name_of_staff').on('input', function () {
|
||||||
|
this.value = this.value.replace(/[^A-Za-z ]/g, '');
|
||||||
|
});
|
||||||
// Phone No. of Staff - Numeric only, starts with 6-9, max 10 digits
|
// Phone No. of Staff - Numeric only, starts with 6-9, max 10 digits
|
||||||
$('#field-phone_no_of_staff').on('input', function () {
|
$('#field-phone_no_of_staff').on('input', function () {
|
||||||
|
|
||||||
|
|
@ -204,6 +213,32 @@
|
||||||
this.value = this.value.slice(0, 10);
|
this.value = this.value.slice(0, 10);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const respuleFields = [
|
||||||
|
'#field-duolin_respule',
|
||||||
|
'#field-foracort_respule',
|
||||||
|
'#field-budecort_respule',
|
||||||
|
'#field-levolin_respule',
|
||||||
|
'#field-glycohale_respule',
|
||||||
|
'#field-hyperneb_respule',
|
||||||
|
'#field-tobamist_respule',
|
||||||
|
'#field-budesal_respule',
|
||||||
|
'#field-flohale_respule',
|
||||||
|
'#field-inhalex_respule',
|
||||||
|
'#field-mucinac_respule'
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
$(respuleFields.join(',')).on('input', function () {
|
||||||
|
this.value = this.value.replace(/[^0-9]/g, '');
|
||||||
|
});
|
||||||
|
$(respuleFields.join(',')).attr({
|
||||||
|
min: 0,
|
||||||
|
step: 1,
|
||||||
|
inputmode: 'numeric'
|
||||||
|
});
|
||||||
$('#field-user_id').change(function(){
|
$('#field-user_id').change(function(){
|
||||||
let hierarchy = $('option:selected', this).attr('hierarchy');
|
let hierarchy = $('option:selected', this).attr('hierarchy');
|
||||||
$('#field-hierarchy_id').val(hierarchy)
|
$('#field-hierarchy_id').val(hierarchy)
|
||||||
|
|
@ -408,11 +443,35 @@
|
||||||
var dd = String(today.getDate()).padStart(2, '0');
|
var dd = String(today.getDate()).padStart(2, '0');
|
||||||
var mm = String(today.getMonth() + 1).padStart(2, '0');
|
var mm = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
var yyyy = today.getFullYear();
|
var yyyy = today.getFullYear();
|
||||||
today = yyyy + '-' + mm + '-' + dd;
|
|
||||||
|
var currentDate = yyyy + '-' + mm + '-' + dd;
|
||||||
|
|
||||||
var plandateField = document.getElementById('field-record_date');
|
var plandateField = document.getElementById('field-record_date');
|
||||||
|
|
||||||
plandateField.setAttribute('max', today);
|
if (plandateField) {
|
||||||
|
plandateField.setAttribute('min', '2026-06-01');
|
||||||
|
plandateField.setAttribute('max', currentDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (const field of respuleFields) {
|
||||||
|
|
||||||
|
let value = $(field).val();
|
||||||
|
|
||||||
|
if (value !== '' && !/^\d+$/.test(value)) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Validation Error',
|
||||||
|
text: 'Respule quantities must be whole numbers only.'
|
||||||
|
});
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,15 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
|
|
||||||
|
// Chemist Shop Name - Alphabetic only
|
||||||
|
$('#field-chemist_name').on('input', function () {
|
||||||
|
this.value = this.value.replace(/[^A-Za-z ]/g, '');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Name of Staff - Alphabetic only
|
||||||
|
$('#field-name_of_staff').on('input', function () {
|
||||||
|
this.value = this.value.replace(/[^A-Za-z ]/g, '');
|
||||||
|
});
|
||||||
// Phone No. of Staff - Numeric only, starts with 6-9, max 10 digits
|
// Phone No. of Staff - Numeric only, starts with 6-9, max 10 digits
|
||||||
$('#field-phone_no_of_staff').on('input', function () {
|
$('#field-phone_no_of_staff').on('input', function () {
|
||||||
|
|
||||||
|
|
@ -204,6 +212,32 @@
|
||||||
this.value = this.value.slice(0, 10);
|
this.value = this.value.slice(0, 10);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const respuleFields = [
|
||||||
|
'#field-duolin_respule',
|
||||||
|
'#field-foracort_respule',
|
||||||
|
'#field-budecort_respule',
|
||||||
|
'#field-levolin_respule',
|
||||||
|
'#field-glycohale_respule',
|
||||||
|
'#field-hyperneb_respule',
|
||||||
|
'#field-tobamist_respule',
|
||||||
|
'#field-budesal_respule',
|
||||||
|
'#field-flohale_respule',
|
||||||
|
'#field-inhalex_respule',
|
||||||
|
'#field-mucinac_respule'
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
$(respuleFields.join(',')).on('input', function () {
|
||||||
|
this.value = this.value.replace(/[^0-9]/g, '');
|
||||||
|
});
|
||||||
|
$(respuleFields.join(',')).attr({
|
||||||
|
min: 0,
|
||||||
|
step: 1,
|
||||||
|
inputmode: 'numeric'
|
||||||
|
});
|
||||||
$('#field-user_id').change(function(){
|
$('#field-user_id').change(function(){
|
||||||
let hierarchy = $('option:selected', this).attr('hierarchy');
|
let hierarchy = $('option:selected', this).attr('hierarchy');
|
||||||
$('#field-hierarchy_id').val(hierarchy)
|
$('#field-hierarchy_id').val(hierarchy)
|
||||||
|
|
@ -406,11 +440,36 @@
|
||||||
var dd = String(today.getDate()).padStart(2, '0');
|
var dd = String(today.getDate()).padStart(2, '0');
|
||||||
var mm = String(today.getMonth() + 1).padStart(2, '0');
|
var mm = String(today.getMonth() + 1).padStart(2, '0');
|
||||||
var yyyy = today.getFullYear();
|
var yyyy = today.getFullYear();
|
||||||
today = yyyy + '-' + mm + '-' + dd;
|
|
||||||
|
var currentDate = yyyy + '-' + mm + '-' + dd;
|
||||||
|
|
||||||
var plandateField = document.getElementById('field-record_date');
|
var plandateField = document.getElementById('field-record_date');
|
||||||
|
|
||||||
plandateField.setAttribute('max', today);
|
if (plandateField) {
|
||||||
|
plandateField.setAttribute('min', '2026-06-01');
|
||||||
|
plandateField.setAttribute('max', currentDate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (const field of respuleFields) {
|
||||||
|
|
||||||
|
let value = $(field).val();
|
||||||
|
|
||||||
|
if (value !== '' && !/^\d+$/.test(value)) {
|
||||||
|
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
Swal.fire({
|
||||||
|
icon: 'error',
|
||||||
|
title: 'Validation Error',
|
||||||
|
text: 'Respule quantities must be whole numbers only.'
|
||||||
|
});
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue