You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.6 KiB

<?php
namespace App\Forms;
use Kris\LaravelFormBuilder\Form;
use Kris\LaravelFormBuilder\Field;
class ProjectForm extends Form
{
public function buildForm()
{
$this->add("latitude", Field::HIDDEN);
$this->add("longitude", Field::HIDDEN);
$this->add("name", Field::TEXT, ["label" => "名称", "rules" => "required"]);
$this->add("address", Field::TEXT, ["label" => "地址", "rules" => "required"]);
$this->add("percent_first_party", Field::NUMBER, ["label" => "院方结算百分比"]);
$this->add("logo", Field::TEXT, ["label" => "logo", "attr" => ["data-plugin" => "uploader"]]);
$this->add("banners", Field::TEXT, ["label" => "banner", "attr" => ["data-plugin" => "uploader", "data-multiple-multiple" => 1]]);
$this->add("profile", Field::TEXTAREA, ["label" => "简介"]);
$this->add("auto_checkout_days", Field::NUMBER, [
"label" => "开启自动结单天数",
"default_value" => 0,
"help_block" => [
"text" => "0表示不开启自动结单"
]
]);
$this->add('paramedicLevels', 'collection', [
'type' => 'form',
'label' => "护工等级",
'options' => [
'class' => 'App\Forms\ParamedicLevelForm',
'label' => false
]
]);
$this->add('buttons', 'buttongroup', ["splitted" => true, "buttons" => [
["label" => "保存", "attr" => ["class" => "btn btn-primary mr-1", "type" => "submit"]],
["label" => "返回", "attr" => ["class" => "btn btn-light btn-back", "type" => "button"]]
]]);
}
}