File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1215,7 +1215,7 @@ public function edit($id, $parameters = null)
12151215 // Default notification recipients
12161216 $ all_c = clone $ all_comments ;
12171217 $ a_reply = [(!is_null ($ ticket ->owner ) ? $ ticket ->owner ->id : $ ticket ->user_id )];
1218- $ a_note = [$ ticket -> agent -> id ];
1218+ $ a_note = [];
12191219 foreach ($ all_c ->get () as $ comm ){
12201220 if ($ comm ->type == 'reply ' ){
12211221 $ a_reply = array_merge ($ a_reply , $ comm ->notifications ->pluck ('member_id ' )->toArray ());
Original file line number Diff line number Diff line change 3030 <div class =" col-lg-10" >
3131 <select class =" form-control note_recipients" name =" comment_x_recipients[]" multiple =" multiple" style =" display : none ; width : 100% " disabled =" disabled" >
3232 @foreach ($c_members -> filter (function ($q )use ($u ){ return $q -> id != $u -> id ; }) as $member )
33- <option value =" {{ $member -> id } }" {{ in_array ( $member -> id , $a_notifications [ ' note ' ]) ? ' selected="selected" ' : ' ' } } >{{ $member -> name . ($member -> email == " " ? ' ' . trans (' panichd::lang.ticket-owner-no-email' ) : ' - ' . $member -> email ) } }
33+ <option value =" {{ $member -> id } }" >{{ $member -> name . ($member -> email == " " ? ' ' . trans (' panichd::lang.ticket-owner-no-email' ) : ' - ' . $member -> email ) } }
3434 @if ($setting -> grab (' departments_notices_feature' ) )
3535 @if ($member -> ticketit_department == ' 0' )
3636 {{ ' - ' . trans (' panichd::lang.create-ticket-notices' ) . ' ' . trans (' panichd::lang.all-depts' ) } }
Original file line number Diff line number Diff line change 44 $ (' #add_comment' ).click (function (e ){
55 e .preventDefault ();
66
7+ // Notification members
8+ var a_notifications_note = [{{ implode (' ,' , $a_notifications [' note' ]) } } ];
9+
710 var _cloned = $ (' #comment_template' ).clone ();
811 var _num = $ (' #comments .comment_block' ).length + 1 ;
912 _cloned .prop (' id' , ' comment_' + _num);
1013 _cloned .find (' .input_comment_num' ).val (_num);
1114 _cloned .find (' .input_response_type' ).prop (' disabled' , false ).attr (' name' , ' response_' + _num);
1215 @if ($setting -> grab (' custom_recipients' ) )
16+ $ (a_notifications_note).each (function (i ,v ){
17+ // Add other notes recipients
18+ _cloned .find (' .note_recipients option[value=' + v + ' ]' ).prop (' selected' , true );
19+ });
20+ // Add current agent id
21+ _cloned .find (' .note_recipients option[value=' + $ (' #agent_id' ).val () + ' ]' ).prop (' selected' , true );
22+
23+ // Activate notification recipients selects
1324 _cloned .find (' .note_recipients' ).prop (' disabled' , false ).attr (' name' , ' comment_' + _num + ' _recipients[]' );
1425 _cloned .find (' .reply_recipients' ).attr (' name' , ' comment_' + _num + ' _recipients[]' );
1526 @endif
You can’t perform that action at this time.
0 commit comments