?> </span> <span class="grid span-4"> <?php echo Form::text($page . '[slug]', Guardian::wayback($page . '.slug', Config::get($page . '.slug'))); ?> </span> </label> <label class="grid-group"> <span class="grid span-2 form-label"><?php echo $speak->manager->title_per_page; ?> </span> <span class="grid span-4"> <?php echo Form::number($page . '[per_page]', Guardian::wayback($page . '.per_page', Config::get($page . '.per_page')), null, array('min' => 1)); ?> </span> </label> </fieldset> <?php } ?> </fieldset> <fieldset> <legend><?php echo $speak->default; ?> </legend> <?php foreach (array('article', 'page') as $page) {
function prefNewspaper($prefs) { global $db; $formOptions = array('action' => 'preferences/prefsNewspaper.php', 'data' => $prefs, 'files' => true, 'title' => 'Newspaper Basics'); $prefForm = new Form($formOptions); $options = array('field' => 'newspaperName', 'label' => "Newspaper Name", 'description' => 'Name of the host newspaper'); $prefForm->text($options); $options = array('field' => 'newspaperAreaCode', 'label' => "Newspaper Area Code", 'description' => 'Default Area Code for the paper'); $prefForm->number($options); $options = array('field' => 'officeStreetAddress', 'label' => "Office Street Address", 'description' => 'Street address of the office facility.'); $prefForm->text($options); $options = array('field' => 'officeStreetCity', 'label' => "Office City", 'description' => 'City of the office facility.'); $prefForm->text($options); $options = array('field' => 'officeStreetState', 'label' => "Office State", 'description' => 'State of the office facility.'); $prefForm->state($options); $options = array('field' => 'officeStreetZip', 'label' => "Office Zip", 'description' => 'Zip code of office facility.'); $prefForm->number($options); $options = array('field' => 'printingStreetAddress', 'label' => "Printing Street Address", 'description' => 'Street address of the printing facility.'); $prefForm->text($options); $options = array('field' => 'printingStreetCity', 'label' => "Printing City", 'description' => 'City of the printing facility.'); $prefForm->text($options); $options = array('field' => 'printingStreetState', 'label' => "Printing State", 'description' => 'State of the printing facility.'); $prefForm->state($options); $options = array('field' => 'printingStreetZip', 'label' => "Printing Zip", 'description' => 'Zip code of printing facility.'); $prefForm->number($options); $options = array('field' => 'defaultState', 'label' => "Default State", 'description' => 'Default State for all jobs/locations.'); $prefForm->state($options); $prefForm->generate(); }
@section('menu-content') <section> {!! Form::open(array('url' => 'menu/postOrder', 'role' => 'form', 'class' => 'form-horizontal')) !!} <div class="form-group"> <?php echo Form::label('name', 'Menu List', array('class' => 'control-label col-sm-2')); ?> @foreach($menuList as $item) <div class="col-sm-offset-2 col-sm-10"> <label style="width: 120px;"><?php echo $item->dish; ?> </label> <?php echo Form::number($item->dish, 0, array('style' => 'width: 50px;', 'min' => '0', 'max' => '5')); ?> </div> @endforeach </div> <div class="form-group"> <?php echo Form::label('olio', 'Olio Piccante', array('class' => 'control-label col-sm-2')); ?> <div class="col-sm-8"> <?php echo Form::checkbox('olio', 'olio_picc'); ?> </div>
<div class="col-sm-9"> <?php echo Form::number('product_count', '', $attributes = array('class' => 'form-control', 'placeholder' => 'Product Count')); ?> <span class="text-red"><?php echo $errors->first('product_count'); ?> </span> </div> </div> <div class="form-group"> <label id="inputSuccess" class="col-sm-3 control-label">Requisition Number<b class="mandetory_star">*</b> </label> <div class="col-sm-9"> <?php echo Form::number('requisition_number', '', $attributes = array('class' => 'form-control', 'placeholder' => 'Requisition Number')); ?> <span class="text-red"><?php echo $errors->first('requisition_number'); ?> </span> </div> </div> <div class="form-group"> <label id="inputSuccess" class="col-sm-3 control-label"> Requisition By <b class="mandetory_star">*</b> </label> <div class="col-sm-9"> <?php echo Form::text('requisition_by', '', $attributes = array('class' => 'form-control', 'placeholder' => 'Requisition By')); ?> <span class="text-red"><?php
public static function phone($field_id, $field_setup) { $field_setup['value'] = preg_replace('#\\+#', '00', $field_setup['value']); return Form::number($field_id, $field_setup); }
{!! Form::hidden('seguir','no', ['id'=>'seguir']) !!} {!! Form::hidden('red_id',$data['red']->id) !!} {!! Form::hidden('toma_id',$data['toma_id'], ['id'=>'toma_id']) !!} <div class="box-body"> @foreach ($data['categorias'] as $categoria) <div class="form-group"> {!! Form::label('nodo['.$categoria->id.']', $categoria->nombre) !!} <?php switch ($categoria->tipo->nombre) { case 'Buleano': echo Form::checkbox('nodo[' . $categoria->id . ']', 1, null, array('class' => 'form-checkbox')); break; case 'Entero': case 'Decimal': case 'Porcentaje': echo Form::number('nodo[' . $categoria->id . ']', null, array('class' => 'form-control')); break; case 'Texto Grande': echo Form::textarea('nodo[' . $categoria->id . ']', null, array('class' => 'form-control')); break; case 'Fecha': echo Form::text('nodo[' . $categoria->id . ']', null, array('class' => 'form-control datepicker')); break; case 'Fecha y Hora': echo Form::text('nodo[' . $categoria->id . ']', null, array('class' => 'form-control datetimepicker')); break; case 'Hora': echo Form::text('nodo[' . $categoria->id . ']', null, array('class' => 'form-control timepicker')); break; case 'PosiciĆ³n': echo Form::text('nodo[' . $categoria->id . '][lat]', null, array('class' => 'form-control nodo-lat'));
<body> <div class="topBorder"> <div class="user_title">Welcome Admin!</div> <div> <?php echo Form::open(array('url' => '/auth/logout')); echo Form::submit('Logout'); echo Form::close(); ?> </div> </div> <div> <div class="user_info">Enter A Rank And Domain To Add To The List</div> <div> <?php echo Form::open(array('url' => '/generateTable/adminAdd')); echo Form::number('rank'); echo Form::text('domain'); ?> </div> <div> <?php echo Form::submit('Add To List'); echo Form::close(); ?> </div> </div> </body> </html>
$b = Form::textarea($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]); } else { if ($type == "email") { $b = Form::email($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]); } else { if ($type == "date") { $b = Form::date($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]); } else { if ($type == "time") { $b = Form::time($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]); } else { if ($type == "url") { $b = Form::url($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]); } else { if ($type == "number") { $b = Form::number($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]); } else { if ($type == "color") { $b = Form::color($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => 'colorpicker']); $b .= Form::text($field, $model->{$field}, ['placeholder' => trans_choice('admin.' . $field, 1), 'id' => $field]); } else { if ($type == "select" && !$multiple) { $b = Form::select($field, $selectArray, $model->{$field}, ['id' => $field]); } else { if ($type == "select" && $multiple) { $field = substr($field, 0, -2); $b = Form::hidden($field, -1); $b .= Form::select($field . '[]', $selectArray, $model->{$field}, ['id' => $field, "multiple" => $multiple]); } else { if ($type == "check") { $b = Form::check($field, true, $model->{$field}, ['id' => $field]);
<? if(Cart::get_total()) : ?> <? foreach(Cart::products() as $product) : ?> <? $total += $product->quantity * $product->price; ?> <tr> <td> <img src="/pokecart/<?= $product->image ?>" width="94" height="94"> </td> <td><?= $product->name ?></td> <td>$<?= $product->price ?></td> <td> <?= Form::open('/pokecart/cart/update/'.$product->id) ?> <?= Form::number('quantity', $product->quantity) ?> <?= Form::submit('Set') ?> <?= Form::close() ?> </td> <td>$<?= $product->quantity * $product->price ?></td> <td> <a href="/pokecart/cart/remove/<?= $product->id ?>" class="btn btn-danger">Remove</a> </td> </tr> <?php endforeach ?> <? else: ?>
/** * Test the compilation of form number * * @group laravel */ public function testFormNumber() { $form1 = Form::input('number', 'foo'); $form2 = Form::number('foo'); $form3 = Form::number('foo', 'foobar'); $form4 = Form::number('foo', null, array('class' => 'span2')); $this->assertEquals('<input type="number" name="foo" id="foo">', $form1); $this->assertEquals($form1, $form2); $this->assertEquals('<input type="number" name="foo" value="foobar" id="foo">', $form3); $this->assertEquals('<input class="span2" type="number" name="foo" id="foo">', $form4); }
<div class="form-group"> <?php echo Form::label('category', 'Category'); ?> <?php echo Form::select('category', ['Water' => 'Water', 'Power' => 'Power', 'Gas' => 'Gas', 'Internet' => 'Internet', 'Misc.' => 'Misc.'], Sticky::get('category'), ['class' => 'form-control']); ?> </div> <div class="form-group"> <?php echo Form::label('cost', 'Cost'); ?> <?php echo Form::number('cost', Sticky::get('cost'), ['class' => 'form-control', 'step' => '0.01']); ?> </div> <div class="form-group"> <div> <?php echo Form::label('file', 'Files'); ?> <?php echo Form::file('file', ['class' => 'form-control']); ?> </div> </div> <div class="form-group">
function page() { global $db, $session; //did we get passed a userid? $user = []; if ($_GET['id']) { //build up a user $userid = intval($_GET['id']); $user = $db->from('users')->where('id', $userid)->fetch_first(); } //build up all the bits we need for dropdowns $departments = $db->select('id,department_name')->from('user_departments')->order_by('department_name')->fetch_as_select_options('department_name'); $positions = $db->select('id,position_name')->from('user_positions')->order_by('position_name')->fetch_as_select_options('position_name'); $permissionGroups = $db->select('id,group_name')->from('core_permission_groups')->order_by('group_name')->fetch_as_select_options('group_name'); $formOptions = array('action' => 'user.php', 'data' => $user, 'files' => true, 'title' => 'User Setup'); $userForm = new Form($formOptions); $userForm->openTab('Basic Information'); $sidebar = array('class' => 'warning', 'title' => 'Be careful!', 'body' => 'Be sure you complete all fields'); $userForm->setSidebar($sidebar); $validation = array('required' => 'true', 'error' => 'First and last names are required'); $options = array('field' => 'firstname', 'label' => "First name", 'description' => '', 'validation' => $validation); $userForm->text($options); $options = array('field' => 'middlename', 'label' => "Middle name", 'description' => '', 'validation' => array()); $userForm->text($options); $validation = array('required' => 'true', 'error' => 'First and last names are required'); $options = array('field' => 'lastname', 'label' => "Last name", 'description' => '', 'validation' => $validation); $userForm->text($options); $validation = array('required' => 'true', 'type' => 'email', 'error' => 'A valid email address is required.'); $options = array('field' => 'email', 'label' => "Email Address", 'description' => '', 'validation' => $validation); $userForm->email($options); $userForm->openFieldSet('Phone numbers'); $options = array('field' => 'business', 'label' => "Office Number", 'description' => 'This is the full number, not just extension'); $userForm->phone($options); $options = array('field' => 'extension', 'label' => "Extension", 'description' => 'This is the full number, not just extension'); $userForm->number($options); $options = array('field' => 'home', 'label' => "Home Number", 'description' => ''); $userForm->phone($options); $options = array('field' => 'cell', 'label' => "Cell Number", 'description' => ''); $userForm->phone($options); $options = array('field' => 'carrier', 'label' => "Cell Carrier", 'description' => '', 'options' => $userForm->arrayToOptions($GLOBALS['carriers'])); $userForm->select($options); $userForm->closeFieldSet(); $userForm->closeTab(); $userForm->openTab('Advanced'); $options = array('field' => 'department_id', 'label' => "Department", 'description' => '', 'options' => $departments); $userForm->select($options); $options = array('field' => 'position_id', 'label' => "Position", 'description' => '', 'options' => $positions); $userForm->select($options); //@TODO need to add field for mugshot -- but that needs to be hooked into a graphics library system $options = array('field' => 'vision_data_sales_id', 'label' => "Vision Data Sales ID", 'description' => ''); $userForm->text($options); $options = array('field' => 'vision_data_sales_name', 'label' => "Vision Data Sales Name", 'description' => ''); $userForm->text($options); $options = array('field' => 'email_password', 'label' => "Email Password", 'description' => '', 'confirm' => false); $userForm->password($options); $options = array('field' => 'network_password', 'label' => "Network Password", 'description' => '', 'confirm' => false); $userForm->password($options); $options = array('field' => 'permission_group', 'label' => "Permission Group", 'description' => '', 'options' => $permissionGroups); $userForm->select($options); $options = array('field' => 'temp_employee', 'label' => "Temp Employee", 'description' => ''); $userForm->checkbox($options); $options = array('field' => 'debug_user', 'label' => "Debug User", 'description' => ''); $userForm->checkbox($options); $options = array('field' => 'super_user', 'label' => "Super User", 'description' => ''); $userForm->checkbox($options); $userForm->closeTab(); $userForm->generate(); }
<div class="col-sm-9"> <?php echo Form::number('product_count', $value = $edit_product_data->Product_Count, $attributes = array('class' => 'form-control', 'placeholder' => 'Product Count')); ?> <span class="text-red"><?php echo $errors->first('product_count'); ?> </span> </div> </div> <div class="form-group"> <label id="inputSuccess" class="col-sm-3 control-label">Order Number<b class="mandetory_star">*</b> </label> <div class="col-sm-9"> <?php echo Form::number('order_number', $value = $edit_product_data->Order_No, $attributes = array('class' => 'form-control', 'placeholder' => 'Order Number')); ?> <span class="text-red"><?php echo $errors->first('order_number'); ?> </span> </div> </div> <div class="form-group"> <label id="inputSuccess" class="col-sm-3 control-label">Supplier<b class="mandetory_star">*</b> </label> <div class="col-sm-9"> <?php $select_supplier_blank = array($edit_product_data->Supplier_ID => ItemConfiguration::getSupplierById($edit_product_data->Supplier_ID)->Supplier_Name); $select_supplier = array(); foreach ($all_supplier as $single_supplier) {
<div class="panel-body"> <?php if (count($requests) < 1) { echo '<a href="#" class="list-group-item"><h4 class="items">no requests!</h4><span class="left items"></span></a>'; } else { //populate foreach ($requests as $request) { $date = $request["created_at"]; // $date = date_format($request["created_at"],"Y/m/d"); echo '<a class="list-group-item"> <p class="left items right-align">Date: ' . $date . ' </p><h4 class="items">Client: ' . $request["client"] . '</h4> <h4 class="items">Drug Name: ' . $request["name"] . '</h4>'; echo Form::open(array("url" => "/request")); echo Form::hidden('id', $request["id"]); echo Form::number("quantity", $request["quantity"], array("min" => 0)); echo '<br><br>' . Form::text("notes", $request["notes"]); echo '<br><br>'; echo Form::submit('approved', ['name' => 'action', 'class' => 'btn btn-info']); echo ' ' . Form::submit('declined', ['name' => 'action', 'class' => 'btn btn-danger']); echo Form::close(); echo '</a> <br>'; } } ?> </div> </div> </div> </div> @stop
<div class="col-sm-9"> <?php echo Form::number('product_count', '', $attributes = array('class' => 'form-control', 'placeholder' => 'Product Count')); ?> <span class="text-red"><?php echo $errors->first('product_count'); ?> </span> </div> </div> <div class="form-group"> <label id="inputSuccess" class="col-sm-3 control-label">Order Number<b class="mandetory_star">*</b> </label> <div class="col-sm-9"> <?php echo Form::number('order_number', '', $attributes = array('class' => 'form-control', 'placeholder' => 'Order Number')); ?> <span class="text-red"><?php echo $errors->first('order_number'); ?> </span> </div> </div> <div class="form-group"> <label id="inputSuccess" class="col-sm-3 control-label">Supplier<b class="mandetory_star">*</b> </label> <div class="col-sm-9"> <?php $select_supplier_blank = array('' => 'Please Select'); $select_supplier = array(); foreach ($all_supplier as $single_supplier) {
<div class="col-sm-9"> <?php echo Form::number('product_count', $value = $edit_product_data->Product_Count, $attributes = array('class' => 'form-control', 'placeholder' => 'Product Count')); ?> <span class="text-red"><?php echo $errors->first('product_count'); ?> </span> </div> </div> <div class="form-group"> <label id="inputSuccess" class="col-sm-3 control-label">Requisition Number<b class="mandetory_star">*</b> </label> <div class="col-sm-9"> <?php echo Form::number('requisition_number', $value = $edit_product_data->Requisition_No, $attributes = array('class' => 'form-control', 'placeholder' => 'Requisition Number')); ?> <span class="text-red"><?php echo $errors->first('requisition_number'); ?> </span> </div> </div> <div class="form-group"> <label id="inputSuccess" class="col-sm-3 control-label"> Requisition By <b class="mandetory_star">*</b> </label> <div class="col-sm-9"> <?php echo Form::text('requisition_by', $value = $edit_product_data->Requisition_By, $attributes = array('class' => 'form-control', 'placeholder' => 'Requisition By')); ?> <span class="text-red"><?php