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

@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.imagens.salvar'], 'class' => 'form form-edit', 'files' => true]) !!} @else {!! Form::model($model, ['route' => ['publicador.imagens.salvar'], 'method' => 'put', 'files' => true]) !!} {{ Form::hidden('id') }} @endif
{{ Form::label('titulo', __('labels.titulo')) }} {{ Form::text('titulo', null, ['class' => 'form-control form-control-sm '.($errors->has('titulo') ? 'is-invalid' : ''), 'maxlength' => 150, 'placeholder' => __('labels.titulo')]) }} @if ($errors->has('titulo'))
{{ $errors->first('titulo') }}
@endif
{{ Form::label('legenda', trans_choice('labels.legendas', 1)) }} {{ Form::text('legenda', null, ['class' => 'form-control form-control-sm '.($errors->has('legenda') ? 'is-invalid' : ''), 'placeholder' => trans_choice('labels.legendas', 1)]) }} @if ($errors->has('legenda'))
{{ $errors->first('legenda') }}
@endif
{{ Form::label('credito', __('labels.creditos')) }} {{ Form::text('credito', null, ['class' => 'form-control form-control-sm '.($errors->has('credito') ? 'is-invalid' : ''), 'maxlength' => 150, 'placeholder' => __('labels.creditos')]) }} @if ($errors->has('credito'))
{{ $errors->first('credito') }}
@endif

@choice('labels.arquivos', 1)

{{ Form::file('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