Team 3 Form changes Doctor Activities for Neb 1
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m44s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 1m44s
Details
This commit is contained in:
parent
7036316753
commit
2e3f3a1cf3
|
|
@ -270,6 +270,7 @@
|
|||
@endswitch
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
@if (!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes'))
|
||||
<div class="text-center d-grid mt-3">
|
||||
<button class="btn btn-primary" type="submit" id="submit-btn"> Submit
|
||||
|
|
@ -385,6 +386,18 @@
|
|||
@endswitch
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="col-md-12 mb-2" id="execution-doctor-category-wrapper" style="display:none;">
|
||||
<label for="execution-doctor_category" class="form-label">
|
||||
Doctor Category <span class="text-danger">*</span>
|
||||
</label>
|
||||
|
||||
<select class="form-control" id="execution-doctor_category" name="doctor_category">
|
||||
<option value=""> -- Select -- </option>
|
||||
<option value="Top 30">Top 30</option>
|
||||
<option value="Next 30">Next 30</option>
|
||||
<option value="Non Believers">Non Believers</option>
|
||||
</select>
|
||||
</div>
|
||||
@if (!isset($form->is_approval) || (isset($form->is_approval) && $form->is_approval != 'yes'))
|
||||
<div class="text-center d-grid mt-3">
|
||||
<button class="btn btn-primary" type="submit" id="submit-btn"> Submit
|
||||
|
|
@ -541,24 +554,44 @@
|
|||
})
|
||||
|
||||
|
||||
$('#field-msl_code,#field-speciality,#field-other_msl_code,#field-other_speciality').attr('readonly',true);
|
||||
|
||||
$('#field-msl_code,#field-speciality').attr('readonly',true);
|
||||
$('#field-name_of_the_speaker').change(function() {
|
||||
let value=$(this).val();
|
||||
if(value==='other'){
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').parent().show();
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').attr('required',true);
|
||||
|
||||
$('#field-msl_code,#field-speciality').parent().hide();
|
||||
$('#field-msl_code,#field-speciality').attr('required',false);
|
||||
}
|
||||
else{
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').parent().hide();
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name').attr('required',false);
|
||||
$('#field-msl_code,#field-speciality').parent().show();
|
||||
$('#field-msl_code,#field-speciality').attr('required',true);
|
||||
}
|
||||
})
|
||||
let value = $(this).val();
|
||||
|
||||
if(value === 'other') {
|
||||
$('#field-doctor_category').parent().show();
|
||||
$('#field-doctor_category').attr('required', true);
|
||||
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name')
|
||||
.parent().show();
|
||||
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name')
|
||||
.attr('required', true);
|
||||
|
||||
$('#field-msl_code,#field-speciality').parent().hide();
|
||||
|
||||
$('#field-msl_code,#field-speciality').attr('required', false);
|
||||
|
||||
} else {
|
||||
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name')
|
||||
.parent().hide();
|
||||
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name')
|
||||
.attr('required', false);
|
||||
|
||||
$('#field-msl_code,#field-speciality').parent().show();
|
||||
|
||||
$('#field-msl_code,#field-speciality').attr('required', true);
|
||||
|
||||
// Hide Doctor Category
|
||||
$('#doctor-category-wrapper').hide();
|
||||
$('#field-doctor_category').attr('required', false);
|
||||
$('#field-doctor_category').val('');
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name,#field-other_type_of_meeting').parent().hide();
|
||||
$('#field-other_msl_code,#field-other_speciality,#field-other_speaker_name,#field-other_type_of_meeting').attr('required',false);
|
||||
|
|
@ -571,13 +604,13 @@
|
|||
$('#field-speciality').val($('option:selected', this).attr('speciality'))
|
||||
})
|
||||
|
||||
$('#field-other_speaker_name').change(function() {
|
||||
$('#field-other_msl_code').val($('option:selected', this).attr('msl_code'))
|
||||
})
|
||||
$('#field-other_speaker_name').on('input', function () {
|
||||
this.value = this.value.replace(/[^a-zA-Z\s]/g, '');
|
||||
});
|
||||
|
||||
$('#field-other_speaker_name').change(function() {
|
||||
$('#field-other_speciality').val($('option:selected', this).attr('speciality'))
|
||||
})
|
||||
$('#field-other_speciality').on('input', function () {
|
||||
this.value = this.value.replace(/[^a-zA-Z\s]/g, '');
|
||||
});
|
||||
|
||||
|
||||
$('#field-type_of_meeting').on('change',function(){
|
||||
|
|
@ -839,24 +872,54 @@
|
|||
|
||||
|
||||
|
||||
$('#execution-msl_code,#execution-speciality,#execution-other_msl_code,#execution-other_speciality').attr('readonly',true);
|
||||
$('#execution-msl_code,#execution-speciality').attr('readonly',true);
|
||||
|
||||
$('#execution-name_of_the_speaker').change(function() {
|
||||
let value=$(this).val();
|
||||
if(value==='other'){
|
||||
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').parent().show();
|
||||
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').attr('required',true);
|
||||
|
||||
$('#execution-msl_code,#execution-speciality').parent().hide();
|
||||
$('#execution-msl_code,#execution-speciality').attr('required',false);
|
||||
}
|
||||
else{
|
||||
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').parent().hide();
|
||||
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name').attr('required',false);
|
||||
$('#execution-msl_code,#execution-speciality').parent().show();
|
||||
$('#execution-msl_code,#execution-speciality').attr('required',true);
|
||||
}
|
||||
})
|
||||
let value = $(this).val();
|
||||
|
||||
if(value === 'other') {
|
||||
|
||||
// Show Other doctor fields
|
||||
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name')
|
||||
.parent().show();
|
||||
|
||||
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name')
|
||||
.attr('required', true);
|
||||
|
||||
// Hide normal doctor fields
|
||||
$('#execution-msl_code,#execution-speciality')
|
||||
.parent().hide();
|
||||
|
||||
$('#execution-msl_code,#execution-speciality')
|
||||
.attr('required', false);
|
||||
|
||||
// Show Doctor Category
|
||||
$('#execution-doctor-category-wrapper').show();
|
||||
$('#execution-doctor_category').attr('required', true);
|
||||
|
||||
} else {
|
||||
|
||||
// Hide Other doctor fields
|
||||
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name')
|
||||
.parent().hide();
|
||||
|
||||
$('#execution-other_msl_code,#execution-other_speciality,#execution-other_speaker_name')
|
||||
.attr('required', false);
|
||||
|
||||
// Show normal doctor fields
|
||||
$('#execution-msl_code,#execution-speciality')
|
||||
.parent().show();
|
||||
|
||||
$('#execution-msl_code,#execution-speciality')
|
||||
.attr('required', true);
|
||||
|
||||
// Hide Doctor Category
|
||||
$('#execution-doctor-category-wrapper').hide();
|
||||
$('#execution-doctor_category').attr('required', false);
|
||||
$('#execution-doctor_category').val('');
|
||||
}
|
||||
});
|
||||
|
||||
jQuery(document).ready(function($) {
|
||||
$('#field-user_id').change(function(){
|
||||
|
|
|
|||
Loading…
Reference in New Issue