<?php echo BootForm::open(['route' => ['sheets.remove_pilot', 'pilot_id' => $pilot->id, 'id' => $id]]); echo BootForm::hidden('_action', 'remove_pilot'); echo Button::submit()->withValue('OK')->block(); echo BootForm::close();
</h4> <p>Last login: <span data-toggle="tooltip" data-placement="top" title="<?php echo $user->updated_at; ?> "> <?php echo Carbon\Carbon::parse($user->updated_at)->diffForHumans(); ?> </span></p> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default pull-left" data-dismiss="modal">Close</button> <?php if (!$user->admin) { echo BootForm::open(['route' => ['admin.promote_user', 'id' => $user->id]]); echo BootForm::hidden('_action', 'promote_user'); echo Button::submit()->success()->withValue('Promote'); echo BootForm::close(); } else { echo BootForm::open(['route' => ['admin.demote_user', 'id' => $user->id]]); echo BootForm::hidden('_action', 'demote_user'); echo Button::submit()->danger()->withValue('Demote'); echo BootForm::close(); } ?> </div> </div><!-- /.modal-content -->
return Button::link(URL::route($resourceName . '.create'), $buttonValue); } }); // Show "Edit" button for a specific resource HTML::macro('resourceUpdate', function ($resourceName, $resourceItem, $buttonValue) { $resourceItemId = is_object($resourceItem) ? $resourceItem->id : $resourceItem; if (Authority::can('update', $resourceName, $resourceItem)) { return Button::link(URL::route($resourceName . '.edit', array($resourceName => $resourceItemId)), $buttonValue); } }); // Show "Delete" button for a specific resource HTML::macro('resourceDelete', function ($resourceName, $resourceItem, $buttonValue) { $resourceItemId = is_object($resourceItem) ? $resourceItem->id : $resourceItem; if (Authority::can('delete', $resourceName, $resourceItem)) { $output = Form::open(array('route' => array($resourceName . '.destroy', $resourceItemId), 'method' => 'DELETE', 'data-confirm' => 'Are you sure?', 'class' => 'resource-destroy')); $output .= Button::submit($buttonValue, array('title' => 'Delete ' . $resourceName)); $output .= Form::close(); return $output; } }); // Show user avatar with status info HTML::macro('userAvatar', function ($user, $size = 'small', $classes = array()) { if (!is_array($classes)) { $classes = array($classes); } $classes[] = 'avatar'; $classes[] = 'avatar-' . $size; $state = $user->states()->latest()->first(); if (count($state)) { if (isset($state->application_id)) { $classes[] = 'in-game';
/** * Submits data to the button. * * @param null|string $submittedData The data. * @param bool $clearMissing Not used. * * @return SubmitButton The button instance * * @throws Exception\AlreadySubmittedException If the form has already been submitted. */ public function submit($submittedData, $clearMissing = true) { parent::submit($submittedData, $clearMissing); $this->clicked = null !== $submittedData; return $this; }
<?php echo BootForm::open(['route' => ['sheets.mark_as_paid', $site->id]]); echo BootForm::hidden('_action', 'mark_as_paid'); echo BootForm::text('payout', 'Corp Cut', number_format($site->sheet->corp_cut, 2, '.', ''), ['readonly']); echo Button::submit()->withValue('Mark as Paid')->block(); echo BootForm::close();