@extends('layouts.publicador.novo_padrao') @section('content')

@lang('labels.geracao_atitude') / @choice('labels.noticias', 0) {{ empty($model->id) ? __('labels.acoes.adicionar') : __('labels.acoes.alterar') }}

@if ($errors->any())
@lang('labels.msg.verifique')
@endif
@if (empty($model)) {{ html()->form()->route('publicador.geracao.noticias.salvar')->class(['form form-edit'])->open() }} @else {{ html()->modelForm($model, 'PUT')->route('publicador.geracao.noticias.salvar')->open() }} {{ html()->hidden('id') }} @endif
{{-- DESTAQUE --}}
{{ html()->label('destaque', trans_choice('labels.destaques', 1)) }}
{{ html()->select('destaque', \Config::get('constants.boolean'), null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('destaque')])->placeholder(__('labels.acoes.selecione')) }}
@if ($errors->has('destaque'))
{{ $errors->first('destaque') }}
@endif
{{-- PUBLICADO --}}
{{ html()->label('publicado', __('labels.publicado')) }}
{{ html()->select('publicado', \Config::get('constants.boolean'), null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('publicado')])->placeholder(__('labels.acoes.selecione')) }}
@if ($errors->has('publicado'))
{{ $errors->first('publicado') }}
@endif
{{-- DATA PUBLICAÇÃO --}}
{{ html()->label('data_publicacao', __('labels.data_publicacao')) }}
{{ html()->text('data_publicacao', empty($model) ? \Carbon\Carbon::now()->format('d/m/Y H:i') : $model->data_publicacao->format('d/m/Y H:i'))->class(['data_publicacao form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('data_publicacao')])->placeholder(__('labels.data_publicacao')) }}
@if ($errors->has('data_publicacao'))
{{ $errors->first('data_publicacao') }}
@endif
{{-- TÍTULO --}}
{{ html()->label('titulo', __('labels.titulo')) }}
{{ html()->text('titulo', null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('titulo')])->maxlength(250)->placeholder(__('labels.titulo')) }}
@if ($errors->has('titulo'))
{{ $errors->first('titulo') }}
@endif
{{-- IMAGEM DESTAQUE --}}
{{ html()->label('imagem_id', sprintf('%s %s', trans_choice('labels.imagens', 1), trans_choice('labels.destaques', 1))) }}
{{ html()->select('imagem_id', $imagens, null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('imagem_id')])->placeholder(__('labels.acoes.selecione')) }}
@if ($errors->has('imagem_id'))
{{ $errors->first('imagem_id') }}
@endif
{{-- IMAGEM REDES SOCIAIS --}}
{{ html()->label('imagem_redes', sprintf('%s %s', trans_choice('labels.imagens', 1), __('labels.redes_sociais'))) }}
{{ html()->select('imagem_redes', $imagens, null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('imagem_redes')])->placeholder(__('labels.acoes.selecione')) }}
@if ($errors->has('imagem_redes'))
{{ $errors->first('imagem_redes') }}
@endif
{{-- TEXTO/CONTEÚDO --}}
{{ html()->label('texto', __('labels.texto')) }}
{{ html()->textarea('texto', null)->attribute('style', 'height: 500px')->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('texto')])->placeholder(__('labels.texto')) }}
@if ($errors->has('texto'))
{{ $errors->first('texto') }}
@endif
{{-- TAGS --}}
{{ html()->label('tags', __('labels.tags')) }}
{{ html()->text('tags', null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('tags')])->maxlength(150)->placeholder(__('labels.tags')) }}
@if ($errors->has('tags'))
{{ $errors->first('tags') }}
@endif

@lang('labels.msg.separe_virgulas')

{{-- AUTOR --}}
{{ html()->label('autor', __('labels.autor')) }}
{{ html()->text('autor', null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('autor')])->maxlength(150)->placeholder(__('labels.autor')) }}
@if ($errors->has('autor'))
{{ $errors->first('autor') }}
@endif
{{-- FONTE --}}
{{ html()->label('fonte', __('labels.fonte')) }}
{{ html()->text('fonte', null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('fonte')])->maxlength(150)->placeholder(__('labels.fonte')) }}
@if ($errors->has('fonte'))
{{ $errors->first('fonte') }}
@endif

@lang('labels.acoes.cancelar') {{ html()->submit(__('labels.acoes.salvar'))->class(['btn btn-success']) }}

@if (empty($model)) {{ html()->form()->close() }} @else {{ html()->closeModelForm() }} @endif
@include('layouts.publicador.tinymce') @endsection