Ada banyak pertanyaan yang diajukan mengenai bagaimana cara menambahkan field tambahan atau field baru ke dalam form buka tiket lalu
menampilkannya pada halaman viewticket di Sistem osTicket. Salah satu
pertanyaan tersebut dapat Anda lihat dengan mengklik tautan ini.
Modifikasi berikut saya buat untuk menjawab pertanyaan tadi. Dalam
contoh ini, kita akan menambahkan beberapa control checkboxes sebanyak
5 buah, ditambah lagi dengan sebuah textbox, di mana mereka
dikelompokkan ke dalam dua field tambahan, masing-masing: applications dan productkey, ke atas form di sisi klien. Kita akan membuatnya juga untuk sisi staf pada artikel yang terpisah di hari selanjutnya.
ALTER TABLE ost_ticket ADD COLUMN `applications` varchar(100) default '' NOT NULL, ADD COLUMN `productkey` varchar(50) default'' NOT NULL;
95 96 | <? } }?> |
setelah baris terakhir dari kode tadi, tambahkan kode berikut ini:
97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 | <tr> <td>Applications: </td> <td> <input name=applications[] type=checkbox value="Application 1" >Application 1 <input name=applications[] type=checkbox value="Application 2" >Application 2 <input name=applications[] type=checkbox value="Application 3" >Application 3 <input name=applications[] type=checkbox value="Application 4" >Application 4 <input name=applications[] type=checkbox value="Application 5" >Application 5 </td> </tr> <tr> <td>Product Key: </td> <td> <input type="text" name="productkey" size="35" value="<?=$info['productkey']?>"> </td> </tr> |
44 | var $overdue; |
setelah baris kode tersebut, tambahkan kode berikut:
45 46 | var $applications; var $productkey; |
Cari lagi kode ini:
88 | $this->overdue =$row['isoverdue']; |
lalu timpa dengan kode berikut:
88 89 90 | $this->overdue =$row['isoverdue']; $this->applications =$row['applications']; $this->productkey =$row['productkey']; |
Cari lagi kode yang ini:
140 141 142 | function getSubject() { return $this->subject; } |
setelah baris terakhir dari kode tadi, tambahkan kode berikut:
143 144 145 146 147 148 149 | function getApplications() { return $this->applications; } Â function getProductKey() { return $this->productkey; } |
Cari lagi kode yang ini:
1107 | $fields['message'] = array('type'=>'text', 'required'=>1, 'error'=>'Message required'); |
setelah baris kode tadi, tambahkan kode berikut:
1108 1109 | $fields['applications'] = array('type'=>'text', 'required'=>0, 'error'=>'Applications required'); $fields['productkey'] = array('type'=>'text', 'required'=>0, 'error'=>'Product key required'); |
Cari lagi kode ini:
1197 1198 1199 | Sys::alertAdmin('Overlimit Notice',$msg); } } |
setelah baris terakhir dari kode tadi, tambahkan kode berikut:
1201 1202 1203 1204 1205 1206 1207 | $mycounter=0; foreach ($var['applications'] as $app) { $strapp .= ($mycounter==0)?$app:", ".$app.""; $mycounter++; } unset($app); |
Cari lagi kode yang ini:
1260 | ',ip_address='.db_input($ipaddress). |
lalu timpa dengan kode berikut:
1260 1261 1262 | ',ip_address='.db_input($ipaddress). ',applications='.db_input($strapp). ',productkey='.db_input($var['productkey']). |
27 28 29 30 | <tr> <th>Create Date:</th> <td><?=Format::db_datetime($ticket->getCreateDate())?></td> </tr> |
setelah baris terakhir dari kode tadi, tambahkan kode berikut:
31 32 33 34 | <tr> <th>Applications:</th> <td><?=$ticket->getApplications()?></td> </tr> |
Cari lagi kode yang ini:
43 44 45 46 | <tr> <th>Phone:</th> <td><?=Format::phone($ticket->getPhoneNumber())?></td> </tr> |
setelah baris kode tadi, tambahkan kode berikut:
47 48 49 50 | <tr> <th>Product Key:</th> <td><?=$ticket->getProductKey()?></td> </tr> |
Itulah semuanya. Semoga bermanfaat.
Dobby and Luna have been part of our lives for the past years. They have…
In the year 2021, I've completed some paid projects. Some of them are more technical,…
Based on the GlassTime Bootstrap template, here I present glassmorphism WordPress Theme free to download.This…
This HTML5 template is using Glassmorphism UI design language which is now trending for 2021…
KecamatanKode POSBanjar81152Buleleng81119Busungbiu81154Gerokgak81155Kubutambahan81172Sawan81171Seririt81153Sukasada81161Tejakula81173Klik pada nama kecamatan untuk melihat daftar desa masing-masing. Sumber: kodepos.andiim3.com
Ada yang bilang "semuanya akan mati matic pada akhirnya". Bener aja, sekarang tuntutan transportasi sehari-hari…
This website uses cookies.