Commit 8a6e29b5 by Siti Aisah

remove strip tags dan ubah penempatan required

parent d565b427
......@@ -78,18 +78,19 @@ class AgendaController extends Controller
*/
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->validate([
'title' => 'required',
'content' => 'required|min:3',
'event_date' => 'required',
'keys' => 'max:100'
'keys' => 'required|max:100',
], [
'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat',
'event_date.required' => 'Tanggal posting wajib diisi',
'keys.required' => 'Keyword wajib diisi',
'keys.max' => 'Keyword terlalu panjang'
]);
......@@ -122,7 +123,7 @@ class AgendaController extends Controller
$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['title'] = $title;
......@@ -142,7 +143,7 @@ class AgendaController extends Controller
$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['title'] = $title;
......@@ -162,7 +163,7 @@ class AgendaController extends Controller
$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['title'] = $title;
......@@ -182,7 +183,7 @@ class AgendaController extends Controller
$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['title'] = $title;
......@@ -253,11 +254,11 @@ class AgendaController extends Controller
*/
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_en'] = strip_tags($request->content_en, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']);
$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_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'table', 'tr', 'td', 'th', 'span']);
$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'] = $request->content;
$request['content_en'] = $request->content_en;
$request['content_de'] = $request->content_de;
$request['content_sa'] = $request->content_sa;
$request['content_zh'] = $request->content_zh;
$request['title'] = strip_tags($request->title);
$request['title_en'] = strip_tags($request->title_en);
$request['title_de'] = strip_tags($request->title_de);
......@@ -270,13 +271,16 @@ class AgendaController extends Controller
$request['keys_zh'] = strip_tags($request->keys_zh);
$request->validate([
'title' => 'required',
'content' => 'required|min:3',
'event_date' => 'required',
'keys' => 'max:100'
'keys' => 'required|max:100'
], [
'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat',
'event_date.required' => 'Tanggal posting wajib diisi',
'keys.required' => 'Keyword wajib diisi',
'keys.max' => 'Keyword terlalu panjang'
]);
......@@ -316,7 +320,7 @@ class AgendaController extends Controller
if($manual==1) {
$dataEn['title'] = strip_tags($data['title_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{
if ($data['content'] == null) {
......@@ -326,7 +330,7 @@ class AgendaController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['title']));
$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['keys'] = $keys;
......@@ -341,7 +345,7 @@ class AgendaController extends Controller
if($manual==1) {
$dataDe['title'] = strip_tags($data['title_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{
......@@ -352,7 +356,7 @@ class AgendaController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['title']));
$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['keys'] = $keys;
......@@ -367,7 +371,7 @@ class AgendaController extends Controller
if($manual==1) {
$dataSa['title'] = strip_tags($data['title_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{
......@@ -378,7 +382,7 @@ class AgendaController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['title']));
$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['keys'] = $keys;
......@@ -393,7 +397,7 @@ class AgendaController extends Controller
if($manual==1) {
$dataZh['title'] = strip_tags($data['title_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{
......@@ -404,7 +408,7 @@ class AgendaController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['title']));
$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['keys'] = $keys;
......
......@@ -79,19 +79,20 @@ class InformationController extends Controller
*/
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->validate([
'title' => 'required',
'content' => 'required|min:3',
'event_date' => 'required',
'keys' => 'max:100'
'keys' => 'required|max:100'
], [
'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat',
'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');
......@@ -123,7 +124,7 @@ class InformationController extends Controller
$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['title'] = $title;
......@@ -143,7 +144,7 @@ class InformationController extends Controller
$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['title'] = $title;
......@@ -163,7 +164,7 @@ class InformationController extends Controller
$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['title'] = $title;
......@@ -183,7 +184,7 @@ class InformationController extends Controller
$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['title'] = $title;
......@@ -252,11 +253,11 @@ class InformationController extends Controller
*/
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_en'] = strip_tags($request->content_en, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']);
$request['content_de'] = strip_tags($request->content_de, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']);
$request['content_sa'] = strip_tags($request->content_sa, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']);
$request['content_zh'] = strip_tags($request->content_zh, ['a', 'br', 'p', 'b', 'i', 'u', 'ul', 'li', 'ol', 'img', 'span']);
$request['content'] = $request->content;
$request['content_en'] = $request->content_en;
$request['content_de'] = $request->content_de;
$request['content_sa'] = $request->content_sa;
$request['content_zh'] = $request->content_zh;
$request['title'] = strip_tags($request->title);
$request['title_en'] = strip_tags($request->title_en);
$request['title_de'] = strip_tags($request->title_de);
......@@ -269,14 +270,17 @@ class InformationController extends Controller
$request['keys_zh'] = strip_tags($request->keys_zh);
$request->validate([
'title' => 'required',
'content' => 'required|min:3',
'event_date' => 'required',
'keys' => 'max:100'
'keys' => 'required|max:100'
], [
'title.required' => 'Judul wajib diisi',
'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat',
'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']);
......@@ -315,7 +319,7 @@ class InformationController extends Controller
if($manual==1) {
$dataEn['title'] = strip_tags($data['title_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{
if ($data['content'] == null) {
......@@ -325,7 +329,7 @@ class InformationController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['title']));
$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['keys'] = $keys;
......@@ -340,7 +344,7 @@ class InformationController extends Controller
if($manual==1) {
$dataDe['title'] = strip_tags($data['title_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{
if ($data['content'] == null) {
......@@ -350,7 +354,7 @@ class InformationController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['title']));
$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['keys'] = $keys;
......@@ -365,7 +369,7 @@ class InformationController extends Controller
if($manual==1) {
$dataSa['title'] = strip_tags($data['title_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{
......@@ -376,7 +380,7 @@ class InformationController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['title']));
$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['keys'] = $keys;
......@@ -391,7 +395,7 @@ class InformationController extends Controller
if($manual==1) {
$dataZh['title'] = strip_tags($data['title_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{
......@@ -402,7 +406,7 @@ class InformationController extends Controller
$trans = new GoogleTranslate();
$title = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['title']));
$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['keys'] = $keys;
......
......@@ -88,14 +88,14 @@ class PostController extends Controller
*/
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->validate([
'title' => 'required',
'categories' => 'required',
'content' => 'required|min:3',
'post_date' => 'required',
'keys' => 'max:100',
'keys' => 'required|max:100',
'thumbnail' => 'mimes:jpg,jpeg,png|max : 3072'
], [
......@@ -104,7 +104,8 @@ class PostController extends Controller
'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat',
'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');
......@@ -225,7 +226,7 @@ class PostController extends Controller
$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['title'] = $title;
......@@ -245,7 +246,7 @@ class PostController extends Controller
$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['title'] = $title;
......@@ -265,7 +266,7 @@ class PostController extends Controller
$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['title'] = $title;
......@@ -285,7 +286,7 @@ class PostController extends Controller
$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['title'] = $title;
......@@ -355,11 +356,11 @@ class PostController extends Controller
*/
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_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_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_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_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'] = $request->content;
$request['content_en'] = $request->content_en;
$request['content_de'] = $request->content_de;
$request['content_sa'] = $request->content_sa;
$request['content_zh'] = $request->content_zh;
$request['title'] = strip_tags($request->title);
$request['title_en'] = strip_tags($request->title_en);
$request['title_de'] = strip_tags($request->title_de);
......@@ -372,17 +373,20 @@ class PostController extends Controller
$request['keys_zh'] = strip_tags($request->keys_zh);
$request->validate([
'title' => 'required',
'categories' => 'required',
'content' => 'required|min:3',
'post_date' => 'required',
'keys' => 'max:100',
'keys' => 'required|max:100',
'thumbnail' => 'mimes:jpg,jpeg,png|max : 3072'
], [
'title.required' => 'Judul wajib diisi',
'categories.required' => 'Kategori wajib diisi',
'content.required' => 'Konten wajib diisi',
'content.min' => 'Konten terlalu singkat',
'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
if($manual==1){
$dataEn['title'] = strip_tags($data['title_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{
......@@ -444,7 +448,7 @@ class PostController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGET, strip_tags($data['keys']));
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;
}
......@@ -459,7 +463,7 @@ class PostController extends Controller
if($manual==1){
$dataDe['title'] = strip_tags($data['title_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{
......@@ -472,7 +476,7 @@ class PostController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETDE, strip_tags($data['keys']));
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;
}
......@@ -487,7 +491,7 @@ class PostController extends Controller
if($manual==1){
$dataSa['title'] = strip_tags($data['title_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{
......@@ -500,7 +504,7 @@ class PostController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETSA, strip_tags($data['keys']));
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;
}
......@@ -515,7 +519,7 @@ class PostController extends Controller
if($manual==1){
$dataZh['title'] = strip_tags($data['title_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{
if ($data['content'] == null) {
......@@ -527,7 +531,7 @@ class PostController extends Controller
$keys = $trans->translate($this->SOURCE, $this->TARGETZH, strip_tags($data['keys']));
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;
}
......
......@@ -33,7 +33,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -109,7 +109,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -36,7 +36,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -203,7 +203,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -66,7 +66,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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')) }}
@if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
......@@ -82,7 +82,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -97,7 +97,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -111,7 +111,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -140,7 +140,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -169,7 +169,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -198,7 +198,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -33,7 +33,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -109,7 +109,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -36,7 +36,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -203,7 +203,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -66,7 +66,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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')) }}
@if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
......@@ -82,7 +82,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -97,7 +97,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -111,7 +111,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -140,7 +140,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -169,7 +169,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -198,7 +198,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -33,7 +33,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -63,7 +63,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -36,7 +36,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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')) }}
@if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
......@@ -157,7 +157,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -66,7 +66,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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')) }}
@if ($errors->has('title'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
......@@ -82,7 +82,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -97,7 +97,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -111,7 +111,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -126,7 +126,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -140,7 +140,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -155,7 +155,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -169,7 +169,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -184,7 +184,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -198,7 +198,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -33,7 +33,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -43,7 +43,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label>
@endif
......@@ -162,7 +162,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -36,7 +36,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -46,7 +46,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label>
@endif
......@@ -261,7 +261,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......
......@@ -76,7 +76,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -86,7 +86,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('categories')) has-error @endif" style="margin-top: 5px;">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('categories')}}</label>
@endif
......@@ -101,7 +101,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -116,7 +116,7 @@
<div class="col-md-12">
<div class="form-group @if ($errors->has('title')) has-error @endif">
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('title')}}</label>
@endif
......@@ -130,7 +130,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -159,7 +159,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -188,7 +188,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@endif
......@@ -217,7 +217,7 @@
<div class="form-group @if ($errors->has('keys')) has-error @endif">
<h3 class="panel-title">@lang('label.keywords')</h3>
<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'))
<label id="login-error" class="error" for="login">{{$errors->first('keys')}}</label>
@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