1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
- namespace App\Admin\Forms;
- use App\Admin\Renderable\DistDistributorTable;
- use App\Admin\Repositories\DistAppearance;
- use Dcat\Admin\Widgets\Form;
- use App\Admin\Repositories\DistAppearanceVariable;
- class AceRight extends Form
- {
- public $distId;
- public $appearanceId;
- public $templateId;
- public function __construct($distId,$appearanceId,$templateId)
- {
- $this->distId = empty($distId) ? 0 : $distId;
- $this->appearanceId = empty($appearanceId) ? 0 : $appearanceId;
- $this->templateId = empty($templateId) ? 0 : $templateId;
- parent::__construct();
- }
- /*
- * 表单设置
- */
- public function form()
- {
- $variableRow = DistAppearanceVariable::getVariableRow($this->distId,$this->appearanceId,$this->templateId);
- if ($variableRow) {
- } else {
- $this->disableSubmitButton();
- }
- $this->disableResetButton();
- }
- // 处理表单提交请求
- public function handle(array $input)
- {
- return $this->response()->success('Processed successfully.')->refresh();
- }
- /**
- * 返回表单数据,如不需要可以删除此方法
- *
- * @return array
- */
- public function default()
- {
- return [];
- }
- }
|