@@ -165,7 +165,17 @@ class Form {
165165 private function generate_verbose_name (): string {
166166 # Separate the class name's words with spaces, allow consecutive capital characters like 'DNS'
167167 $ form_name = $ this ->get_class_shortname ();
168- return preg_replace ('/(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/ ' , ': ' , $ form_name );
168+ $ verbose_name = preg_replace ('/(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z][a-z])/ ' , ' ' , $ form_name );
169+
170+ # Add a colon after the first word if the class name is more than one word
171+ if (str_contains ($ verbose_name , ' ' )) {
172+ $ verbose_name = explode (' ' , $ verbose_name );
173+ $ verbose_name [0 ] .= ': ' ;
174+ $ verbose_name = implode (' ' , $ verbose_name );
175+ }
176+
177+ # Return the verbose name with the 'Form' suffix removed
178+ return str_replace (' Form ' , '' , $ verbose_name );
169179 }
170180
171181 /**
@@ -513,6 +523,7 @@ class Form {
513523 $ this ->get_priv_name () => [
514524 'name ' => 'WebCfg - ' . $ this ->verbose_name ,
515525 'descr ' => "Allow access to the $ this ->url page. " ,
526+ 'match ' => [substr ($ this ->url , 1 )],
516527 ],
517528 ];
518529 }
0 commit comments