public function init($values, $rows, $arguments = []) { $oldInput = \Request::old(); if (!count($oldInput)) { $this->values = $values; } else { $this->values = $oldInput; } $this->rowsAttrs = $rows; $this->arguments = $arguments; $this->setRows(); }
private function registerFormTextField() { FormBuilder::macro('textField', function ($type, $name, $errors, $label, $labelOptions = array(), $inputOptions = array(), $inputClass) { $valeur = \Request::old($name) ? \Request::old($name) : null; $inputOptions['class'] = 'form-control'; return sprintf(' <div class="form-group"> %s <div class="' . $inputClass . '"> %s </div> </div>', FormBuilder::label($name, $label, $labelOptions), $type == 'email' ? FormBuilder::email($name, $valeur, $inputOptions) : FormBuilder::text($name, $valeur, $inputOptions), $errors->first($name, '<small class="help-block">:message</small>')); }); }
?> <div class="row"> <div class="col-md-4 col-md-offset-4"> <form method="POST" action="<?php echo e(route('sentinel.groups.update', $group->hash)); ?> " accept-charset="UTF-8"> <h2>Edit Group</h2> <div class="form-group <?php echo e($errors->has('name') ? 'has-error' : ''); ?> "> <input class="form-control" placeholder="Name" name="name" value="<?php echo e(Request::old('name') ? Request::old('name') : $group->name); ?> " type="text"> <?php echo e($errors->has('name') ? $errors->first('name') : ''); ?> </div> <label for="Permissions">Permissions</label> <div class="form-group"> <?php $defaultPermissions = config('sentinel.default_permissions', []); ?> <?php foreach ($defaultPermissions as $permission) {
?> <div class="row"> <div class="col-md-4 col-md-offset-4"> <form method="POST" action="<?php echo e(route('sentinel.session.store')); ?> " accept-charset="UTF-8"> <h2 class="form-signin-heading">Sign In</h2> <div class="form-group <?php echo e($errors->has('email') ? 'has-error' : ''); ?> "> <input class="form-control" placeholder="Email" autofocus="autofocus" name="email" type="text" value="<?php echo e(Request::old('email')); ?> "> <?php echo e($errors->has('email') ? $errors->first('email') : ''); ?> </div> <div class="form-group <?php echo e($errors->has('password') ? 'has-error' : ''); ?> "> <input class="form-control" placeholder="Password" name="password" value="" type="password"> <?php echo e($errors->has('password') ? $errors->first('password') : '');
?> <div class="row"> <div class="col-md-4 col-md-offset-4"> <form method="POST" action="<?php echo e(route('sentinel.reset.request')); ?> " accept-charset="UTF-8"> <h2>Forgot your Password?</h2> <div class="form-group <?php echo e($errors->has('email') ? 'has-error' : ''); ?> "> <input class="form-control" placeholder="E-mail" autofocus="autofocus" name="email" type="text" value="<?php echo e(Request::old('name')); ?> "> <?php echo e($errors->has('email') ? $errors->first('email') : ''); ?> </div> <input name="_token" value="<?php echo e(csrf_token()); ?> " type="hidden"> <input class="btn btn-primary" value="Send Instructions" type="submit"> </form>
<div class='form-group'> <label class='col-md-2 control-label' for='name'>E-mail на потребителя</label> <div class='col-md-5'> <input class='form-control' name='email' id="email" disabled='disabled' type='email' value="{{ (Request::old('email')) ? Request::old('email') : $user->email}}"> <input name='email' type='hidden' value="{{ (Request::old('email')) ? Request::old('email') : $user->email}}"> </div> </div> <div class='form-group'> <label class='col-md-2 control-label' for='class'>Роля</label> <div class='col-md-5'> <select class="form-control" name='role' id="role"> @foreach ($roles as $key => $role) <?php $selected = ''; if (Request::old('role')) { if (Request::old('role') == $role->id) { $selected = 'selected="selected"'; } } else { if ($user->role->id == $role->id) { $selected = 'selected="selected"'; } } ?> <option {{ $selected }} value='{{ $role->id }}'>{{ $role->display_name }}</option> @endforeach </select> </div> </div> <div class='form-actions form-actions-padding-sm'> <div class='row'>
<label for="Permissions">Permissions</label> <div class="form-group"> <?php $defaultPermissions = config('sentinel.default_permissions', []); ?> <?php foreach ($defaultPermissions as $permission) { ?> <label class="checkbox-inline"> <input name="permissions[<?php echo e($permission); ?> ]" value="1" type="checkbox" <?php if (Request::old('permissions[' . $permission . ']')) { ?> checked <?php } ?> > <?php echo e(ucwords($permission)); ?> </label> <?php } ?> </div>
echo 'checked="checked"'; } ?> >Male </label> <label> <input type="radio" name="gender" value="Female" required <?php if (Request::old('gender') == "Female") { echo 'checked="checked"'; } ?> >Female </label> <label> <input type="radio" name="gender" value="Other" required <?php if (Request::old('gender') == "other") { echo 'checked="checked"'; } ?> >Others </label> </div> </div> <div class="form-group"> <label class="allLabel">About Dr.</label> <textarea type="text" name="about_dr" class="form-control" >{{Request::old('about_dr')}}</textarea> </div> <div class="form-group"> <button type="submit" class="btn btn-primary">Submit</button> </div> </form>
?> > HBS Ag(Normal) </div> <div class="form-group"> <input type="hidden" name="ct_scan" value="0"> <input type="checkbox" name="ct_scan" value="1000" <?php if (Request::old('ct_scan') == "1000") { echo 'checked="checked"'; } ?> > CT Scan </div> <div class="form-group"> <input type="hidden" name="stool" value="0"> <input type="checkbox" name="stool" value="450" <?php if (Request::old('stool') == "450") { echo 'checked="checked"'; } ?> > Stool Test </div> </div> </div> <div class="col-md-8 pl0 pr0"> <div class="form-group"> <label class="allLabel">Commision(%)</label> <input type="number" name="commision" class="form-control" value="{{Request::old('commision')}}"> </div> </div> <div class="col-md-8 pl0 pr0"> <div class="form-group">
]) !!} <div class='form-group'> <label class='col-md-2 control-label' for='name'>Името на предмета</label> <div class='col-md-5'> <input class='form-control' name='name' id="name" placeholder='Името на предмета' type='text' value="{{ (Request::old('name')) ? Request::old('name') : $data['name']}}"> </div> </div> <div class='form-group'> <label class='col-md-2 control-label' for='class'>Клас</label> <div class='col-md-5'> <select class="form-control" name='class' id="class"> @for ($i = 5; $i < 13; $i++) <?php $selected = ''; if (Request::old('class')) { if (Request::old('class') == $i) { $selected = 'selected="selected"'; } } else { if ($data->class == $i) { $selected = 'selected="selected"'; } } ?> <option {{ $selected }} value='{{ $i }}'>{{ $i }}. Клас</option> @endfor </select> </div> </div> <div class='form-actions form-actions-padding-sm'> <div class='row'>
$response .= ' class="form-group clearfix"> '; } if (isset($data["label"])) { $response .= '<label class="col-sm-2 control-label">' . $data["label"] . '</label>'; } $response .= '<div class="col-sm-6"><input '; if (!isset($data['type'])) { $data['type'] = 'text'; } foreach ($data as $key => $value) { if (isset($data[$key])) { $response .= $key . '= "' . $value . '" '; } } if (Request::old($data['name']) && $data['name'] != "confirm_password") { $response .= 'value="' . Request::old($data['name']) . '"'; } $response .= ' class="form-control">'; if ($errors && $errors->has($data['name'])) { $response .= '<ul class="parsley-error-list" style="text-align:left"> <li style="display: list-item; text-align: left" class="required">'; $response .= $errors->first($data['name']); $response .= '</li></ul>'; } $response .= '</div></div>'; return $response; }); Form::macro('bselect', function ($data) { $response = '<div '; $errors = Session::get('errors'); // if( $errors ){
if (in_array($type, array('date', 'dateTime'))) { $originalValue = $object->formatDate($originalValue, $field->dateFormat); if ($type == 'date') { $options['class'] .= ' datePicker '; } else { if ($type == 'dateTime') { $options['class'] .= ' dateTimePicker '; } } echo Form::text($field->property, \Request::old($field->property) ? \Request::old($field->property) : $originalValue, $options); // ----------- OTHER FIELDS ------------ } else { if ($field->type == "textarea" && $field->options && $field->options->class && strpos($field->options->class, "autosize") !== false && !$field->options->rows) { $options['rows'] = 2; } echo Form::$type($field->property, \Request::old($field->property) ? \Request::old($field->property) : $originalValue, $options); } } } } } } if ($showEditIcon) { echo '<i class="fa fa-pencil inputEdit"></i>'; } if ($field->subTab) { if ($field->subTab->endSubTab) { echo "</div>"; } if ($field->subTab->endSubTabGroup) { echo "\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
public function displayFilter() { return Form::text($this->name, \Request::old($this->name), $this->attributes); }
/** * @return mixed */ public function displayFilter() { $this->value = \Request::old($this->name); return $this->output(); }
</div> <div class="form-group {{ $errors->first('price')? 'has-error':'' }}"> {!! Form::label('price', 'Expense price') !!} <span class="text-danger">*</span> {!! Form::text('price',Input::old('price',$arrExpenseList['price']), array("class"=>"form-control", "placeholder"=>"Expense price")) !!} {!! $errors->first('price', '<span class="text-danger">:message</span>') !!} </div> <div class="form-group {{ $errors->first('payed_by')? 'has-error':'' }}"> {!! Form::label('payed_by', 'Expense payed by') !!} <span class="text-danger">*</span> {!! Form::select('payed_by', $users, Input::old('payed_by',$arrExpenseList['payed_by']),array("class"=>"form-control")) !!} {!! $errors->first('payed_by', '<span class="text-danger">:message</span>') !!} </div> <div class="form-group {{ $errors->first('shared_by')? 'has-error':'' }}"> {!! Form::label('shared_by', 'Shared by') !!} <span class="text-danger">*</span> <?php if (!empty(Request::old('shared_by'))) { $arrExpenseList['shared_by'] = Request::old('shared_by'); } ?> @foreach ($users as $k => $u) <br>{!! Form::checkbox('shared_by[]', $k, ((!empty($arrExpenseList['shared_by']) and in_array($k, $arrExpenseList['shared_by']))?'checked':'')) !!} {{ ucfirst($u) }} @endforeach <br> {!! $errors->first('shared_by', '<span class="text-danger">:message</span>') !!} </div> <div class="form-group"> <button type="submit" class="btn btn-primary">{{ ($strAction=='add_expense')?'Add Expense':'Update Expense' }}</button> </div> {!! Form::close() !!} </div> <div class="col-md-6"></div>
} } ?> <option {{ $selected }} value="{{ $partition->id }}">{{ $partition->name }}</option> @endforeach </select> </div> </div> <?php $i = 0; ?> @foreach($answers as $answer) <?php $checked = ''; if (Request::old('correct') != NULL) { if (Request::old('correct') == $i) { $checked = 'checked="checked"'; } } else { if ($answer->correct == 1) { $checked = 'checked="checked"'; } } ?> <div class='form-group'> @if($i <= 0) <label class='col-md-2 control-label' for='class'>Отговори</label> <div class='col-md-5'> @else
} ?> <option {{ $selected }} value='{{ $i }}'>{{ $i }}. Клас</option> @endfor </select> </div> </div> <div class='form-group'> <label class='col-md-2 control-label' for='name'>Името на предмета</label> <div class='col-md-5'> <select class="form-control" name='subject_id' id="subject_id" placeholder='Името на предмета'> @foreach ($subjects as $subject) <?php $selected = ''; if (Request::old('subject_id')) { if (Request::old('subject_id') == $subject->id) { $selected = 'selected="selected"'; } } else { if ($partition->subject_id == $subject->id) { $selected = 'selected="selected"'; } } ?> <option {{ $selected }} value='{{$subject->id}}'>{{ $subject->name }}</option> @endforeach </select> </div> </div> <div class='form-actions form-actions-padding-sm'> <div class='row'>
</div> <div class='form-group'> <label class='col-md-2 control-label' for='description'>Описание</label> <div class='col-md-5'> <textarea class="form-control" id="description" name="description" placeholder="Описание" rows="3">{{ (Request::old('description')) ? Request::old('description') : $role->description}}</textarea> </div> </div> <div class='form-group'> <label class='col-md-2 control-label' for='description'>Права</label> <div class='col-md-5'> <select class="form-control" name="permissions[]" id="permsSelect" multiple="multiple"> @foreach ($permissions as $permission) <?php $selected = ''; if (Request::old('permissions')) { if (Request::old('permissions') == $permission->id) { $selected = 'selected="selected"'; } } else { foreach ($rolePerms as $rolePerm) { if ($rolePerm->id == $permission->id) { $selected = 'selected="selected"'; } } } ?> <option {{ $selected }} value='{{$permission->id}}'>{{ $permission->display_name }}</option> @endforeach </select> </div> </div>
echo e($field); ?> "> <label for="<?php echo e($field); ?> " class="col-sm-2 control-label"><?php echo e(ucwords(str_replace('_', ' ', $field))); ?> </label> <div class="col-sm-10"> <input class="form-control" name="<?php echo e($field); ?> " type="text" value="<?php echo e(Request::old($field) ? Request::old($field) : $user->{$field}); ?> "> <?php echo e($errors->has($field) ? $errors->first($field) : ''); ?> </div> </div> <?php } ?> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <input class="btn btn-primary" value="Submit Changes" type="submit">
} break; default: return abort(500, 'Unsupported import type'); } return view("contactmoment.imported"); }); Route::get('/contactmoment/{contactmoment}', function (\App\Contactmoment $contactmoment) { // $code = request('code'); // $googleService = \OAuth::consumer('Google'); // if ($code === null) { // return redirect((string) $googleService->getAuthorizationUri() . "&hd=avans.nl"); // } // $token = $googleService->requestAccessToken($code); // $result = json_decode($googleService->request('https://www.googleapis.com/oauth2/v1/userinfo'), true); $result = \Request::old('result'); if ($result !== null) { switch ($result[0]) { case 'activiteit.created': $path = explode('.', $result[1]['referencing_property']); if (substr_compare($path[0], 'thema', 0) === 0) { list($themaQualifier, $referencedIndex) = explode('#', $path[0]); foreach ($contactmoment->les->themas as $index => $thema) { if ($index === (int) $referencedIndex) { $thema->{$path[1]} = $result[1]['value']; $thema->save(); } } } elseif ($path[0] === 'les') { // expect les $contactmoment->les->{$path[1]} = $result[1]['value'];
?> <div class="row"> <div class="col-sm-6"> <label for="srckeys">@lang($package . '::messages.srckeys'):</label><?php echo ifEditTrans($package . '::messages.srckeys-placeholder'); ?> <?php echo Form::textarea('srckeys', Request::old('srckeys'), ['id' => 'srckeys', 'class' => "form-control", 'rows' => "4", 'style' => "resize: vertical", 'placeholder' => noEditTrans($package . '::messages.srckeys-placeholder')]); ?> </div> <div class="col-sm-6"> <label for="dstkeys">@lang($package . '::messages.dstkeys'):</label><?php echo ifEditTrans($package . '::messages.dstkeys-placeholder'); ?> <?php echo Form::textarea('dstkeys', Request::old('dstkeys'), ['id' => 'dstkeys', 'class' => "form-control", 'rows' => "4", 'style' => "resize: vertical", 'placeholder' => noEditTrans($package . '::messages.dstkeys-placeholder')]); ?> </div> </div> <div style="min-height: 10px"></div> <script> var currentGroup = '{{$group}}'; function clearDstKeys(event) { event.preventDefault(); $("#form-keyops").first().find("textarea[name='dstkeys']")[0].value = ""; } function clearSrcKeys(event) { event.preventDefault(); $("#form-keyops").first().find("textarea[name='srckeys']")[0].value = ""; } function postPreviewKeys(event) {