Commit b170e545 by 宁成龙

完善输入体验

parent 8079e15f
...@@ -61,8 +61,8 @@ class EditUserHandle extends Form implements LazyRenderable ...@@ -61,8 +61,8 @@ class EditUserHandle extends Form implements LazyRenderable
$form->width(5)->text('last_name'); $form->width(5)->text('last_name');
}); });
$this->row(function (Row $form) { $this->row(function (Row $form) {
$form->width(5)->text('phone')->required(); $form->width(5)->number('phone')->required();
$form->width(5)->text('email'); $form->width(5)->email('email');
}); });
$this->row(function (Row $form) { $this->row(function (Row $form) {
$form->width(5)->select('account_properties')->options(admin_trans('user.options.account_properties'))->required(); $form->width(5)->select('account_properties')->options(admin_trans('user.options.account_properties'))->required();
......
...@@ -92,13 +92,13 @@ class SaveUserAddressHandle extends Form implements LazyRenderable ...@@ -92,13 +92,13 @@ class SaveUserAddressHandle extends Form implements LazyRenderable
}); });
$this->row(function (Row $row) { $this->row(function (Row $row) {
$row->width(3)->email('email')->required(); $row->width(3)->email('email')->required();
$row->width(3)->text('phone')->required(); $row->width(3)->number('phone')->required();
}); });
$this->row(function (Row $row) { $this->row(function (Row $row) {
$row->width(3)->select('country')->options(Country::getCountryMap())->required(); $row->width(3)->select('country')->options(Country::getCountryMap())->required();
$row->width(3)->text('province')->default(''); $row->width(3)->text('province')->default('');
$row->width(3)->text('city')->required(); $row->width(3)->text('city')->required();
$row->width(2)->text('post_code')->required(); $row->width(2)->number('post_code')->required();
}); });
$this->row(function (Row $row) { $this->row(function (Row $row) {
$row->width(12)->textarea('detail_address')->required(); $row->width(12)->textarea('detail_address')->required();
......
...@@ -64,7 +64,7 @@ class CreateUser extends \Dcat\Admin\Support\LazyRenderable ...@@ -64,7 +64,7 @@ class CreateUser extends \Dcat\Admin\Support\LazyRenderable
->required(); ->required();
$table->width(3)->text('province')->label(trans("user-address.fields.province")); $table->width(3)->text('province')->label(trans("user-address.fields.province"));
$table->width(3)->text('city')->label(trans("user-address.fields.city"))->required(); $table->width(3)->text('city')->label(trans("user-address.fields.city"))->required();
$table->width(2)->text('post_code')->label(trans("user-address.fields.post_code"))->required(); $table->width(2)->number('post_code')->label(trans("user-address.fields.post_code"))->required();
}); });
$table->row(function (Form\Row $table) { $table->row(function (Form\Row $table) {
$table->width(12)->textarea('detail_address')->label(trans("user-address.fields.detail_address"))->required(); $table->width(12)->textarea('detail_address')->label(trans("user-address.fields.detail_address"))->required();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment