@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)) {{ html()->form()->acceptsFiles()->route('publicador.geracao.imagens.salvar')->class(['form form-edit'])->open() }} @else {{ html()->modelForm($model, 'PUT')->acceptsFiles()->route('publicador.geracao.imagens.salvar')->open() }} {{ html()->hidden('id') }} @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(150)->placeholder(__('labels.titulo')) }}
@if ($errors->has('titulo'))
{{ $errors->first('titulo') }}
@endif
{{-- LEGENDA --}}
{{ html()->label('legenda', trans_choice('labels.legendas', 1)) }}
{{ html()->text('legenda', null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('legenda')])->maxlength(150)->placeholder(trans_choice('labels.legendas', 1)) }}
@if ($errors->has('legenda'))
{{ $errors->first('legenda') }}
@endif
{{-- CRÉDITO --}}
{{ html()->label('credito', __('labels.creditos')) }}
{{ html()->text('credito', null)->class(['form-control form-control-sm border-left-0 ', 'is-invalid' => $errors->has('credito')])->maxlength(150)->placeholder(__('labels.creditos')) }}
@if ($errors->has('credito'))
{{ $errors->first('credito') }}
@endif
{{-- ARQUIVO/UPLOAD --}}
{{ html()->file('arquivo')->class(['form-control border-left-0']) }}
@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')

{{ html()->hidden('exists', 1) }} @else {{ html()->hidden('exists', 0) }} @endif

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

@if (empty($model)) {{ html()->form()->close() }} @else {{ html()->closeModelForm() }} @endif
@endsection