help desk create view

This commit is contained in:
merdan 2020-05-04 17:18:12 +05:00
parent 4dae1fcf8a
commit 4fd0cf45bf
1 changed files with 9 additions and 6 deletions

View File

@ -63,22 +63,25 @@
@endsection
@section('after_scripts')
<script>
$('select[name="topic"]').on('change', function() {
alert(this.options[this.selectedIndex].text);
$('select.topic').on('change', function() {
// alert(this.options[this.selectedIndex].text);
let subject = $('input.subject');
if(this.options[this.selectedIndex].value == 0)
{
$('input[name="subject"]').parent().removeClass('d-none');
subject.parent().removeClass('d-none');
$('input[name="subject"]').val('');
subject.val('');
}else{
$('input[name="subject"]').parent().addClass('d-none');
subject.parent().addClass('d-none');
$('input[name="subject"]').val(this.options[this.selectedIndex].text);
subject.val(this.options[this.selectedIndex].text);
}
subject.trigger('change');
});
</script>