|
89 | 89 | ]) !!} |
90 | 90 | <div class="col-lg-9"> |
91 | 91 | <?php |
92 | | - $a_lists = [ |
93 | | - 'newest' => [ |
94 | | - 'complete' => 'no', |
95 | | - 'default_status_id' => $setting->grab('default_status_id') |
96 | | - ], |
97 | | - 'active' => [ |
98 | | - 'complete' => 'no', |
99 | | - 'default_status_id' => $setting->grab('default_reopen_status_id') |
100 | | - ], |
101 | | - 'complete' => [ |
102 | | - 'complete' => 'yes', |
103 | | - 'default_status_id' => $setting->grab('default_close_status_id') |
104 | | - ] |
| 92 | + if ($setting->grab('use_default_status_id')){ |
| 93 | + $a_lists['newest'] = [ |
| 94 | + 'complete' => 'no', |
| 95 | + 'default_status_id' => $setting->grab('default_status_id') |
| 96 | + ]; |
| 97 | + } |
| 98 | +
|
| 99 | + $a_lists['active'] = [ |
| 100 | + 'complete' => 'no', |
| 101 | + 'default_status_id' => $setting->grab('default_reopen_status_id') |
| 102 | + ]; |
| 103 | + $a_lists['complete'] = [ |
| 104 | + 'complete' => 'yes', |
| 105 | + 'default_status_id' => $setting->grab('default_close_status_id') |
105 | 106 | ]; |
106 | 107 |
|
107 | 108 | if ($a_current['complete'] == "yes"){ |
108 | 109 | $checked_list = 'complete'; |
109 | 110 | }elseif($a_current['status_id'] == $setting->grab('default_status_id')){ |
110 | | - $checked_list = 'newest'; |
| 111 | + if ($setting->grab('use_default_status_id')){ |
| 112 | + $checked_list = 'newest'; |
| 113 | + }else{ |
| 114 | + $checked_list = 'active'; |
| 115 | + } |
111 | 116 | }else{ |
112 | 117 | $checked_list = 'active'; |
113 | 118 | } |
|
321 | 326 | } |
322 | 327 | }); |
323 | 328 |
|
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 | | - }); |
| 329 | + @if($setting->grab('use_default_status_id')) |
| 330 | + // Change in status affects the List only changing from or to default_status_id |
| 331 | + $('#select_status').change(function(){ |
| 332 | + if ($(this).val() == '{{ $setting->grab('default_status_id') }}'){ |
| 333 | + if (!$('#radio_newest_list').is(':checked')) $('#radio_newest_list').prop('checked', true).parent().effect('highlight'); |
| 334 | + }else{ |
| 335 | + if ($('#radio_newest_list').is(':checked')) $('#radio_active_list').prop('checked', true).parent().effect('highlight'); |
| 336 | + } |
| 337 | + }); |
| 338 | + @endif |
332 | 339 |
|
333 | 340 | // Category select with $u->maxLevel() > 1 only |
334 | 341 | $('#category_change').change(function(){ |
|
0 commit comments