Skip to content

Commit 9eee493

Browse files
committed
Ticket edit: Change in ticket status affects selected list for changes from or to default_status_id only
1 parent 3b09851 commit 9eee493

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/Views/tickets/createedit.blade.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
@foreach ($a_lists as $list => $a_list)
117117
<div class="form-check form-check-inline">
118118
<label class="form-check-label">
119-
<input type="radio" class="jquery_ticket_list form-check-input" name="complete" value="{{ $a_list['complete'] }}" @if($list == $checked_list) {!! 'checked="checked"' !!}@endif data-list="{{ $list }}" data-default_status_id="{{ $a_list['default_status_id'] }}">{{ trans('panichd::lang.' . $list . '-tickets-adjective') }}
119+
<input type="radio" id="radio_{{ $list }}_list" class="jquery_ticket_list form-check-input" name="complete" value="{{ $a_list['complete'] }}" @if($list == $checked_list) {!! 'checked="checked"' !!}@endif data-list="{{ $list }}" data-default_status_id="{{ $a_list['default_status_id'] }}">{{ trans('panichd::lang.' . $list . '-tickets-adjective') }}
120120
</label>
121121
</div>
122122
@endforeach
@@ -321,6 +321,14 @@
321321
}
322322
});
323323
324+
// Change in status affects the List only changing from or to default_status_id
325+
$('#select_status').change(function(){
326+
if ($(this).val() == '{{ $setting->grab('default_status_id') }}'){
327+
if (!$('#radio_newest_list').is(':checked')) $('#radio_newest_list').prop('checked', true).parent().effect('highlight');
328+
}else{
329+
if ($('#radio_newest_list').is(':checked')) $('#radio_active_list').prop('checked', true).parent().effect('highlight');
330+
}
331+
});
324332
325333
// Category select with $u->maxLevel() > 1 only
326334
$('#category_change').change(function(){

0 commit comments

Comments
 (0)