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

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

@if ($errors->any())
@lang('labels.msg.verifique')
@endif
@if (empty($model)) {!! Form::open(['route' => ['publicador.geracao.imagens.salvar'], 'class' => 'form form-edit', 'files' => true]) !!} @else {!! Form::model($model, ['route' => ['publicador.geracao.imagens.salvar'], 'method' => 'put', 'files' => true]) !!} {{ Form::hidden('id') }} @endif
{{-- TÍTULO --}}
{{ Form::label('titulo', __('labels.titulo')) }}
{{ Form::text('titulo', null, ['class' => 'form-control form-control-sm border-left-0 ' . ($errors->has('titulo') ? 'is-invalid' : ''), 'maxlength' => 150, 'placeholder' => __('labels.titulo'), 'id' => 'titulo']) }}
@if ($errors->has('titulo'))
{{ $errors->first('titulo') }}
@endif
{{-- LEGENDA --}}
{{ Form::label('legenda', trans_choice('labels.legendas', 1)) }}
{{ Form::text('legenda', null, ['class' => 'form-control form-control-sm border-left-0 ' . ($errors->has('legenda') ? 'is-invalid' : ''), 'maxlength' => 150, 'placeholder' => trans_choice('labels.legendas', 1), 'id' => 'legenda']) }}
@if ($errors->has('legenda'))
{{ $errors->first('legenda') }}
@endif
{{-- CRÉDITO --}}
{{ Form::label('credito', __('labels.creditos')) }}
{{ Form::text('credito', null, ['class' => 'form-control form-control-sm border-left-0 ' . ($errors->has('credito') ? 'is-invalid' : ''), 'maxlength' => 150, 'placeholder' => __('labels.creditos'), 'id' => 'credito']) }}
@if ($errors->has('credito'))
{{ $errors->first('credito') }}
@endif
{{-- ARQUIVO/UPLOAD --}}
{{ Form::file('arquivo', ['class' => 'form-control border-left-0', 'id' => 'arquivo']) }}
@if ($errors->has('arquivo'))
{{ $errors->first('arquivo') }}
@endif @if (!empty($model) && !empty($model->arquivo) && is_file(public_path($model->caminho_completo)))

@lang('labels.msg.arquivo_subst')

{{ Form::hidden('exists', 1) }} @else {{ Form::hidden('exists', 0) }} @endif

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

{!! Form::close() !!}
@endsection