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

dave reid’s picture

We should probably just rename the menu callback path to something like admin/form-controller instead.

hefox’s picture

Yeah, 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.

hefox’s picture

And 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.

dave reid’s picture

I think the jquery_update is only needed for D5. There's really not much of a purpose for including it in D6.

hefox’s picture

(Yeah, and oops, wrong post. Had both opened and only 1 hour of sleep :()

mrfelton’s picture

+1 on the admin theme for these pages. They are after all, admin pages. Consistency is good.

hefox’s picture

Changing 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.

dave reid’s picture

Status: Active » Needs work

Seems 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.

hefox’s picture

Here'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).

dave reid’s picture

Meh, 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.

hefox’s picture

(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?)

sun’s picture

Project: Form controller » Form
Version: 6.x-2.x-dev » 6.x-1.x-dev
sun’s picture

--- form_controller.js	(revision 3134)
+++ form_controller.js	(working copy)

This file no longer exists.

+++ form_controller.module	(working copy)
@@ -19,7 +19,7 @@
-  $items['form_controller'] = array(
+  $items['admin/form-controller'] = array(

@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?

sun’s picture

Title: Admin theme » Use admin/ as path prefix
Category: feature » task

Better title.

dave reid’s picture

Status: Needs work » Fixed

New menu path with the module name change is admin/form. Committed the adjustment to CVS: http://drupal.org/cvs?commit=299414

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.