@@ -111,15 +111,13 @@ public function create(int $id): Form
111111
112112 $ form ->addCheckbox ('approvedAfterRegistration ' , 'admin.acl.roles_approved_after_registration ' );
113113
114- // $form->addCheckbox('syncedWithSkautIs', 'admin.acl.roles_synced_with_skaut_is');
115-
116114 $ form ->addCheckbox ('feeFromSubevents ' , 'admin.acl.roles_fee_from_subevents_checkbox ' )
117115 ->addCondition (Form::EQUAL , false )
118116 ->toggle ('fee ' );
119117
120118 $ form ->addText ('fee ' , 'admin.acl.roles_fee ' )
121119 ->setOption ('id ' , 'fee ' )
122- ->addCondition (Form::FILLED )
120+ ->addRule (Form::FILLED , ' admin.acl.roles_fee_empty ' )
123121 ->addRule (Form::INTEGER , 'admin.acl.roles_fee_format ' );
124122
125123 $ form ->addText ('minimumAge ' , 'admin.acl.roles.minimum_age.label ' )
@@ -181,9 +179,8 @@ public function create(int $id): Form
181179 'registerableTo ' => $ this ->role ->getRegisterableTo (),
182180 'capacity ' => $ this ->role ->getCapacity (),
183181 'approvedAfterRegistration ' => $ this ->role ->isApprovedAfterRegistration (),
184- // 'syncedWithSkautIs' => $this->role->isSyncedWithSkautIS(),
185182 'feeFromSubevents ' => $ this ->role ->getFee () === null ,
186- 'fee ' => $ this ->role ->getFee (),
183+ 'fee ' => $ this ->role ->getFee () ?? 0 ,
187184 'minimumAge ' => $ this ->role ->getMinimumAge (),
188185 'permissions ' => $ this ->permissionRepository ->findPermissionsIds ($ this ->role ->getPermissions ()),
189186 'pages ' => $ this ->pageRepository ->findPagesSlugs ($ this ->role ->getPages ()),
@@ -217,7 +214,6 @@ public function processForm(Form $form, stdClass $values): void
217214 $ this ->role ->setRegisterableTo ($ values ->registerableTo );
218215 $ this ->role ->setCapacity ($ capacity );
219216 $ this ->role ->setApprovedAfterRegistration ($ values ->approvedAfterRegistration );
220- // $this->role->setSyncedWithSkautIS($values->syncedWithSkautIs);
221217 $ this ->role ->setMinimumAge ($ values ->minimumAge );
222218 $ this ->role ->setPermissions ($ this ->permissionRepository ->findPermissionsByIds ($ values ->permissions ));
223219 $ this ->role ->setPages ($ this ->pageRepository ->findPagesBySlugs ($ values ->pages ));
0 commit comments