Commit 8a6e29b5 by Siti Aisah

remove strip tags dan ubah penempatan required

parent d565b427
...@@ -78,18 +78,19 @@ class AgendaController extends Controller ...@@ -78,18 +78,19 @@ class AgendaController extends Controller
*/ */
public function store(Request $request) public function store(Request $request)
{ {
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $request['content'] = $request->content;
$request['title'] = strip_tags($request->title); $request['title'] = strip_tags($request->title);
$request->validate([ $request->validate([
'title' => 'required', 'title' => 'required',
'content' => 'required|min:3', 'content' => 'required|min:3',
'event_date' => 'required', 'event_date' => 'required',
'keys' => 'max:100' 'keys' => 'required|max:100',
], [ ], [
'title.required' => 'Judul wajib diisi', 'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi', 'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat', 'content.min' => 'Konten terlalu singkat',
'event_date.required' => 'Tanggal posting wajib diisi', 'event_date.required' => 'Tanggal posting wajib diisi',
'keys.required' => 'Keyword wajib diisi',
'keys.max' => 'Keyword terlalu panjang' 'keys.max' => 'Keyword terlalu panjang'
]); ]);
...@@ -122,7 +123,7 @@ class AgendaController extends Controller ...@@ -122,7 +123,7 @@ class AgendaController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGET, $data['content']);
$dataEn['agenda_id'] = $agenda->id; $dataEn['agenda_id'] = $agenda->id;
$dataEn['title'] = $title; $dataEn['title'] = $title;
...@@ -142,7 +143,7 @@ class AgendaController extends Controller ...@@ -142,7 +143,7 @@ class AgendaController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETDE, $data['content']);
$dataDe['agenda_id'] = $agenda->id; $dataDe['agenda_id'] = $agenda->id;
$dataDe['title'] = $title; $dataDe['title'] = $title;
...@@ -162,7 +163,7 @@ class AgendaController extends Controller ...@@ -162,7 +163,7 @@ class AgendaController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETSA, $data['content']);
$dataSa['agenda_id'] = $agenda->id; $dataSa['agenda_id'] = $agenda->id;
$dataSa['title'] = $title; $dataSa['title'] = $title;
...@@ -182,7 +183,7 @@ class AgendaController extends Controller ...@@ -182,7 +183,7 @@ class AgendaController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETZH, $data['content']);
$dataZh['agenda_id'] = $agenda->id; $dataZh['agenda_id'] = $agenda->id;
$dataZh['title'] = $title; $dataZh['title'] = $title;
...@@ -253,11 +254,11 @@ class AgendaController extends Controller ...@@ -253,11 +254,11 @@ class AgendaController extends Controller
*/ */
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $request['content'] = $request->content;
$request['content_en'] = strip_tags($request->content_en, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $request['content_en'] = $request->content_en;
$request['content_de'] = strip_tags($request->content_de, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $request['content_de'] = $request->content_de;
$request['content_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $request['content_sa'] = $request->content_sa;
$request['content_zh'] = strip_tags($request->content_zh, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $request['content_zh'] = $request->content_zh;
$request['title'] = strip_tags($request->title); $request['title'] = strip_tags($request->title);
$request['title_en'] = strip_tags($request->title_en); $request['title_en'] = strip_tags($request->title_en);
$request['title_de'] = strip_tags($request->title_de); $request['title_de'] = strip_tags($request->title_de);
...@@ -270,13 +271,16 @@ class AgendaController extends Controller ...@@ -270,13 +271,16 @@ class AgendaController extends Controller
$request['keys_zh'] = strip_tags($request->keys_zh); $request['keys_zh'] = strip_tags($request->keys_zh);
$request->validate([ $request->validate([
'title' => 'required',
'content' => 'required|min:3', 'content' => 'required|min:3',
'event_date' => 'required', 'event_date' => 'required',
'keys' => 'max:100' 'keys' => 'required|max:100'
], [ ], [
'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi', 'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat', 'content.min' => 'Konten terlalu singkat',
'event_date.required' => 'Tanggal posting wajib diisi', 'event_date.required' => 'Tanggal posting wajib diisi',
'keys.required' => 'Keyword wajib diisi',
'keys.max' => 'Keyword terlalu panjang' 'keys.max' => 'Keyword terlalu panjang'
]); ]);
...@@ -316,7 +320,7 @@ class AgendaController extends Controller ...@@ -316,7 +320,7 @@ class AgendaController extends Controller
if($manual==1) { if($manual==1) {
$dataEn['title'] = strip_tags($data['title_en']); $dataEn['title'] = strip_tags($data['title_en']);
$dataEn['keys'] = strip_tags($data['keys_en']); $dataEn['keys'] = strip_tags($data['keys_en']);
$dataEn['content'] = strip_tags($data['content_en'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $dataEn['content'] = $data['content_en'];
} }
else{ else{
if ($data['content'] == null) { if ($data['content'] == null) {
...@@ -326,7 +330,7 @@ class AgendaController extends Controller ...@@ -326,7 +330,7 @@ class AgendaController extends Controller
$trans = new GoogleTranslate(); $trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['title'])); $title = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['title']));
$keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys']));
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGET, $data['content']);
$dataEn['title'] = $title; $dataEn['title'] = $title;
$dataEn['keys'] = $keys; $dataEn['keys'] = $keys;
...@@ -341,7 +345,7 @@ class AgendaController extends Controller ...@@ -341,7 +345,7 @@ class AgendaController extends Controller
if($manual==1) { if($manual==1) {
$dataDe['title'] = strip_tags($data['title_de']); $dataDe['title'] = strip_tags($data['title_de']);
$dataDe['keys'] = strip_tags($data['keys_de']); $dataDe['keys'] = strip_tags($data['keys_de']);
$dataDe['content'] = strip_tags($data['content_de'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $dataDe['content'] = $data['content_de'];
} }
else{ else{
...@@ -352,7 +356,7 @@ class AgendaController extends Controller ...@@ -352,7 +356,7 @@ class AgendaController extends Controller
$trans = new GoogleTranslate(); $trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['title'])); $title = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['title']));
$keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys']));
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETDE, $data['content']);
$dataDe['title'] = $title; $dataDe['title'] = $title;
$dataDe['keys'] = $keys; $dataDe['keys'] = $keys;
...@@ -367,7 +371,7 @@ class AgendaController extends Controller ...@@ -367,7 +371,7 @@ class AgendaController extends Controller
if($manual==1) { if($manual==1) {
$dataSa['title'] = strip_tags($data['title_sa']); $dataSa['title'] = strip_tags($data['title_sa']);
$dataSa['keys'] = strip_tags($data['keys_sa']); $dataSa['keys'] = strip_tags($data['keys_sa']);
$dataSa['content'] = strip_tags($data['content_sa'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $dataSa['content'] = $data['content_sa'];
} }
else{ else{
...@@ -378,7 +382,7 @@ class AgendaController extends Controller ...@@ -378,7 +382,7 @@ class AgendaController extends Controller
$trans = new GoogleTranslate(); $trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['title'])); $title = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['title']));
$keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys']));
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETSA, $data['content']);
$dataSa['title'] = $title; $dataSa['title'] = $title;
$dataSa['keys'] = $keys; $dataSa['keys'] = $keys;
...@@ -393,7 +397,7 @@ class AgendaController extends Controller ...@@ -393,7 +397,7 @@ class AgendaController extends Controller
if($manual==1) { if($manual==1) {
$dataZh['title'] = strip_tags($data['title_zh']); $dataZh['title'] = strip_tags($data['title_zh']);
$dataZh['keys'] = strip_tags($data['keys_zh']); $dataZh['keys'] = strip_tags($data['keys_zh']);
$dataZh['content'] = strip_tags($data['content_zh'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $dataZh['content'] = $data['content_zh'];
} }
else{ else{
...@@ -404,7 +408,7 @@ class AgendaController extends Controller ...@@ -404,7 +408,7 @@ class AgendaController extends Controller
$trans = new GoogleTranslate(); $trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['title'])); $title = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['title']));
$keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys']));
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th','span'])); $content = $trans->translate($this->SOURCE, $this->TARGETZH, $data['content']);
$dataZh['title'] = $title; $dataZh['title'] = $title;
$dataZh['keys'] = $keys; $dataZh['keys'] = $keys;
......
...@@ -79,19 +79,20 @@ class InformationController extends Controller ...@@ -79,19 +79,20 @@ class InformationController extends Controller
*/ */
public function store(Request $request) public function store(Request $request)
{ {
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $request['content'] = $request->content;
$request['title'] = strip_tags($request->title); $request['title'] = strip_tags($request->title);
$request->validate([ $request->validate([
'title' => 'required', 'title' => 'required',
'content' => 'required|min:3', 'content' => 'required|min:3',
'event_date' => 'required', 'event_date' => 'required',
'keys' => 'max:100' 'keys' => 'required|max:100'
], [ ], [
'title.required' => 'Judul wajib diisi', 'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi', 'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat', 'content.min' => 'Konten terlalu singkat',
'event_date.required' => 'Tanggal posting wajib diisi', 'event_date.required' => 'Tanggal posting wajib diisi',
'keys.max' => 'Keyword terlalu panjang' 'keys.max' => 'Keyword terlalu panjang',
'keys.required' => 'Keyword wajib diisi'
]); ]);
$data = $request->except('_token'); $data = $request->except('_token');
...@@ -123,7 +124,7 @@ class InformationController extends Controller ...@@ -123,7 +124,7 @@ class InformationController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGET, $data['content']);
$dataEn['information_id'] = $information->id; $dataEn['information_id'] = $information->id;
$dataEn['title'] = $title; $dataEn['title'] = $title;
...@@ -143,7 +144,7 @@ class InformationController extends Controller ...@@ -143,7 +144,7 @@ class InformationController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETDE, $data['content']);
$dataDe['information_id'] = $information->id; $dataDe['information_id'] = $information->id;
$dataDe['title'] = $title; $dataDe['title'] = $title;
...@@ -163,7 +164,7 @@ class InformationController extends Controller ...@@ -163,7 +164,7 @@ class InformationController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETSA, $data['content']);
$dataSa['information_id'] = $information->id; $dataSa['information_id'] = $information->id;
$dataSa['title'] = $title; $dataSa['title'] = $title;
...@@ -183,7 +184,7 @@ class InformationController extends Controller ...@@ -183,7 +184,7 @@ class InformationController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETZH, $data['content']);
$dataZh['information_id'] = $information->id; $dataZh['information_id'] = $information->id;
$dataZh['title'] = $title; $dataZh['title'] = $title;
...@@ -252,11 +253,11 @@ class InformationController extends Controller ...@@ -252,11 +253,11 @@ class InformationController extends Controller
*/ */
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']); $request['content'] = $request->content;
$request['content_en'] = strip_tags($request->content_en, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']); $request['content_en'] = $request->content_en;
$request['content_de'] = strip_tags($request->content_de, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']); $request['content_de'] = $request->content_de;
$request['content_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']); $request['content_sa'] = $request->content_sa;
$request['content_zh'] = strip_tags($request->content_zh, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']); $request['content_zh'] = $request->content_zh;
$request['title'] = strip_tags($request->title); $request['title'] = strip_tags($request->title);
$request['title_en'] = strip_tags($request->title_en); $request['title_en'] = strip_tags($request->title_en);
$request['title_de'] = strip_tags($request->title_de); $request['title_de'] = strip_tags($request->title_de);
...@@ -269,14 +270,17 @@ class InformationController extends Controller ...@@ -269,14 +270,17 @@ class InformationController extends Controller
$request['keys_zh'] = strip_tags($request->keys_zh); $request['keys_zh'] = strip_tags($request->keys_zh);
$request->validate([ $request->validate([
'title' => 'required',
'content' => 'required|min:3', 'content' => 'required|min:3',
'event_date' => 'required', 'event_date' => 'required',
'keys' => 'max:100' 'keys' => 'required|max:100'
], [ ], [
'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi', 'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat', 'content.min' => 'Konten terlalu singkat',
'event_date.required' => 'Tanggal posting wajib diisi', 'event_date.required' => 'Tanggal posting wajib diisi',
'keys.max' => 'Keyword terlalu panjang' 'keys.max' => 'Keyword terlalu panjang',
'keys.required' => 'Keyword wajib diisi'
]); ]);
$data = $request->except(['_token', 'manual', 'id', 'title_en', 'keys_en', 'content_en', 'title_de', 'keys_de', 'content_de', 'title_sa', 'keys_sa', 'content_sa', 'title_zh', 'keys_zh', 'content_zh']); $data = $request->except(['_token', 'manual', 'id', 'title_en', 'keys_en', 'content_en', 'title_de', 'keys_de', 'content_de', 'title_sa', 'keys_sa', 'content_sa', 'title_zh', 'keys_zh', 'content_zh']);
...@@ -315,7 +319,7 @@ class InformationController extends Controller ...@@ -315,7 +319,7 @@ class InformationController extends Controller
if($manual==1) { if($manual==1) {
$dataEn['title'] = strip_tags($data['title_en']); $dataEn['title'] = strip_tags($data['title_en']);
$dataEn['keys'] = strip_tags($data['keys_en']); $dataEn['keys'] = strip_tags($data['keys_en']);
$dataEn['content'] = strip_tags($data['content_en'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $dataEn['content'] = $data['content_en'];
} }
else{ else{
if ($data['content'] == null) { if ($data['content'] == null) {
...@@ -325,7 +329,7 @@ class InformationController extends Controller ...@@ -325,7 +329,7 @@ class InformationController extends Controller
$trans = new GoogleTranslate(); $trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['title'])); $title = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['title']));
$keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys']));
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGET, $data['content']);
$dataEn['title'] = $title; $dataEn['title'] = $title;
$dataEn['keys'] = $keys; $dataEn['keys'] = $keys;
...@@ -340,7 +344,7 @@ class InformationController extends Controller ...@@ -340,7 +344,7 @@ class InformationController extends Controller
if($manual==1) { if($manual==1) {
$dataDe['title'] = strip_tags($data['title_de']); $dataDe['title'] = strip_tags($data['title_de']);
$dataDe['keys'] = strip_tags($data['keys_de']); $dataDe['keys'] = strip_tags($data['keys_de']);
$dataDe['content'] = strip_tags($data['content_de'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $dataDe['content'] = $data['content_de'];
} }
else{ else{
if ($data['content'] == null) { if ($data['content'] == null) {
...@@ -350,7 +354,7 @@ class InformationController extends Controller ...@@ -350,7 +354,7 @@ class InformationController extends Controller
$trans = new GoogleTranslate(); $trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['title'])); $title = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['title']));
$keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys']));
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETDE, $data['content']);
$dataDe['title'] = $title; $dataDe['title'] = $title;
$dataDe['keys'] = $keys; $dataDe['keys'] = $keys;
...@@ -365,7 +369,7 @@ class InformationController extends Controller ...@@ -365,7 +369,7 @@ class InformationController extends Controller
if($manual==1) { if($manual==1) {
$dataSa['title'] = strip_tags($data['title_sa']); $dataSa['title'] = strip_tags($data['title_sa']);
$dataSa['keys'] = strip_tags($data['keys_sa']); $dataSa['keys'] = strip_tags($data['keys_sa']);
$dataSa['content'] = strip_tags($data['content_sa'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $dataSa['content'] = $data['content_sa'];
} }
else{ else{
...@@ -376,7 +380,7 @@ class InformationController extends Controller ...@@ -376,7 +380,7 @@ class InformationController extends Controller
$trans = new GoogleTranslate(); $trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['title'])); $title = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['title']));
$keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys']));
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETSA, $data['content']);
$dataSa['title'] = $title; $dataSa['title'] = $title;
$dataSa['keys'] = $keys; $dataSa['keys'] = $keys;
...@@ -391,7 +395,7 @@ class InformationController extends Controller ...@@ -391,7 +395,7 @@ class InformationController extends Controller
if($manual==1) { if($manual==1) {
$dataZh['title'] = strip_tags($data['title_zh']); $dataZh['title'] = strip_tags($data['title_zh']);
$dataZh['keys'] = strip_tags($data['keys_zh']); $dataZh['keys'] = strip_tags($data['keys_zh']);
$dataZh['content'] = strip_tags($data['content_zh'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']); $dataZh['content'] = $data['content_zh'];
} }
else{ else{
...@@ -402,7 +406,7 @@ class InformationController extends Controller ...@@ -402,7 +406,7 @@ class InformationController extends Controller
$trans = new GoogleTranslate(); $trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['title'])); $title = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['title']));
$keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys']));
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETZH, $data['content']);
$dataZh['title'] = $title; $dataZh['title'] = $title;
$dataZh['keys'] = $keys; $dataZh['keys'] = $keys;
......
...@@ -79,17 +79,18 @@ class PageController extends Controller ...@@ -79,17 +79,18 @@ class PageController extends Controller
*/ */
public function store(Request $request) public function store(Request $request)
{ {
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $request['content'] = $request->content;
$request['title'] = strip_tags($request->title); $request['title'] = strip_tags($request->title);
$request->validate([ $request->validate([
'title' => 'required', 'title' => 'required',
'content' => 'required|min:3', 'content' => 'required|min:3',
'keys' => 'max:100' 'keys' => 'required|max:100'
], [ ], [
'title.required' => 'Judul wajib diisi', 'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi', 'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat', 'content.min' => 'Konten terlalu singkat',
'keys.max' => 'Keyword terlalu panjang' 'keys.max' => 'Keyword terlalu panjang',
'keys.required' => 'Keyword wajib diisi'
]); ]);
$data = $request->except('_token'); $data = $request->except('_token');
...@@ -122,7 +123,7 @@ class PageController extends Controller ...@@ -122,7 +123,7 @@ class PageController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody'])); $content = $trans->translate($this->SOURCE, $this->TARGET, $data['content']);
$dataEn['page_id'] = $page->id; $dataEn['page_id'] = $page->id;
$dataEn['title'] = $title; $dataEn['title'] = $title;
...@@ -142,7 +143,7 @@ class PageController extends Controller ...@@ -142,7 +143,7 @@ class PageController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody'])); $content = $trans->translate($this->SOURCE, $this->TARGETDE, $data['content']);
$dataDe['page_id'] = $page->id; $dataDe['page_id'] = $page->id;
$dataDe['title'] = $title; $dataDe['title'] = $title;
...@@ -162,7 +163,7 @@ class PageController extends Controller ...@@ -162,7 +163,7 @@ class PageController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody'])); $content = $trans->translate($this->SOURCE, $this->TARGETSA, $data['content']);
$dataSa['page_id'] = $page->id; $dataSa['page_id'] = $page->id;
$dataSa['title'] = $title; $dataSa['title'] = $title;
...@@ -182,7 +183,7 @@ class PageController extends Controller ...@@ -182,7 +183,7 @@ class PageController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody'])); $content = $trans->translate($this->SOURCE, $this->TARGETZH, $data['content']);
$dataZh['page_id'] = $page->id; $dataZh['page_id'] = $page->id;
$dataZh['title'] = $title; $dataZh['title'] = $title;
...@@ -249,11 +250,11 @@ class PageController extends Controller ...@@ -249,11 +250,11 @@ class PageController extends Controller
*/ */
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $request['content'] = $request->content;
$request['content_en'] = strip_tags($request->content_en, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $request['content_en'] = $request->content_en;
$request['content_de'] = strip_tags($request->content_de, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $request['content_de'] = $request->content_de;
$request['content_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $request['content_sa'] = $request->content_sa;
$request['content_zh'] = strip_tags($request->content_zh, ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button','span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $request['content_zh'] = $request->content_zh;
$request['title'] = strip_tags($request->title); $request['title'] = strip_tags($request->title);
$request['title_en'] = strip_tags($request->title_en); $request['title_en'] = strip_tags($request->title_en);
$request['title_de'] = strip_tags($request->title_de); $request['title_de'] = strip_tags($request->title_de);
...@@ -265,12 +266,15 @@ class PageController extends Controller ...@@ -265,12 +266,15 @@ class PageController extends Controller
$request['keys_zh'] = strip_tags($request->keys_zh); $request['keys_zh'] = strip_tags($request->keys_zh);
$request->validate([ $request->validate([
'title' => 'required',
'content' => 'required|min:3', 'content' => 'required|min:3',
'keys' => 'max:100' 'keys' => 'required|max:100'
], [ ], [
'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi', 'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat', 'content.min' => 'Konten terlalu singkat',
'keys.max' => 'Keyword terlalu panjang' 'keys.max' => 'Keyword terlalu panjang',
'keys.required' => 'Keyword wajib diisi'
]); ]);
$data = $request->except(['_token', 'id', 'title_en', 'keys_en', 'content_en', 'title_de', 'keys_de', 'content_de', 'title_sa', 'keys_sa', 'content_sa', 'title_zh', 'keys_zh', 'content_zh', 'manual']); $data = $request->except(['_token', 'id', 'title_en', 'keys_en', 'content_en', 'title_de', 'keys_de', 'content_de', 'title_sa', 'keys_sa', 'content_sa', 'title_zh', 'keys_zh', 'content_zh', 'manual']);
...@@ -307,7 +311,7 @@ class PageController extends Controller ...@@ -307,7 +311,7 @@ class PageController extends Controller
if ($manual==1){ if ($manual==1){
$dataEn['title'] = strip_tags($data['title_en']); $dataEn['title'] = strip_tags($data['title_en']);
$dataEn['keys'] = strip_tags($data['keys_en']); $dataEn['keys'] = strip_tags($data['keys_en']);
$dataEn['content'] = strip_tags($data['content_en'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $dataEn['content'] = $data['content_en'];
} }
else{ else{
if ($data['content'] == null) { if ($data['content'] == null) {
...@@ -319,7 +323,7 @@ class PageController extends Controller ...@@ -319,7 +323,7 @@ class PageController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys']));
if (strlen($data['content']) < 5000) { if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody'])); $content = $trans->translate($this->SOURCE, $this->TARGET, $data['content']);
$dataEn['content'] = $content; $dataEn['content'] = $content;
} }
...@@ -335,7 +339,7 @@ class PageController extends Controller ...@@ -335,7 +339,7 @@ class PageController extends Controller
if($manual==1){ if($manual==1){
$dataDe['title'] = strip_tags($data['title_de']); $dataDe['title'] = strip_tags($data['title_de']);
$dataDe['keys'] = strip_tags($data['keys_de']); $dataDe['keys'] = strip_tags($data['keys_de']);
$dataDe['content'] = strip_tags($data['content_de'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $dataDe['content'] = $data['content_de'];
} }
else{ else{
if($data['content']==null){ if($data['content']==null){
...@@ -346,7 +350,7 @@ class PageController extends Controller ...@@ -346,7 +350,7 @@ class PageController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys']));
if (strlen($data['content']) < 5000) { if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody'])); $content = $trans->translate($this->SOURCE, $this->TARGETDE, $data['content']);
$dataDe['content'] = $content; $dataDe['content'] = $content;
} }
...@@ -362,7 +366,7 @@ class PageController extends Controller ...@@ -362,7 +366,7 @@ class PageController extends Controller
if($manual==1){ if($manual==1){
$dataSa['title'] = strip_tags($data['title_sa']); $dataSa['title'] = strip_tags($data['title_sa']);
$dataSa['keys'] = strip_tags($data['keys_sa']); $dataSa['keys'] = strip_tags($data['keys_sa']);
$dataSa['content'] = strip_tags($data['content_sa'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $dataSa['content'] = $data['content_sa'];
} }
else{ else{
if($data['content']==null){ if($data['content']==null){
...@@ -374,7 +378,7 @@ class PageController extends Controller ...@@ -374,7 +378,7 @@ class PageController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys']));
if (strlen($data['content']) < 5000) { if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody'])); $content = $trans->translate($this->SOURCE, $this->TARGETSA, $data['content']);
$dataSa['content'] = $content; $dataSa['content'] = $content;
} }
...@@ -390,7 +394,7 @@ class PageController extends Controller ...@@ -390,7 +394,7 @@ class PageController extends Controller
if($manual==1){ if($manual==1){
$dataZh['title'] = strip_tags($data['title_zh']); $dataZh['title'] = strip_tags($data['title_zh']);
$dataZh['keys'] = strip_tags($data['keys_zh']); $dataZh['keys'] = strip_tags($data['keys_zh']);
$dataZh['content'] = strip_tags($data['content_zh'],['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody']); $dataZh['content'] = $data['content_zh'];
} }
else{ else{
if($data['content']==null){ if($data['content']==null){
...@@ -402,7 +406,7 @@ class PageController extends Controller ...@@ -402,7 +406,7 @@ class PageController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys']));
if (strlen($data['content']) < 5000) { if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', '<b>', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'td', 'th', 'tr', 'iframe','section','small','button', 'span','style','h1','h2','h3','h4','h5','h6', 'thead', 'tbody'])); $content = $trans->translate($this->SOURCE, $this->TARGETZH, $data['content']);
$dataZh['content'] = $content; $dataZh['content'] = $content;
} }
......
...@@ -88,14 +88,14 @@ class PostController extends Controller ...@@ -88,14 +88,14 @@ class PostController extends Controller
*/ */
public function store(Request $request) public function store(Request $request)
{ {
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $request['content'] = $request->content;
$request['title'] = strip_tags($request->title); $request['title'] = strip_tags($request->title);
$request->validate([ $request->validate([
'title' => 'required', 'title' => 'required',
'categories' => 'required', 'categories' => 'required',
'content' => 'required|min:3', 'content' => 'required|min:3',
'post_date' => 'required', 'post_date' => 'required',
'keys' => 'max:100', 'keys' => 'required|max:100',
'thumbnail' => 'mimes:jpg,jpeg,png|max : 3072' 'thumbnail' => 'mimes:jpg,jpeg,png|max : 3072'
], [ ], [
...@@ -104,7 +104,8 @@ class PostController extends Controller ...@@ -104,7 +104,8 @@ class PostController extends Controller
'content.required' => 'Konten wajib diisi', 'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat', 'content.min' => 'Konten terlalu singkat',
'post_date.required' => 'Tanggal posting wajib diisi', 'post_date.required' => 'Tanggal posting wajib diisi',
'keys.max' => 'Keyword terlalu panjang' 'keys.max' => 'Keyword terlalu panjang',
'keys.required' => 'Keyword wajib diisi'
]); ]);
$data = $request->except('_token'); $data = $request->except('_token');
...@@ -225,7 +226,7 @@ class PostController extends Controller ...@@ -225,7 +226,7 @@ class PostController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGET, $data['content']);
$dataEn['post_id'] = $post->id; $dataEn['post_id'] = $post->id;
$dataEn['title'] = $title; $dataEn['title'] = $title;
...@@ -245,7 +246,7 @@ class PostController extends Controller ...@@ -245,7 +246,7 @@ class PostController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETDE, $data['content']);
$dataDe['post_id'] = $post->id; $dataDe['post_id'] = $post->id;
$dataDe['title'] = $title; $dataDe['title'] = $title;
...@@ -265,7 +266,7 @@ class PostController extends Controller ...@@ -265,7 +266,7 @@ class PostController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETSA, $data['content']);
$dataSa['post_id'] = $post->id; $dataSa['post_id'] = $post->id;
$dataSa['title'] = $title; $dataSa['title'] = $title;
...@@ -285,7 +286,7 @@ class PostController extends Controller ...@@ -285,7 +286,7 @@ class PostController extends Controller
$data['content'] = 'kosong'; $data['content'] = 'kosong';
} }
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section','span'])); $content = $trans->translate($this->SOURCE, $this->TARGETZH, $data['content']);
$dataZh['post_id'] = $post->id; $dataZh['post_id'] = $post->id;
$dataZh['title'] = $title; $dataZh['title'] = $title;
...@@ -355,11 +356,11 @@ class PostController extends Controller ...@@ -355,11 +356,11 @@ class PostController extends Controller
*/ */
public function update(Request $request, $id) public function update(Request $request, $id)
{ {
$request['content'] = strip_tags($request->content, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $request['content'] = $request->content;
$request['content_en'] = strip_tags($request->content_en, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $request['content_en'] = $request->content_en;
$request['content_de'] = strip_tags($request->content_de, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $request['content_de'] = $request->content_de;
$request['content_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $request['content_sa'] = $request->content_sa;
$request['content_zh'] = strip_tags($request->content_zh, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $request['content_zh'] = $request->content_zh;
$request['title'] = strip_tags($request->title); $request['title'] = strip_tags($request->title);
$request['title_en'] = strip_tags($request->title_en); $request['title_en'] = strip_tags($request->title_en);
$request['title_de'] = strip_tags($request->title_de); $request['title_de'] = strip_tags($request->title_de);
...@@ -372,17 +373,20 @@ class PostController extends Controller ...@@ -372,17 +373,20 @@ class PostController extends Controller
$request['keys_zh'] = strip_tags($request->keys_zh); $request['keys_zh'] = strip_tags($request->keys_zh);
$request->validate([ $request->validate([
'title' => 'required',
'categories' => 'required', 'categories' => 'required',
'content' => 'required|min:3', 'content' => 'required|min:3',
'post_date' => 'required', 'post_date' => 'required',
'keys' => 'max:100', 'keys' => 'required|max:100',
'thumbnail' => 'mimes:jpg,jpeg,png|max : 3072' 'thumbnail' => 'mimes:jpg,jpeg,png|max : 3072'
], [ ], [
'title.required' => 'Judul wajib diisi',
'categories.required' => 'Kategori wajib diisi', 'categories.required' => 'Kategori wajib diisi',
'content.required' => 'Konten wajib diisi', 'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat', 'content.min' => 'Konten terlalu singkat',
'post_date.required' => 'Tanggal posting wajib diisi', 'post_date.required' => 'Tanggal posting wajib diisi',
'keys.max' => 'Keyword terlalu panjang' 'keys.max' => 'Keyword terlalu panjang',
'keys.required' => 'Keyword wajib diisi'
]); ]);
...@@ -431,7 +435,7 @@ class PostController extends Controller ...@@ -431,7 +435,7 @@ class PostController extends Controller
if($manual==1){ if($manual==1){
$dataEn['title'] = strip_tags($data['title_en']); $dataEn['title'] = strip_tags($data['title_en']);
$dataEn['keys'] = strip_tags($data['keys_en']); $dataEn['keys'] = strip_tags($data['keys_en']);
$dataEn['content'] = strip_tags($data['content_en'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $dataEn['content'] = $data['content_en'];
} }
else{ else{
...@@ -444,7 +448,7 @@ class PostController extends Controller ...@@ -444,7 +448,7 @@ class PostController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys']));
if (strlen($data['content']) < 5000) { if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGET, $data['content']);
$dataEn['content'] = $content; $dataEn['content'] = $content;
} }
...@@ -459,7 +463,7 @@ class PostController extends Controller ...@@ -459,7 +463,7 @@ class PostController extends Controller
if($manual==1){ if($manual==1){
$dataDe['title'] = strip_tags($data['title_de']); $dataDe['title'] = strip_tags($data['title_de']);
$dataDe['keys'] = strip_tags($data['keys_de']); $dataDe['keys'] = strip_tags($data['keys_de']);
$dataDe['content'] = strip_tags($data['content_de'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $dataDe['content'] = $data['content_de'];
} }
else{ else{
...@@ -472,7 +476,7 @@ class PostController extends Controller ...@@ -472,7 +476,7 @@ class PostController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys']));
if (strlen($data['content']) < 5000) { if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETDE, $data['content']);
$dataDe['content'] = $content; $dataDe['content'] = $content;
} }
...@@ -487,7 +491,7 @@ class PostController extends Controller ...@@ -487,7 +491,7 @@ class PostController extends Controller
if($manual==1){ if($manual==1){
$dataSa['title'] = strip_tags($data['title_sa']); $dataSa['title'] = strip_tags($data['title_sa']);
$dataSa['keys'] = strip_tags($data['keys_sa']); $dataSa['keys'] = strip_tags($data['keys_sa']);
$dataSa['content'] = strip_tags($data['content_sa'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $dataSa['content'] = $data['content_sa'];
} }
else{ else{
...@@ -500,7 +504,7 @@ class PostController extends Controller ...@@ -500,7 +504,7 @@ class PostController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys']));
if (strlen($data['content']) < 5000) { if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETSA, $data['content']);
$dataSa['content'] = $content; $dataSa['content'] = $content;
} }
...@@ -515,7 +519,7 @@ class PostController extends Controller ...@@ -515,7 +519,7 @@ class PostController extends Controller
if($manual==1){ if($manual==1){
$dataZh['title'] = strip_tags($data['title_zh']); $dataZh['title'] = strip_tags($data['title_zh']);
$dataZh['keys'] = strip_tags($data['keys_zh']); $dataZh['keys'] = strip_tags($data['keys_zh']);
$dataZh['content'] = strip_tags($data['content_zh'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span']); $dataZh['content'] = $data['content_zh'];
} }
else{ else{
if ($data['content'] == null) { if ($data['content'] == null) {
...@@ -527,7 +531,7 @@ class PostController extends Controller ...@@ -527,7 +531,7 @@ class PostController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys'])); $keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys']));
if (strlen($data['content']) < 5000) { if (strlen($data['content']) < 5000) {
$content = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['content'], ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'iframe','section', 'span'])); $content = $trans->translate($this->SOURCE, $this->TARGETZH, $data['content']);
$dataZh['content'] = $content; $dataZh['content'] = $content;
} }
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
{{ Form::hidden('manual', $manual, array('id'=>'manual')) }} {{ Form::hidden('manual', $manual, array('id'=>'manual')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title_en', $data->rEn ? $data->rEn->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title_en', $data->rEn ? $data->rEn->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_en', $data->rEn ? $data->rEn->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_en', $data->rEn ? $data->rEn->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_de', $data->rDe ? $data->rDe->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_de', $data->rDe ? $data->rDe->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_sa', $data->rSa ? $data->rSa->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_sa', $data->rSa ? $data->rSa->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_zh', $data->rZh ? $data->rZh->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_zh', $data->rZh ? $data->rZh->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;','required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -203,7 +203,7 @@ ...@@ -203,7 +203,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
{{ Form::hidden('manual', $manual, array('id'=>'manual')) }} {{ Form::hidden('manual', $manual, array('id'=>'manual')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title_en', $data->rEn ? $data->rEn->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title_en', $data->rEn ? $data->rEn->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_en', $data->rEn ? $data->rEn->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_en', $data->rEn ? $data->rEn->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_de', $data->rDe ? $data->rDe->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_de', $data->rDe ? $data->rDe->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_sa', $data->rSa ? $data->rSa->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_sa', $data->rSa ? $data->rSa->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_zh', $data->rZh ? $data->rZh->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_zh', $data->rZh ? $data->rZh->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
{{ Form::hidden('manual', $manual, array('id'=>'manual')) }} {{ Form::hidden('manual', $manual, array('id'=>'manual')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>trans('label.title'), 'style'=>'font-size: 14pt;')) }}
{{ Form::hidden('manual', $manual, array('id'=>'manual')) }} {{ Form::hidden('manual', $manual, array('id'=>'manual')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title_en', $data->rEn ? $data->rEn->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title_en', $data->rEn ? $data->rEn->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_en', $data->rEn ? $data->rEn->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_en', $data->rEn ? $data->rEn->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -126,7 +126,7 @@ ...@@ -126,7 +126,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title_de', $data->rDe ? $data->rDe->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title_de', $data->rDe ? $data->rDe->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_de', $data->rDe ? $data->rDe->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_de', $data->rDe ? $data->rDe->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title_sa', $data->rSa ? $data->rSa->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title_sa', $data->rSa ? $data->rSa->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_sa', $data->rSa ? $data->rSa->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_sa', $data->rSa ? $data->rSa->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -184,7 +184,7 @@ ...@@ -184,7 +184,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title_zh', $data->rZh ? $data->rZh->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title_zh', $data->rZh ? $data->rZh->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -198,7 +198,7 @@ ...@@ -198,7 +198,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_zh', $data->rZh ? $data->rZh->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_zh', $data->rZh ? $data->rZh->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;"> <div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::select('categories', $categories, old('categories'), ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'categories', 'placeholder' => app('translator')->getFromJson('feature.category'), 'required']) }} {{ Form::select('categories', $categories, old('categories'), ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'categories', 'placeholder' => app('translator')->getFromJson('feature.category')]) }}
@if ($errors->has('categories')) @if ($errors->has('categories'))
<label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label>
@endif @endif
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;"> <div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::select('categories', $categories, old('categories'), ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'categories', 'placeholder' => app('translator')->getFromJson('feature.category'), 'required']) }} {{ Form::select('categories', $categories, old('categories'), ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'categories', 'placeholder' => app('translator')->getFromJson('feature.category')]) }}
@if ($errors->has('categories')) @if ($errors->has('categories'))
<label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label>
@endif @endif
...@@ -261,7 +261,7 @@ ...@@ -261,7 +261,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title', old('title'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;"> <div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::select('categories', $categories, old('categories'), ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'categories', 'placeholder' => app('translator')->getFromJson('feature.category'), 'required']) }} {{ Form::select('categories', $categories, old('categories'), ['class' => 'form-control select2', 'style' => 'width: 100%; font-size: 14pt;', 'id' => 'categories', 'placeholder' => app('translator')->getFromJson('feature.category')]) }}
@if ($errors->has('categories')) @if ($errors->has('categories'))
<label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label>
@endif @endif
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys', old('keys'), array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif"> <div class="form-group @if ($errors->has('title')) has-error @endif">
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('title_en', $data->rEn ? $data->rEn->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('title_en', $data->rEn ? $data->rEn->title : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.title'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('title')) @if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif @endif
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_en', $data->rEn ? $data->rEn->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_en', $data->rEn ? $data->rEn->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_de', $data->rDe ? $data->rDe->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_de', $data->rDe ? $data->rDe->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_sa', $data->rSa ? $data->rSa->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_sa', $data->rSa ? $data->rSa->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif"> <div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3> <h3 class="panel-title">@lang('label.keywords')</h3>
<div class="col-md-12"> <div class="col-md-12">
{{ Form::text('keys_zh', $data->rZh ? $data->rZh->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;', 'required')) }} {{ Form::text('keys_zh', $data->rZh ? $data->rZh->keys : null, array('class' => 'form-control', 'placeholder'=>app('translator')->getFromJson('label.keys'), 'style'=>'font-size: 14pt;')) }}
@if ($errors->has('keys')) @if ($errors->has('keys'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label> <label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif @endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment