Skip to content

Commit 15506e6

Browse files
committed
Patch: Use html fields instead of plain text ones
1 parent 8890766 commit 15506e6

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/Controllers/TicketsController.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TicketsController extends Controller
3333
protected $tickets;
3434
protected $member;
3535
protected $a_search_fields_numeric = ['creator_id', 'user_id', 'status_id', 'priority_id', 'category_id', 'agent_id'];
36-
protected $a_search_fields_text = ['subject', 'content', 'intervention'];
36+
protected $a_search_fields_text = ['subject', 'html', 'intervention_html'];
3737

3838
public function __construct(Ticket $tickets, \PanicHDMember $member)
3939
{
@@ -112,15 +112,15 @@ public function data($ticketList = 'active')
112112
if (isset($search_fields['any_text_field'])){
113113
$collection->where(function($query) use($search_fields){
114114
$query->where('subject', 'like', '%' . $search_fields['any_text_field'] . '%')
115-
->orWhere('content', 'like', '%' . $search_fields['any_text_field'] . '%')
116-
->orWhere('intervention', 'like', '%' . $search_fields['any_text_field'] . '%')
115+
->orWhere('html', 'like', '%' . $search_fields['any_text_field'] . '%')
116+
->orWhere('intervention_html', 'like', '%' . $search_fields['any_text_field'] . '%')
117117
->orWhereHas('attachments', function($q1) use($search_fields){
118118
$q1->where('original_filename', 'like', '%' . $search_fields['any_text_field'] . '%')
119119
->orWhere('new_filename', 'like', '%' . $search_fields['any_text_field'] . '%')
120120
->orWhere('description', 'like', '%' . $search_fields['any_text_field'] . '%');
121121
})
122122
->orWhereHas('comments', function($q2) use($search_fields) {
123-
$q2->where('content', 'like', '%' . $search_fields['any_text_field'] . '%')
123+
$q2->where('html', 'like', '%' . $search_fields['any_text_field'] . '%')
124124
->orWhereHas('attachments', function($q3) use($search_fields){
125125
$q3->where('original_filename', 'like', '%' . $search_fields['any_text_field'] . '%')
126126
->orWhere('new_filename', 'like', '%' . $search_fields['any_text_field'] . '%')

src/Views/tickets/search/form.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,16 +179,16 @@
179179
</div><div class="col-md-6">
180180

181181
<div class="form-group row"><!-- DESCRIPTION -->
182-
<label for="content" class="col-lg-3 col-form-label"> *{{trans('panichd::lang.description')}}{{trans('panichd::lang.colon')}}</label>
182+
<label for="html" class="col-lg-3 col-form-label"> *{{trans('panichd::lang.description')}}{{trans('panichd::lang.colon')}}</label>
183183
<div class="col-lg-9">
184-
<textarea class="form-control" rows="2" name="content" cols="50"></textarea>
184+
<textarea class="form-control" rows="2" name="html" cols="50"></textarea>
185185
</div>
186186
</div>
187187

188188
<div class="form-group row"><!-- INTERVENTION -->
189189
<label for="intervention" class="col-lg-3 col-form-label">{{ trans('panichd::lang.intervention') . trans('panichd::lang.colon') }}</label>
190190
<div class="col-lg-9">
191-
<textarea class="form-control" rows="2" name="intervention" cols="50"></textarea>
191+
<textarea class="form-control" rows="2" name="intervention_html" cols="50"></textarea>
192192
</div>
193193
</div>
194194

0 commit comments

Comments
 (0)