@extends('layouts.admin') @section('css') @parent {!! Html::style('adminbsb_plugins/bootstrap-select/css/bootstrap-select.min.css') !!} @stop @section('content')

send Formulaires

{!! Form::model($champs, array("action" => "FormulaireController@save_champs", "class" => "form-horizontal")) !!}
{!! Form::hidden('id') !!} {!! Form::hidden('formulaire_id', $formulaire->id) !!}
@if(count(getAllLangues()) > 1) @endif
{!! Form::reset('Annuler', array("onclick" => "window.location = '" . action('FormulaireController@champs', array('formulaire' => $formulaire->id)) . "'", "class" => "btn btn-sm bg-orange waves-effect pull-right")) !!}

Édition d'un champ

Éditer un champ pour le formulaire {{ $formulaire->nom }}

{!! Form::text('nom', old('nom'), array("class" => "form-control", "placeholder" => "Nom du champ", "required")) !!}
{!! Form::text('class', old('class'), array("class" => "form-control", "placeholder" => "Class du champ")) !!}
{!! Form::select('type', $types, old('type'), array("class" => "form-control show-tick")) !!}
{!! Form::checkbox('label', 1, $champs && $champs->label ? true : false, array("id" => "label", "class" => "filled-in chk-col-teal")) !!}
{!! Form::checkbox('placeholder', 1, $champs && $champs->placeholder ? true : false, array("id" => "placeholder", "class" => "filled-in chk-col-teal")) !!}
{!! Form::textarea('liste_selection', $champs ? str_replace("|", "\r\n", $champs->liste_selection) : "", array("rows" => 3, "class" => "form-control")) !!}
{!! Form::selectRange('rang', 1, 20, old('rang'), array("class" => "form-control show-tick")) !!}
{!! Form::checkbox('requis', 1, $champs && $champs->requis ? true : false, array("id" => "requis", "class" => "filled-in chk-col-teal")) !!}
{!! Form::checkbox('email', 1, $champs && $champs->email ? true : false, array("id" => "email", "class" => "filled-in chk-col-teal")) !!}
{!! Form::checkbox('numerique', 1, $champs && $champs->numerique ? true : false, array("id" => "numerique", "class" => "filled-in chk-col-teal")) !!}
{!! Form::text('nb_caractere', old('nb_caractere'), array("class" => "form-control", "placeholder" => "Nombre de caractères maximal")) !!}
{!! Form::reset('Annuler', array("onclick" => "window.location = '" . action('FormulaireController@champs', array('formulaire' => $formulaire->id)) . "'", "class" => "btn btn-sm bg-orange waves-effect m-t-15 pull-right")) !!}
@if(count(getAllLangues()) > 1) @foreach (getAllLangues() as $langue) @if($langue->suffixe != "fre")
{!! Form::reset('Annuler', array("onclick" => "window.location = '" . action('FormulaireController@champs', array('formulaire' => $formulaire->id)) . "'", "class" => "btn btn-sm bg-orange waves-effect pull-right")) !!}

Édition d'une page de contenu

{!! Form::text($langue->suffixe . '_nom', getTranslation("Champ", "nom", $champs ? $champs->id : null, $champs ? $champs->nom : null, $langue->suffixe), array("class" => "form-control", "placeholder" => "Nom du champ")) !!}
{!! Form::text($langue->suffixe . 'class', old('class'), array("class" => "form-control", "placeholder" => "Class du champ")) !!}
{!! Form::select($langue->suffixe . '_type', $types, array("class" => "form-control show-tick")) !!}
{!! Form::checkbox($langue->suffixe . '_label', 1, $champs && $champs->label ? true : true, array("id" => $langue->suffixe . '_label', "class" => "filled-in chk-col-teal")) !!}
{!! Form::checkbox($langue->suffixe . '_placeholder', 1, $champs && $champs->placeholder ? true : false, array("id" => $langue->suffixe . '_placeholder', "class" => "filled-in chk-col-teal")) !!}
{!! Form::textarea($langue->suffixe . '_liste_selection', $champs ? str_replace("|", "\r\n", getTranslation("Champ", "liste_selection", $champs ? $champs->id : null, $champs ? $champs->nom : null, $langue->suffixe)) : "", array("rows" => 3, "class" => "form-control")) !!}
{!! Form::selectRange($langue->suffixe . '_rang', 1, 20, $champs ? $champs->rang : 1, array("class" => "form-control show-tick")) !!}
{!! Form::checkbox($langue->suffixe . '_requis', 1, $champs && $champs->requis ? true : false, array("id" => $langue->suffixe . '_requis', "class" => "filled-in chk-col-teal")) !!}
{!! Form::checkbox($langue->suffixe . '_email', 1, $champs && $champs->email ? true : false, array("id" => $langue->suffixe . '_email', "class" => "filled-in chk-col-teal")) !!}
{!! Form::checkbox($langue->suffixe . '_numerique', 1, $champs && $champs->numerique ? true : false, array("id" => $langue->suffixe . '_numerique', "class" => "filled-in chk-col-teal")) !!}
{!! Form::text($langue->suffixe . '_nb_caractere', $champs ? $champs->nb_caractere : 0, array("class" => "form-control", "placeholder" => "Nombre de caractères maximal")) !!}
{!! Form::reset('Annuler', array("onclick" => "window.location = '" . action('FormulaireController@champs', array('formulaire' => $formulaire->id)) . "'", "class" => "btn btn-sm bg-orange waves-effect m-t-15 pull-right")) !!}
@endif @endforeach @endif

Scripts personnalisés

@foreach($scripts as $script)
scripts->contains($script->id) ? "checked" : "" }} class="filled-in chk-col-teal">
@endforeach
{!! Form::close() !!}
{!! Form::close() !!} @stop