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.

27 lines
1.1 KiB

<?php
namespace App\Forms;
use Kris\LaravelFormBuilder\Form;
use Kris\LaravelFormBuilder\Field;
class AlipayAccountForm extends Form
{
public function buildForm()
{
$this->add("id", Field::HIDDEN);
$this->add("name", Field::TEXT, ["label" => "名称", "rules" => "required"]);
$this->add("appid", Field::TEXT, ["label" => "应用ID", "rules" => "required"]);
$this->add("private_key", Field::TEXTAREA, ["label" => "应用私钥", "rules" => "required", "attr" => ["rows" => 4]]);
$this->add("public_key", Field::TEXTAREA, ["label" => "应用公钥", "rules" => "required", "attr" => ["rows" => 4]]);
$this->add("alipay_key", Field::TEXTAREA, ["label" => "支付宝密钥", "rules" => "required", "attr" => ["rows" => 4]]);
$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"]]
]]);
}
}