From 70522d9b28b2f0f7e194b20a72e39295685a8c8e Mon Sep 17 00:00:00 2001 From: taoyu65 Date: Fri, 11 Aug 2017 00:03:52 -0700 Subject: [PATCH] check and complete permission-role function 1. fix the validation does not work for password data type 2. path problem. forgot to use url method 3. complete adding role function. --- .../DataType/BcryptPasswordDataType.php | 7 ++++--- .../views/authority/rolePermission.blade.php | 18 +++++++++++++----- .../authority/permissionCheckBox.blade.php | 10 +++++----- src/resources/views/login.blade.php | 2 +- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/Umi/DataTable/DataType/BcryptPasswordDataType.php b/src/Umi/DataTable/DataType/BcryptPasswordDataType.php index 2374c47..0a00d41 100644 --- a/src/Umi/DataTable/DataType/BcryptPasswordDataType.php +++ b/src/Umi/DataTable/DataType/BcryptPasswordDataType.php @@ -6,16 +6,17 @@ class BcryptPasswordDataType extends DataTypeAbstract { public function regulateDataEditAdd($data, $relatedTable = '', $relatedField = '', $validation = '', $option = []) { - return $this->getHtml($data, $option); + return $this->getHtml($data, $option, $validation); } - private function getHtml($data, $option) + private function getHtml($data, $option, $validation) { $property = $this->getProperty($option); + $validation = $this->getValidation($validation); $url = url('/api/generatePassword'); return << + - diff --git a/src/resources/views/common/authority/permissionCheckBox.blade.php b/src/resources/views/common/authority/permissionCheckBox.blade.php index 18c1ea9..0ce5ee2 100644 --- a/src/resources/views/common/authority/permissionCheckBox.blade.php +++ b/src/resources/views/common/authority/permissionCheckBox.blade.php @@ -33,7 +33,7 @@ @@ -42,7 +42,7 @@ @@ -51,7 +51,7 @@ @@ -60,7 +60,7 @@ @@ -69,7 +69,7 @@ diff --git a/src/resources/views/login.blade.php b/src/resources/views/login.blade.php index 9e35d47..c81d991 100644 --- a/src/resources/views/login.blade.php +++ b/src/resources/views/login.blade.php @@ -5,7 +5,7 @@ UMI admin - login page - +