Team4 - Montair LC Kid Non Rxber Survey
Specific Folder FTP Upload / ftp-deploy (push) Successful in 38s
Details
Specific Folder FTP Upload / ftp-deploy (push) Successful in 38s
Details
allowed multiple selection in dropdown field
This commit is contained in:
parent
b2c364ecc7
commit
a867271c88
|
|
@ -8,6 +8,43 @@
|
||||||
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
|
<link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-rc.0/dist/css/select2.min.css" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
|
|
||||||
|
/* =========================
|
||||||
|
Below CSS is for the multiple option that are selecting in field-current_prescribing_molecule_combination
|
||||||
|
========================= */
|
||||||
|
|
||||||
|
/* Selected tags in multiple select */
|
||||||
|
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||||
|
background-color: #6658dd !important;
|
||||||
|
border: 1px solid #6658dd !important;
|
||||||
|
color: #fff !important;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Cross icon */
|
||||||
|
.select2-container--default .select2-selection__choice__remove {
|
||||||
|
color: #ffffff !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
.select2-container--default .select2-selection__choice__remove:hover {
|
||||||
|
color: rgb(255, 255, 255) !important;
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Selected option in dropdown list */
|
||||||
|
.select2-results__option[aria-selected="true"] {
|
||||||
|
background-color: #6658dd !important;
|
||||||
|
color: #fff !important;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* =========================
|
/* =========================
|
||||||
SELECT2 CUSTOM HIGHLIGHT
|
SELECT2 CUSTOM HIGHLIGHT
|
||||||
========================= */
|
========================= */
|
||||||
|
|
@ -219,9 +256,11 @@
|
||||||
@endforeach
|
@endforeach
|
||||||
</select>
|
</select>
|
||||||
@else
|
@else
|
||||||
<select class="form-control" id="execution-{{ $question->code }}"
|
<select class="form-control"
|
||||||
name="{{ $question->code }}[0]"
|
id="execution-{{ $question->code }}"
|
||||||
{{ $question->required == 'yes' ? 'required' : '' }}>
|
name="{{ $question->code }}[0]{{ $question->code == 'current_prescribing_molecule_combination' ? '[]' : '' }}"
|
||||||
|
{{ $question->required == 'yes' ? 'required' : '' }}
|
||||||
|
{{ $question->code == 'current_prescribing_molecule_combination' ? 'multiple' : '' }}>
|
||||||
<option value=""> -- Select -- </option>
|
<option value=""> -- Select -- </option>
|
||||||
@foreach ($question->options as $option)
|
@foreach ($question->options as $option)
|
||||||
<option value="{{ $option->value }}"
|
<option value="{{ $option->value }}"
|
||||||
|
|
@ -352,9 +391,10 @@
|
||||||
placeholder: '-- Select User / Territory --'
|
placeholder: '-- Select User / Territory --'
|
||||||
});
|
});
|
||||||
|
|
||||||
$('select[id^="execution-"]').select2({
|
$('#execution-current_prescribing_molecule_combination').select2({
|
||||||
width: '100%'
|
width: '100%',
|
||||||
});
|
closeOnSelect: false
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initializeSelect2();
|
initializeSelect2();
|
||||||
|
|
@ -563,7 +603,11 @@
|
||||||
<input type="{{$question->type}}" min="0" max="9999999999" step="1" id="field-{{$question->code}}-${doctor_count}" name="{{$question->code}}[${doctor_count}]" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:0}}">
|
<input type="{{$question->type}}" min="0" max="9999999999" step="1" id="field-{{$question->code}}-${doctor_count}" name="{{$question->code}}[${doctor_count}]" class="form-control" {{$question->required == 'yes'?'required':'' }} value="{{isset($question->value)?$question->value:0}}">
|
||||||
@break
|
@break
|
||||||
@case('dropdown')
|
@case('dropdown')
|
||||||
<select class="form-control" id="field-{{$question->code}}-${doctor_count}" name="{{$question->code}}[${doctor_count}]" {{$question->required == 'yes'?'required':'' }}>
|
<select class="form-control"
|
||||||
|
id="field-{{$question->code}}-${doctor_count}"
|
||||||
|
name="{{$question->code}}[${doctor_count}]{{ $question->code == 'current_prescribing_molecule_combination' ? '[]' : '' }}"
|
||||||
|
{{$question->required == 'yes'?'required':'' }}
|
||||||
|
{{ $question->code == 'current_prescribing_molecule_combination' ? 'multiple' : '' }}>
|
||||||
@if($question->code=='contact_id')
|
@if($question->code=='contact_id')
|
||||||
${doctorName}
|
${doctorName}
|
||||||
@else
|
@else
|
||||||
|
|
@ -588,12 +632,14 @@
|
||||||
width: '100%',
|
width: '100%',
|
||||||
placeholder: '-- Select Doctor --'
|
placeholder: '-- Select Doctor --'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#field-current_prescribing_molecule_combination-'+doctor_count).select2({
|
||||||
|
width: '100%',
|
||||||
|
closeOnSelect: false,
|
||||||
|
});
|
||||||
preventDuplicateDoctors();
|
preventDuplicateDoctors();
|
||||||
|
|
||||||
|
|
||||||
$('select[id^="execution-"]').select2({
|
|
||||||
width: '100%'
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue