Skip to content

Instantly share code, notes, and snippets.

@ryanwinchester
Created February 5, 2015 18:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanwinchester/002c3489e69cba4551ac to your computer and use it in GitHub Desktop.
Save ryanwinchester/002c3489e69cba4551ac to your computer and use it in GitHub Desktop.
Blade form includes
@include('Core::partials.viewmodelmessages')
<div class="form-horizontal">
<fieldset>
<legend>Contractor Company Details</legend>
@include('Core::components.textinput',['label' => 'Company Name', 'name' => 'company_name'])
@include('Core::components.textinput',['label' => 'Registration No.', 'name' => 'reg_no'])
@include('Core::components.textinput',['label' => 'Vat Reg.', 'name' => 'vat_reg'])
</fieldset>
<fieldset>
<legend>Contractor Details</legend>
@include('Core::components.textinput',['label' => 'Email', 'name' => 'email'])
@include('Core::components.textinput',['label' => 'Tel No', 'name' => 'tel_no'])
@include('Core::components.textinput',['label' => 'Fax No', 'name' => 'fax_no'])
</fieldset>
<fieldset>
<legend>Contractor Address</legend>
@include('Core::components.textinput',['label' => 'Line1', 'name' => 'line1'])
@include('Core::components.textinput',['label' => 'Line2', 'name' => 'line2'])
@include('Core::components.textinput',['label' => 'City', 'name' => 'city'])
@include('Core::components.textinput',['label' => 'Region', 'name' => 'region'])
@include('Core::components.textinput',['label' => 'Postcode', 'name' => 'postcode'])
</fieldset>
{{-- @include('Core::components.ckeditor',['label' => 'Agenda','name' => 'agenda', 'options' => '{ height: 200 }']) --}}
<div data-bind="validationElement: {{ $property or $name }}"
class="form-group">
<label class="control-label {{ $labelwidth or 'col-lg-6' }}"
for="{{ $name }}">{{ $label or ''}}</label>
<div class="{{ $inputwidth or 'col-lg-12' }}">
<textarea data-bind="ckEditor: {{ $property or $name }}, config: {{ $options or '{}' }}"
class="form-control"
name="{{ $name }}"
id="{{ $name }}"
placeholder="{{ $placehold or ''}}"></textarea>
<p data-bind="validationMessage: {{ $property or $name }}"
class="help-block has-error"></p>
</div>
</div>
{{-- $name (string), $label (string), optional - $property, $placeholder --}}
<div data-bind="validationElement: {{ $property or $name }}"
class="form-group">
<label class="control-label {{ $labelwidth or 'col-lg-6' }}"
for="title">{{ $label or '' }}</label>
<div class="{{ $inputwidth or 'col-lg-12' }}">
<input data-bind="value: {{ $property or $name }}"
id="{{ $name }}"
name="{{ $name }}"
type="text"
class="form-control"
placeholder="{{ $placeholder or '' }}">
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment