The most jarring thing about using the module is lack of admin_theme when coming from an admin/ page (I'm weird like that).
One solution to that is admin_theme module (contrib) and implement their admin_theme options (but not make admin_theme a depedency for those that don't care).
function form_controller_admin_theme_options($op = 'info', $option = NULL) {
switch ($op) {
case 'info':
$options = array();
$options['form_controller'] = array(
'title' => t('Form controller processing'),
'description' => t('Use the administration theme when using form controller.'),
);
return $options;
case 'check':
switch ($option) {
case 'form_controller':
return arg(0) == 'form_controller';
}
}
}
That is a very basic; with David Ried's patch to add in destination, the destination could be checked to see if was a admin/ area that was calling the form.
I'm happy to make a patch if this is a desirable feature :>.
Comments
Comment #1
dave reidWe should probably just rename the menu callback path to something like admin/form-controller instead.
Comment #2
hefox commentedYeah, I thought about that also; however, some forums wouldn't be in the admin section (like node edit forums depending on settings), so it'd change themes when configuring those; however, it is an an admin type configuration, and some themes don't work so well for configuration.
Comment #3
hefox commentedAnd here is the patch edited in a text editor to have jquery_update as a dependency, if the readme is accurate about it being needed. Might be a throwback to drupal 5 and not needed.
Comment #4
dave reidI think the jquery_update is only needed for D5. There's really not much of a purpose for including it in D6.
Comment #5
hefox commented(Yeah, and oops, wrong post. Had both opened and only 1 hour of sleep :()
Comment #6
mrfelton commented+1 on the admin theme for these pages. They are after all, admin pages. Consistency is good.
Comment #7
hefox commentedChanging url. May have missed something
My form controller has been altered so line numbers may be an issue
One with #642936 already patched, one without.
Comment #8
dave reidSeems valid. Thanks for providing both patches. We should also change the path to 'admin/form-controller' since the standard for Drupal paths is to use dashes and not underscores.
Comment #9
hefox commentedHere's both with hyphen manually added in with a text editor (lazy :( ).
(too bad it'd be damn annoying to rename the module to formcontroller; from what I understand d7 is moving away from underscores due to confusion of hooks).
Comment #10
dave reidMeh, D7 still has field_ui.module, so I wouldn't say it's a standard yet. And most of the module names in core are simple anyway.
Comment #11
hefox commented(Yeah, the person who was mentioned it to me also mentioned that exception; he was probably reading #367355: Module names should not contain an underscore; anyhow is this still needs work?)
Comment #12
sunComment #13
sunThis file no longer exists.
@Dave: In general, we don't use underscores in menu paths. Doesn't apply to path arguments though. So this is a very good change.
I'm on crack. Are you, too?
Comment #14
sunBetter title.
Comment #15
dave reidNew menu path with the module name change is admin/form. Committed the adjustment to CVS: http://drupal.org/cvs?commit=299414