@@ -62,7 +62,7 @@ public function getSiteId()
62
62
*/
63
63
public function setCustomField ()
64
64
{
65
- $ Operation = ClassRegistry::init ('Operation.Operation ' );
65
+ $ Operation = ClassRegistry::init ('Operation.Operation ' );
66
66
67
67
$ siteId = $ this ->getSiteId ();
68
68
$ userGroup = $ Operation ->findUserGroups ();
@@ -75,12 +75,12 @@ public function setCustomField()
75
75
[
76
76
'name ' => __d ('baser ' , '全ユーザーグループ ' ),
77
77
'value ' => 'ALL ' ,
78
- 'class ' => 'radio_user_group_all '
78
+ 'class ' => 'bca-radio__input '
79
79
],
80
80
[
81
81
'name ' => __d ('baser ' , '特定のユーザーグループ ' ),
82
82
'value ' => 0 ,
83
- 'class ' => 'radio_user_group_any '
83
+ 'class ' => 'bca-radio__input '
84
84
]
85
85
]
86
86
];
@@ -92,19 +92,19 @@ public function setCustomField()
92
92
93
93
$ anyUserGroupOption = [];
94
94
foreach ($ userGroup as $ userGroupId => $ array ) {
95
- $ isChecked = (!empty ($ array ['Operation ' ][$ siteId ])) ? 'checked ' : NULL ;
95
+ $ isChecked = (!empty ($ array ['Operation ' ][$ siteId ]) || in_array ( $ array [ ' UserGroup ' ][ ' name ' ], $ adminsName ) && $ allowedAdminAllOperation === TRUE ) ? 'checked ' : NULL ;
96
96
$ isDisabled = (in_array ($ array ['UserGroup ' ]['name ' ], $ adminsName ) && $ allowedAdminAllOperation === TRUE ) ? 'disabled ' : NULL ;
97
97
$ anyUserGroupOption [] = [
98
98
'option ' => [
99
99
'type ' => 'checkbox ' ,
100
+ 'class ' => 'bca-checkbox__input ' ,
100
101
'value ' => 1 ,
102
+ 'label ' => $ array ['UserGroup ' ]['title ' ],
101
103
$ isChecked ,
102
104
$ isDisabled
103
105
],
104
- 'name ' => 'Operation.user_group. ' .$ array ['UserGroup ' ]['id ' ],
105
- 'label ' => $ array ['UserGroup ' ]['title ' ]
106
+ 'name ' => 'Operation.user_group. ' .$ array ['UserGroup ' ]['id ' ]
106
107
];
107
-
108
108
}
109
109
110
110
$ data = [
@@ -114,7 +114,7 @@ public function setCustomField()
114
114
]
115
115
];
116
116
117
- $ this ->BcBaser ->element ('sites/form ' , $ data );
117
+ $ this ->BcBaser ->element ('Operation. sites/input_operation ' , $ data );
118
118
return ;
119
119
} // end function setCustomField
120
120
0 commit comments