Inheritance: extends AdamWathan\BootForms\Facades\BootForm
Exemplo n.º 1
0
 public function actionIndex()
 {
     $model = new SellShopSFM();
     $form = BootForm::createForm($model->getFMConfig(), $model);
     $query = $model->getQuery();
     //获取data提供器
     $dataProvider = new QueryDataProvider($query, array('pagination' => array('pageSize' => 10)));
     $this->render('index', array('form' => $form, 'dataProvider' => $dataProvider));
 }
Exemplo n.º 2
0
<?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();
Exemplo n.º 3
0
<div class="row">
	<div class="col-md-12">
		<div class="jumbotron">
			<h1>Manage Users</h1>

			<?php 
echo BootForm::text('search_user', 'Search User');
?>
			<ul class="list-group" id="found_users">
			</ul>
		</div>
	</div>
</div>

<div class="panel panel-default">
	<!-- Default panel contents -->
	<div class="panel-heading">Admins</div>
	<table class="table table-striped">
		<thead>
			<tr>
				<th></th>
				<th>Name</th>
				<td>Last Login</td>
				<td></td>
			</tr>
		</thead>
		<tbody>
			<?php 
foreach ($users->where('admin', '1') as $admin) {
    //cant demote yourself
    if (Auth::user()->id == $admin->id) {
Exemplo n.º 4
0
<?php

$title = "Modification d'un QCM";
$mustache = new Mustache_Engine();
BootForm::open();
$questions = $qcm->questions->count();
?>

@extends('layouts.default')

@section('title', $title)

@section('content')
    <h2 class="page-header text-center">{{ $title }}</h2>

    {!! BootForm::open() !!}

    <p class="alert alert-info">Les champs marqué d'un astérisque &laquo;<sub
                style="font-size: 16px"><?php 
echo $requiredField;
?>
</sub> &raquo; sont obligatoires.</p>

    <div class="row">
        <div class="col-md-6">
            {!! BootForm::text('Nom du QCM' . $requiredField, 'name')->required()->value($qcm->name) !!}
        </div>
        <div class="col-md-6">
            {!! BootForm::select('Matière associée' . $requiredField, 'subject_id')->options($subjectsList)->required()->select($qcm->subject_id) !!}
        </div>
    </div>
        </tr>
        </thead>
        <tbody>
        {{#answers}}
            <tr>
                <td class="table-qcm__valid">

                    {{^isValid}}
                        <?php 
echo $radio = BootForm::radio('', 'valids_answers[{{questionNumber}}]', '{{index}}')->required()->uncheck();
?>
                    {{/isValid}}

                    {{#isValid}}
                        <?php 
echo $radio = BootForm::radio('', 'valids_answers[{{questionNumber}}]', '{{index}}')->required()->check();
?>
                    {{/isValid}}

                </td>
                <td class="table-qcm__answer">
                    <?php 
echo BootForm::text('', 'answers[{{questionNumber}}][]')->hideLabel()->required()->value('{{answer}}');
?>
                </td>
            </tr>
            {{/answers}}
        </tbody>
    </table>
</fieldset>
    </legend>

    <p>{{ question }}</p>

    <table class="table-qcm table-qcm-view table-responsive">
        <thead>
        <tr>
            <th class="text-center">Bonne réponse<?php 
echo $requiredField;
?>
</th>
            <th>Réponses</th>
        </tr>
        </thead>
        <tbody>
        {{#answers}}
            <tr>
                <td class="table-qcm__valid">
                    <?php 
echo $radio = BootForm::radio('', 'valids_answers[{{questionNumber}}]', '{{index}}')->required()->uncheck();
?>
                </td>
                <td class="table-qcm__answer">
                    {{ answer }}
                </td>
            </tr>
            {{/answers}}
        </tbody>
    </table>
</fieldset>