Compare commits
2 Commits
b0a78ab4e4
...
629f2aa557
| Author | SHA1 | Date |
|---|---|---|
|
|
629f2aa557 | |
|
|
799ee04751 |
|
|
@ -72,7 +72,7 @@
|
||||||
name="{{$question->code}}"
|
name="{{$question->code}}"
|
||||||
class="form-control"
|
class="form-control"
|
||||||
{{$question->required == 'yes'?'required':'' }}
|
{{$question->required == 'yes'?'required':'' }}
|
||||||
{{ in_array($question->code, ['speciality','msl_code']) ? 'readonly' : '' }}
|
{{ in_array($question->code, ['speciality','legacy_code']) ? 'readonly' : '' }}
|
||||||
value="{{isset($question->value)?$question->value:''}}">
|
value="{{isset($question->value)?$question->value:''}}">
|
||||||
@break
|
@break
|
||||||
@case('date')
|
@case('date')
|
||||||
|
|
@ -89,7 +89,7 @@
|
||||||
<option value=""> -- Select -- </option>
|
<option value=""> -- Select -- </option>
|
||||||
@foreach($question->options as $option)
|
@foreach($question->options as $option)
|
||||||
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}
|
<option value="{{ $option->value }}" {{ isset($question->value) && $question->value == $option->value ? 'selected' : '' }}
|
||||||
{{ $question->code == 'contact_id' ? 'msl_code= ' . $option->contact->msl_code . ' ' : '' }}
|
{{ $question->code == 'contact_id' ? 'legacy_code= ' . $option->contact->legacy_code . ' ' : '' }}
|
||||||
{{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
{{ $question->code == 'contact_id' ? 'speciality= ' . (isset($option->contact->speciality) ? $option->contact->speciality :'') . ' ' : '' }} >
|
||||||
{{ $option->display }}
|
{{ $option->display }}
|
||||||
</option>
|
</option>
|
||||||
|
|
@ -243,7 +243,7 @@
|
||||||
|
|
||||||
$("<option></option>")
|
$("<option></option>")
|
||||||
.attr("value", itm.value)
|
.attr("value", itm.value)
|
||||||
.attr("msl_code", itm.contact.msl_code)
|
.attr("legacy_code", itm.contact.legacy_code)
|
||||||
.attr("speciality", itm.contact.speciality)
|
.attr("speciality", itm.contact.speciality)
|
||||||
.text(itm.display)
|
.text(itm.display)
|
||||||
|
|
||||||
|
|
@ -297,16 +297,16 @@
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
"MSL CODE:",
|
"MSL CODE:",
|
||||||
$('option:selected', this).attr('msl_code')
|
$('option:selected', this).attr('legacy_code')
|
||||||
);
|
);
|
||||||
|
|
||||||
$('#field-msl_code').val(
|
$('#field-legacy_code').val(
|
||||||
$('option:selected', this).attr('msl_code')
|
$('option:selected', this).attr('legacy_code')
|
||||||
);
|
);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#field-speciality,#field-msl_code').attr('readonly',true);
|
$('#field-speciality,#field-legacy_code').attr('readonly',true);
|
||||||
|
|
||||||
$('#field-chemist_name').on('input', function () {
|
$('#field-chemist_name').on('input', function () {
|
||||||
this.value = this.value.replace(/[^a-zA-Z\s]/g, '');
|
this.value = this.value.replace(/[^a-zA-Z\s]/g, '');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue