The site creation form is not a straight forward form.

When there are multiple platforms that can be selected for creation, it will display a set of radio buttons to select the correct platform.
Depending on the platform you select, there will be a selection of installation profiles for that platform.
Depending on the profile you select, there will be a selection of languages that install profile is available in.

Currently I am displaying all the options available (but have not yet added the validation on the form submission to stop you from making invalid choices yet).

This is a very unfriendly way of doing this functionality. We need to be able to select the platform (if selectable), which populates the profiles , which populates the languages.

I'm unsure of the best way to implement this in drupal 5. We might need to settle for single select boxes for these options.
I'd like to try and avoid doing multi-page forms too.

Comments

adrian’s picture

After speaking to Katherine from RCS, it seems we either need to add a dependency to http://drupal.org/project/ahah_forms to easily accomplish this, or we need to port hosting to D6 (which has this functionality included).

Need to look more deeply into what's needed for an upgrade to d6, and just add more validation in place of this.

xiong’s picture

Assigned: Unassigned » xiong

I implemented with AHAH forms, it's functioning in the desired way. Still need to clean up the code.

xiong’s picture

Status: Needs review » Active

Finished, please review and test.

xiong’s picture

Status: Active » Needs review
StatusFileSize
new15.51 KB

forgot to set status as: patch (code needs review) in last post >_< and added dependencies of ahah_forms and dynamic_subform

adrian’s picture

Status: Active » Needs review

This patch is malformed, and doesn't apply.

Could you create it using 'cvs diff -u > patchfile.diff' inside the checkout.

adrian’s picture

Status: Needs review » Needs work
xiong’s picture

Status: Needs work » Needs review
StatusFileSize
new8.04 KB

sorry for not using cvs diff..
here's the new patch with 'cvs diff -u > patchfile.diff'.
please review and test.

adrian’s picture

This works beautifully on the user interface level, except it doesn't seem to be saving the profile or language correctly.

it always uses an empty profile int he node created, and always results in the language being empty.

But s far this is exactly what we need.

adrian’s picture

Status: Needs review » Needs work

The hostmaster.profile also needs the dependencies added.

adrian’s picture

Also realized we need clean_urls enabled for this. which is ok, since we force them to use apache.

anyway, i tested it with clean urls, and still no luck.

xiong’s picture

StatusFileSize
new7.87 KB

the new patch against new checkout form cvs HEAD.
two problems encountered:
* the AHAH is generating the subform twice in an wrong way;
* the AHAH is bypassing the main form validation.

at the same time, will try to just use jquery (not AHAH) to meet the requirement.

xiong’s picture

Status: Needs work » Needs review
StatusFileSize
new6.53 KB

new patch with custom jquey implemented

xiong’s picture

StatusFileSize
new14.41 KB
new131 bytes
new1.54 KB

the jquery file, css file and a default gif image (display when ajax loading) of the new patch, they should go in "hosting/site/" folder

adrian’s picture

Status: Needs review » Needs work

Committed. This needs some clearing up of the interface

Ac, can you take a look at it ?

adrian’s picture

this was working till i broke it

here's the resulting ticket. : http://drupal.org/node/325415

ac’s picture

If you submit the form after selecting a platform (and a profile) but forget to put in the site URL (so there is a drupal error message), then the profiles that are shown for your selected platform revert to the profile for the first platform listed.

adrian’s picture

Status: Needs work » Fixed

This is fixed in HEAD now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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