public function test_takes_select_options_from_the_model()
 {
     // Having
     Form::model(new \App\User());
     // Expect
     $this->assertTemplate('fields/select_model', Field::select('gender'));
 }
Example #2
0
function delete_form($request, $routeParams, $id, $modal, $url, $label = "Delete", $class = "btn btn-danger")
{
    $form = Form::model($request, ['method' => 'DELETE', 'id' => 'formDelete', 'action' => [$routeParams, $id]]);
    $form .= Form::button('<i class="fa fa-trash fa-lg"></i> بلی', ['type' => 'submit', 'data-target' => "#{$modal}", 'data-url' => "{$url}", 'class' => "{$class} delete ", 'id' => 'btnDelete', 'data-id' => $id]);
    $form .= Form::close();
    return $form;
}
 public static function open($model = NULL, $url, $attributes = array())
 {
     $attributes = array_merge(array('url' => $url, 'class' => 'input_form'), $attributes);
     if (is_object($model)) {
         return Form::model($model, $attributes) . '<ul class="form_list">';
     } else {
         return Form::open($attributes) . '<ul class="form_list">';
     }
 }
Example #4
0
 protected function getFormId()
 {
     if ($this->_formId === null) {
         $form = Form::model()->findByAttributes(array('table_name' => $this->getOwner()->tableName()));
         if (is_object($form)) {
             $this->_formId = $form->id;
         } else {
             $this->_formId = 0;
         }
     }
     return $this->_formId;
 }
 /**
  * Laravel's Form::model() method with $secure set to true based on user requesting HTTPS
  *
  * @param  array   $model    example: $user
  * @param  array   $options  form options
  * @param  bool    $secure   override secure option
  * @return string            form html tag with https or http
  */
 public static function formModel($model, $options, $secure = null)
 {
     // Get form
     $formModel = \Form::model($model, $options);
     // Set request secure
     $isSecure = static::requestIsSecure();
     // Unless we specified we wanted secure on/off va true/false
     // set to $isSecure value
     $setHttps = $secure === null ? $isSecure : $secure;
     // Replace http with https
     if ($setHttps) {
         $formModel = str_replace('http://', 'https://', $formModel);
     }
     // Return form
     return $formModel;
 }
Example #6
0
 public function getPropertyInfo()
 {
     static $module, $className;
     if (isset($module, $className)) {
         return array($module, $className);
     }
     $module = '';
     $className = '';
     $criteria = new CDbCriteria();
     $criteria->with = array('contentType');
     $form = Form::model()->findByPk($this->properties_form_id, $criteria);
     if (is_object($form) && is_object($form->contentType)) {
         list($module, $path, $className) = explode('.', $form->contentType->model);
         Yii::import($form->contentType->model);
     }
     return array($module, $className);
 }
Example #7
0
 /**
  * Retorna a instancia do formulario com os campos
  * @param  \Model $Model          Model para insercao no db (ou falso)
  * @param  string  $Action         Acao do formulario
  * @param  array  $FormFields     Campos pra montar o form
  * @param  Nome do controlador  $ControllerName
  * @return string
  */
 public function getForm($Model = false, $Action, $FormFields, $ControllerName)
 {
     $this->Module = $ControllerName;
     $this->Model = $Model;
     if ($Model) {
         $this->Model = $Model;
         // Abre o form com os campos preenchidos
         $data['head'] = \Form::model($Model, array('url' => $Action, 'class' => 'form-horizontal col-md-12'));
     } else {
         // Abre o form padrao
         $data['head'] = \Form::open(array('url' => $Action, 'class' => 'form-horizontal col-md-12'));
     }
     // $data = [];
     foreach ($FormFields as $field_name => $field_config) {
         // Monta o label, adicionando um "*" se o campo for requerido
         // $label = \Form::label($field_config['name'],($this->Module.".{$field_config['name']}.form"));
         $translation = trans($this->Module . ".{$field_config['name']}.form") . (isset($field_config['required']) && $field_config['required'] ? '*' : '');
         if (isset($field_config['trans'])) {
             $translation = $field_config['trans'];
         }
         // Monta a label
         $label = \Form::label($field_config['name'], $translation);
         // Monta o field
         $field = $this->input($field_config);
         // mdd([$label, $field]);
         // Formata o label
         // $label_format = \Html::tag('div', $label->toHtml(), ['class' => 'col-md-3']);
         // Formata o field
         // $field_format = \Html::tag('div', $field->toHtml(), ['class' => 'col-md-9']);
         // Adiciona os items no elemento principal
         // $data[$field_name] = \Html::tag('div', $label_format.$field_format, ['class' => 'form-group col-md-12']);
         $data['fields'][$field_name]['label'] = $label;
         $data['fields'][$field_name]['field'] = $field;
         // mdd($data[$field_name]);
     }
     // Botao de enviar
     $data['submit'] = \Form::submit(trans($this->Module . '.button_save'), ['class' => 'btn btn-success']);
     // Fecha o form
     $data['foot'] = \Form::close();
     // mdd($data);
     return $data;
 }
Example #8
0
 /**
  * Create a new model based form builder.
  * And adding a CSRF Token
  *
  * Based on \Form::model() with default 'id', 'class' and 'method' HTML attributes
  * get with form_id() and dom_class() helpers
  *
  * @param mixed   $model
  * @param array   $options $options There are a few special options:
  * 'url' - open forms that point to named URL. E.G. ['url' => 'foo/bar']
  * 'route' - open forms that point to named routes. E.G. ['route' => 'route.name']
  * 'action' - open forms that point to controller actions. E.G. ['action' => 'Controller@method']
  * 'method' - HTTP verb. Supported verbs are 'post', 'get', 'delete', 'patch', and 'put'. By default it will be 'post'.
  * 'data-remote' - If set to true, will allow the Unobtrusive JavaScript drivers to control the submit behavior. By default this behavior is an ajax submit.
  * 'fallbackPrefix' - By default it will be 'create'.
  * @return string
  */
 function form_for($model, array $options = [])
 {
     $prefix = array_get($options, 'prefix');
     $fallbackPrefix = array_get($options, 'fallbackPrefix', 'create');
     if (!array_get($options, 'id')) {
         $options['id'] = form_id($model, $fallbackPrefix);
     }
     if (!array_get($options, 'class')) {
         $prefix = $prefix ?: $model->exists ? 'edit' : 'create';
         $options['class'] = dom_class($model, $prefix);
     }
     if (!array_get($options, 'route') && !array_get($options, 'url') && !array_get($options, 'action')) {
         $routePrefix = str_plural(dom_class($model));
         $options['route'] = $model->exists ? [$routePrefix . '.update', $model->id] : $routePrefix . '.store';
     }
     if (!array_get($options, 'method')) {
         $options['method'] = $model->exists ? 'patch' : 'post';
     }
     return Form::model($model, $options);
 }
	    @forelse ($comments as $comment)
	    	<div class="blog-comment-item container">
	    		<div class="row">
					<div class="col-md-1">
		    			{{ $comment->id }}
					</div>
					<div class="col-md-7">
						{{ $comment->body }}
					</div>
					<div class="col-md-2">
						{{ $comment->updated_at }}
					</div>
					<div class="col-md-2">
					<?php 
// Create a form containing the action links
echo Form::model($comment, array('method' => 'delete', 'route' => array('comment.destroy', $comment->id)));
echo link_to_route('comment.edit', $title = 'Edit', array('id' => $comment->id), array('class' => 'comment-button btn btn-sm btn-success'));
echo Form::submit('Destroy', array('class' => 'comment-button btn btn-sm btn-danger'));
echo Form::close();
?>
					</div>
				</div>
			</div>
		@empty
			<p>No comments yet.</p>
		@endforelse
	</div>    
    
@endsection

{{-- When the document is ready, initialise blog comment controls --}}
<?php

$__env->startSection('content');
?>
	<legend>Tambah Jurusan</legend>

	<?php 
echo Form::model($kelas, array('url' => route('admin.kelas.update', ['kelas' => $kelas->kd_kelas]), 'method' => 'put'));
?>

		<!--
		<div class="form-group <?php 
if ($errors->has('rombel')) {
    ?>
 has-error <?php 
}
?>
">
			<label for="">Rombel</label>
			<input type="text" name="rombel" value="<?php 
echo e($kelas->kd_kelas);
?>
" class="form-control">
			<?php 
echo e($errors->first('rombel'));
?>

		</div>
		-->

		<div class="form-group <?php 
<!-- resources/views/user/index.blade.php -->

@extends('layouts.index')

@section('title', $title)

{{-- Display a User list for administration purposes --}}
@section('index-content')    

	<h3>Registered Users ({{count($users)}})</h3>    	    
	<div class="blog-user-list">
	    @forelse ($users as $user)
	    	<div class="blog-user-item container">
	    		<div class="row">
					<?php 
echo Form::model($user, array('method' => 'delete', 'route' => array('user.destroy', $user->id)));
?>
 
					
				
					<div class="form-group">
						{!! Form::label('name', $user->name, array('class' => '')) !!}
						{!! Form::label('email', $user->email, array('class' => '')) !!}
					</div>
				
					<div class="form-group">
					    {!! Form::label('updated_at', 'Updated at: '.$user->updated_at)!!}
					</div>
	
					<div class="form-group">
					<?php 
Example #12
0
    <style>
        .buttonDesign{
            margin-left : 2px;
            margin-right : 2px;
        }
    </style>
</html>
<?php 
/* @var $this FieldsController */
/* @var $model FormField */
$this->breadcrumbs = array('Form Fields' => array('index'), 'Manage');
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#form-field-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n");
?>

<?php 
$formRow = Form::model()->findByAttributes(array('FORM_ID' => $form_id));
?>
<h1>Manage Fields of <span style="color:#B40431"><?php 
echo $formRow['FORM_NAME'];
?>
</span></h1>
<?php 
echo CHtml::link('Add Field', array('fields/new', 'form' => $form_id), array('class' => 'btn-inverse btn buttonDesign'));
echo CHtml::link('Add Entry', array('entry/new', 'form' => $form_id), array('class' => 'btn-inverse btn buttonDesign'));
echo CHtml::link($formRow['FORM_NAME'] . ' Details', array('forms/view', 'form' => $form_id), array('class' => 'btn-inverse btn buttonDesign'));
echo CHtml::link('Manage Dynamic Forms', array('forms/index'), array('class' => 'btn-inverse btn buttonDesign'));
echo CHtml::link('Manage Form Entries', array('entry/index', 'form' => $form_id), array('class' => 'btn-inverse btn buttonDesign'));
?>


<br/><br/>
Example #13
0
    </div>

    <div class="row">
        <?php 
echo $form->label($model, 'event_id');
$events = Event::model()->findAll();
?>
        <?php 
echo $form->dropDownList($model, 'event_id', CHtml::listData($events, 'id', 'name'));
?>
    </div>

    <div class="row">
        <?php 
echo $form->label($model, 'form_id');
$forms = Form::model()->findAll();
?>
        <?php 
echo $form->dropDownList($model, 'form_id', CHtml::listData($forms, 'id', 'name'));
?>
    </div>

    <div class="row buttons">
        <?php 
echo CHtml::submitButton('Search');
?>
    </div>

<?php 
$this->endWidget();
?>
Example #14
0
<?php

if ($showStart) {
    ?>
    <?php 
    if ($model) {
        ?>
        <?php 
        echo Form::model($model, $formOptions);
        ?>
    <?php 
    } else {
        ?>
        <?php 
        echo Form::open($formOptions);
        ?>
    <?php 
    }
}
?>

<?php 
if ($showFields) {
    ?>
    <?php 
    foreach ($fields as $field) {
        ?>
        <?php 
        echo $field->render();
        ?>
    <?php 
Example #15
0
Form::macro('labelModel', function ($model, $attributeName) {
    $required = $model->isRequiredAttribute($attributeName);
    return sprintf(Form::label($attributeName, '%s'), attributeName($model, $attributeName) . ($required ? ' <span style="color:red">*</span>' : ''));
});
/**
 * Open a form flexible to update and insert operation of determinate
 * resource
 */
Form::macro('resource', function ($model, $routePrefix, $options = array()) {
    $routeParams = array();
    if (is_array($routePrefix)) {
        $aux = array_shift($routePrefix);
        $routeParams = $routePrefix;
        $routePrefix = $aux;
    }
    return Form::model($model, ['route' => $model->exists ? ["{$routePrefix}.update"] + (['id' => $model->id] + $routeParams) : ["{$routePrefix}.store"] + $routeParams, 'method' => $model->exists ? 'PUT' : 'POST', 'role' => 'form'] + $options);
});
Form::macro('numerical', function ($attributeName, $value, $options) {
    foreach (['js/plugins/input-mask/jquery.inputmask.js', 'js/plugins/input-mask/jquery.inputmask.numeric.extensions.js'] as $file) {
        $jsFilename = moduleAsset('admin', $file);
        if (!in_array($jsFilename, @Asset::$js['footer'] ?: array())) {
            Asset::add($jsFilename);
        }
    }
    $script = "\$('*[data-inputmask]').inputmask();";
    if (!in_array($script, @Asset::$scripts['footer'] ?: array())) {
        Asset::addScript($script);
    }
    $options['data-inputmask'] = "'alias': 'integer'";
    return Form::text($attributeName, $value, $options);
});
Example #16
0
<?php

echo Form::model($encabezado, array('url' => 'backend/estructuras/toggle-publish/' . $encabezado->id, 'class' => 'form-horizontal', 'method' => 'get'));
?>
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Publicar versión</h4>
    </div>
    <div class="modal-body">
        <div class="form-group<?php 
echo $errors->has('desde') ? ' has-error' : '';
?>
">
            <label for="desde" class="control-label col-sm-2 col-xs-4">Desde</label>
            <div class="col-sm-4 col-xs-6">
                <?php 
echo Form::text('desde', $fechasAsignadas ? null : '', array('date-format' => 'd-m-Y', 'class' => 'form-control datepicker'));
?>
            </div>
        </div>
        <script>
            var fechasAsignadas = <?php 
echo json_encode($fechasAsignadas);
?>
        </script>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
        <button type="submit" class="btn btn-primary">Publicar</button>
    </div>
<?php 
<?php

$__env->startSection('content');
?>
	<legend>Tambah Jurusan</legend>

	<?php 
echo Form::model($ruang, array('url' => route('admin.ruang.update', ['ruang' => $ruang->id_ruang]), 'method' => 'put'));
?>

		<div class="form-group <?php 
if ($errors->has('nama')) {
    ?>
 has-error <?php 
}
?>
">
			<label for="">Nama Ruang Ujian</label>
			<input type="text" name="nama" value="<?php 
echo e($ruang->nama_ruang);
?>
" class="form-control">
			<?php 
echo e($errors->first('nama'));
?>

		</div>

		<div class="form-group <?php 
if ($errors->has('kuota')) {
    ?>
            <?php 
foreach ($point as $poin) {
    ?>
            <tr>
                <td><?php 
    echo $poin['name'];
    ?>
</td>
            </tr>
            <?php 
}
?>
        </tbody>
    </table>
<?php 
echo Form::model(new Modules\Hermes\Models\Point());
?>
<h3>Создать</h3>
<?php 
echo Form::label('id', 'Идентификатор:') . Form::text('id', \Input::old('id'));
if ($errors->has('id')) {
    echo '<br />' . $errors->first('id');
}
?>
 <br />
<?php 
echo Form::label('name', 'Название:') . Form::text('name', \Input::old('name'));
if ($errors->has('name')) {
    echo '<br />' . $errors->first('name');
}
?>
Example #19
0
@extends('Admin.master')
@section('content')
	 <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
	<div id="content-container">
	   <div id="page-content">
	   		@if(!empty($errors->all()))
		   		<div class="alert alert-danger">
		   			<ul>
			   			@foreach($errors->all("<li>:message</li>") as $message)
			   				{!!$message!!}
			   			@endforeach
		   			</ul>
		   		</div>
			@endif
			<?php 
echo Form::model($lake, ['files' => true]);
?>
				<input type="hidden" name="_token" value="<?php 
echo csrf_token();
?>
">
				<div class="control-group">
		            <?php 
echo Form::label('name', 'Name', ['class' => 'control-label', 'value' => '{{old("name")}}']);
?>
		            <?php 
echo Form::text('name', $lake->name, ['class' => 'form-control']);
?>
	            </div>
	            <br/>
				<div class="control-group">
$__env->startSection('content');
?>

<h1>Editing "<?php 
echo e($task->name);
?>
"</h1>
<p class="lead">Edit and save this contact below, or <a href="<?php 
echo e(route('tasks.index'));
?>
">go back to all contacts.</a></p>
<hr>


<?php 
echo Form::model($task, ['method' => 'PATCH', 'route' => ['tasks.update', $task->id]]);
?>


<div class="form-group">
    <?php 
echo Form::label('name', 'Name:', ['class' => 'control-label']);
?>

    <?php 
echo Form::text('name', null, ['class' => 'form-control']);
?>

</div>

<div class="form-group">
Example #21
0
 /**
  * Creates a PUT form (for @update resources)
  *
  * @return string
  */
 private function updateForm($route, $extra)
 {
     return \Form::model($extra['model'], array('route' => array($route . '.update', $extra['model']->id), 'method' => 'PUT'));
 }
						{{ $entry->title }}	
					</div>
					<div class="col-md-4">
						{{ $entry->updated_at }}
					</div>
					<div class="col-md-2">
						<span class="badge">TODO Comments</span>
					</div>
				</div>
	    		<div class="row">
					{{ $entry->body }}
	    		</div>
	    		<div class="row">
					<?php 
// Create a form containing the action links
echo Form::model($entry, array('method' => 'delete', 'route' => array('entry.destroy', $entry->id)));
echo link_to_route('entry.edit', $title = 'Edit', array('id' => $entry->id), array('class' => 'entry-button btn btn-sm btn-success'));
echo Form::submit('Destroy', array('class' => 'entry-button btn btn-sm btn-danger'));
echo Form::close();
?>
	    		</div>
			</div>
			
		@empty
		
			<p>No entries yet.</p>
			
		@endforelse
	</div>
    
    
Example #23
0
<?php

/** @var \App\Models\Event $event */
Form::model($event);
//TODO: find a better way to share the model through partials of forms
?>
@extends('event.forms.edit_common')

@section('form_content')
<div class="row">

    <section id="content" class="content col-sm-12 col-md-8 col-lg-9">

        @include('components.form_errors')

        <div class="panel panel-default">
            <div class="panel-heading">
                <h4 class="panel-title"><?php 
echo _('Basic information');
?>
</h4>
            </div>
            <div class="panel-body">
                @include('event.forms._basic_fields', ['fields' => ['title', 'event_type_id']])

                <?php 
echo Form::labelInput('description', _('Description'), 'textarea', null, ['input' => ['rows' => 5]]);
?>

                <?php 
echo Form::labelInput('tagline', _('Tagline'), 'text', null, ['help' => _('Describe it in a few words. This will appear above the description in the event page, and in some other places where we need a smaller piece of text.')]);
            <div class="tools">
                <a href="" class="collapse">
                </a>
                <a href="#portlet-config" data-toggle="modal" class="config">
                </a>
                <a href="" class="reload">
                </a>
                <a href="" class="remove">
                </a>
            </div>
        </div>
        <div class="portlet-body form">
            <div class="form-horizontal" role="form">
                <div class="form-body">
                    <?php 
echo e(Form::model($designation, ['method' => 'PATCH', 'action' => ['Employee\\DesignationsController@update', $designation->id]]));
?>

                    <?php 
echo $__env->make('designations.form', ['submitText' => 'Update'], array_except(get_defined_vars(), array('__data', '__path')))->render();
?>
                    <?php 
echo e(Form::close());
?>

                </div>
            </div>
        </div>
    </div>
<?php 
$__env->stopSection();
            <div class="tools">
                <a href="" class="collapse">
                </a>
                <a href="#portlet-config" data-toggle="modal" class="config">
                </a>
                <a href="" class="reload">
                </a>
                <a href="" class="remove">
                </a>
            </div>
        </div>
        <div class="portlet-body form">
            <div class="form-horizontal" role="form">
                <div class="form-body">
                    <?php 
echo e(Form::model($employee, ['method' => 'PATCH', 'action' => ['Employee\\EmployeesController@update', $employee->id]]));
?>

                    <?php 
echo $__env->make('employees.form', ['submitText' => 'Update'], array_except(get_defined_vars(), array('__data', '__path')))->render();
?>
                    <?php 
echo e(Form::close());
?>

                </div>
            </div>
        </div>
    </div>
<?php 
$__env->stopSection();
?>

            </div>
            <div>
                <a style="margin: 12px; padding: 5px;" class="label label-success pull-right"
                   href="<?php 
echo e(url('/tasks'));
?>
">Back</a>
            </div>
        </div>
        <div class="portlet-body form">
            <div class="form-horizontal" role="form">
                <div class="form-body">
                    <?php 
echo e(Form::model($task, ['method' => 'PATCH', 'action' => ['System\\TasksController@update', $task->id]]));
?>

                    <?php 
echo $__env->make('tasks.form', ['submitText' => 'Update'], array_except(get_defined_vars(), array('__data', '__path')))->render();
?>
                    <?php 
echo e(Form::close());
?>

                </div>
            </div>
        </div>
    </div>
<?php 
$__env->stopSection();
<?php

/** @var bool $signup */
/** @var \App\Models\User $user */
$signup = $signup ?? false;
Form::model($user);
//TODO: find a better way to share form fields
?>

<?php 
echo Form::labelInput('name', _('Name'), 'text', null, ['input' => ['autofocus']]);
?>

<?php 
echo Form::labelInput('email', _('E-mail'), 'email');
?>

<?php 
echo Form::labelInput('username', _('Username'), 'text', null, ['input' => ['data-unset' => 'true', 'prefix' => preg_replace('|https?://|', '', act('user@profile', ['id_slug' => '123']) . '-')], 'help' => _('Use a uniquely identifying name for you. This will also help you to be found in the search. Use only letters, numbers and underlines, from 4 to 30 chars.')]);
?>

<?php 
if ($signup) {
    ?>
    <?php 
    echo Form::labelInput('password', _('Choose a password'), 'password', null, ['help' => _('Use at least 6 chars here. Preferably, with numbers and letters! Bonus points if you include lower-case and upper-case letters, as well as symbols.')]);
    ?>

    <?php 
    echo Form::labelInput('password_confirmation', _('Confirm the password'), 'password', null, ['help' => _('Just to be sure there\'s no typo, could you please repeat that password?')]);
}
<?php

$__env->startSection('content');
?>
	<legend>Tambah Siswa</legend>

	<?php 
echo Form::model($siswa, array('url' => route('admin.siswa.update', ['siswa' => $siswa->nis]), 'method' => 'put'));
?>

		<div class="form-group <?php 
if ($errors->has('peserta')) {
    ?>
 has-error <?php 
}
?>
">
			<label for="">No. Peserta Ujian</label>
			<input type="text" name="peserta" class="form-control" value="<?php 
echo e($siswa->no_peserta);
?>
" readonly="readonly">
			<?php 
echo e($errors->first('peserta'));
?>

		</div>

		<div class="form-group <?php 
if ($errors->has('nis')) {
    ?>
Example #29
0
 </div>
                    <div class="panel-body">
                        @if (count($errors) > 0)
                            <div class="alert alert-danger">
                                <strong>Whoops!</strong> There were some problems with your input.<br><br>
                                <ul>
                                    @foreach ($errors->all() as $error)
                                        <li>{{ $error }}</li>
                                    @endforeach
                                </ul>
                            </div>
                        @endif


                        <?php 
echo Form::model($user, ['method' => 'PATCH', 'action' => ['AdminController@patchUpdate', $user->id], 'class' => 'form-horizontal', 'role' => 'form', 'files' => true]);
?>

                        <?php 
Form::label('title', 'Title', ['class' => 'col-md-4 control-label']);
?>
                        <?php 
Form::text('title', null, ['class' => ' form-control']);
?>

                        <div class="form-group">
                            <?php 
echo Form::label('name', 'Name', ['class' => 'col-md-4 control-label']);
?>

                            <div class="col-md-6">
Example #30
0
                        @foreach ($errors->all() as $error)
                            <li>{{ $error }}</li>
                        @endforeach
                    </ul>
                </div>
            @endif

            @if (Session::has('message'))
                <div class="alert alert-success">{{ Session::get('message') }}</div>
            @endif

            <div class="col-md-12 ">


                <?php 
echo Form::model($struct, ['method' => 'PATCH', 'action' => ['Admin\\MainController@patchUpdateStruct', 'id' => $struct->id]]);
?>

                    <div class="form-group col-md-7">
                        <label for="exampleInputEmail1">Block label</label>
                        {!! Form::text('label',null,['class' => 'form-control','placeholder' => 'Package name'] ) !!}
                    </div>


                    <div class="form-group col-md-7 clearfix">
                        <label for="exampleInputEmail1">Block section id (CSS)</label>
                        {!! Form::text('id_name',null,['class' => 'form-control','placeholder' => 'Package name'] ) !!}
                    </div>

                    <div class="checkbox col-md-7 ">
                        <label>