The wizard system itself, while fairly straight forward is still prone to confusing users from time to time, and needlessly so. A simple plugin system with some sane defaults could remedy much of this confusion and unify the approach that we expect to see.

I'm sure a bit of tweaking is definitely needed for these changes, but I think it is a good starting point, and I'm ready for feedback now.

git clone --branch wizard-plugin http://git.drupal.org/sandbox/eclipsegc/1073402.git

http://drupalcode.org/sandbox/eclipsegc/1073402.git/commitdiff?h=4a5b52c...

Comments

jefkin’s picture

There are probably better places to note this, but since I found it here, I'll note it here:

Note, if your server is using an old git, (like mine D:) ...

Replace

git clone --branch wizard-plugin http://git.drupal.org/sandbox/eclipsegc/1073402.git
git clone http://git.drupal.org/sandbox/eclipsegc/1073402.git 1073402
cd 1073402
git checkout 'origin/wizard-plugin'

and then to make a new temporary branch, say for changes ...

git checkout -b 'orgin/wizard-plugin-mine'
jefkin’s picture

Title: Create plugin scaffolding around ctools wizard » Create plugin scaffolding around ctools wizard - patch
StatusFileSize
new13.17 KB

Ok, this extend the functionality of the wizard plugin so that

*if* the plugin defines

$plugin = array (
...
'wizard paged' => TRUE,
...
);

Then the ctools_wizard_process() function will check each of the entries in $plugin['order'], and if a corresponding entry is missing from the $plugin['forms'] it will try to find a file in the same directory as the wizard, if found it will attempt to find a form, -- if found it will add a 'forms' entry for that step. The file should contain the form function as well as validate and submit functions, as needed.

jefkin’s picture

see also the D6 version -> http://drupal.org/node/1271376

tayzlor’s picture

StatusFileSize
new25.1 KB

here's a combined patch which also incorporates #2 rolled against the latest dev

tim.plunkett’s picture

Status: Needs review » Needs work

There's a lot of code here, and I have yet to go through it all, but in the meantime can you reroll it without tabs (use 2 spaces) and without trailing whitespace?

tayzlor’s picture

StatusFileSize
new18.92 KB

new patch with whitespace cleanup.

tayzlor’s picture

StatusFileSize
new18.92 KB

new patch with whitespace cleanup.

tayzlor’s picture

StatusFileSize
new18.92 KB

aargh, dunno why thats double posted... anyway, looks like I missed a file to cleanup... here's a new patch with (hopefully) all files cleaned.

tayzlor’s picture

StatusFileSize
new25.52 KB

....3rd time lucky? git issues :(

japerry’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Drupal 7 is no longer supported, closing.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.