All pastes #31116 Raw Edit

Someone

public text v1 · immutable
#31116 ·published 2005-11-25 05:06 UTC
rendered paste body
The basic idea is to have a subtab under edit for each fieldset of node form. So we copy the node_form() function into a foo_menu(), collect the node form, define menu items for fieldsets.  No callback, so still the node module handles these pages. In hook_form_alter, we change everything but buttons and the current fieldset and its siblings to #value. 


Screen descriptions:

there will be three basic screens in the admin section of this mod:

1. node type screen:  this will live in either admin->settings->node remix or admin->settings->content types->node remix.  the screen will be exactly the same as the one found at admin->settings->content types.  i'd like to just add a link to the content types table in that last path, as it would be cleaner UI, but i don't think that's possible ATM.  purpose of the screen is as a selector for which node type you'll be doing the remix settings for.  after you click on a node type, you'll get a screen w/ two tabs: 'remix' and 'configure defaults'.

2. remix tab: this page is a table, each row consisting of the following:

-a set of two radio buttons for the admin to select which edit tab the form field will go under
-a textbox where the admin can enter a weight value to move the field up and down in the order of the tab

this page will have the same kind of flavor and functionality as the block config page

3. configure defaults: at the top of this screen will be a small section where you can set the names of your two remix edit tabs (defaults will be 'content' and 'settings').  this page simply lists all form fields for the specified node type which are a required field.  it will display the form element and require the user to fill in a value to be used as the default, and just below each form element there will also be a checkbox 'display default upon new node creation'.  it's also possible that the contents of this screen could be put in section 2 in a collapsible form group.  this may be the best option if it makes saving the data easier.