Forum OpenACS Development: Re: New Wizard in development

Collapse
Posted by Jun Yamog on
Hi Don,

Here is the only thing I can see to make the existing code that uses the wizard run.  Actually it should have been 100% compatible if it wasn't for the unconventional way of the use of wizard in cms.  It was using the wizard action url as its finish url.  Anyway the modified wizard luckily did have a way for you to set the finish url since we have found this useful in our project.

--- home/nsadmin/servers/openacs-4/packages/cms/www/modules/types/widget-register.tcl    2003-07-02 20:32:18.000000000 +0800
+++ widget-register.tcl    2003-07-12 18:20:48.000000000 +0800
@@ -25,5 +25,6 @@
    2 -label "Edit Widget Params"  -url "widget-register-2"
    3 -label "Preview Widget"      -url "widget-register-3"
}
+wizard set_finish_url "index?id=$content_type"

wizard get_current_step
---

Apply the patch.  Drop in the wizard-procs.tcl and put the wizard-procs-doc.html in a sane place and add a link.

The current modified wizard is still far from perfect.  As I could not 100% port to ad_proc.  I did use ad_proc on all procs.  But template::util::get_opts $args can be eliminated and have the $args parsed in ad_proc.  Also it still uses template::forward, not sure if ad_returnredirect is better.  Its in better shape than before, with 90+% compatibility, added features, better documentation.

On a off topic.  Does the current CMS 4.6.3 run on pg7.3.x?  It seems I have to change some type cast when clicking on the site map and template folder.  Also I can't seem to create new content as the revision_id is not being properly set.  I am not yet submitting a bug, since it might be just a case that my db has some problem or something.