Forum OpenACS Development: Re: in HEAD packages/dynamic-types/tcl/form-procs.tcl ...

Collapse
Posted by Jim Lynch on
Dave,

Wouldn't it be the simplest thing to just pass object_type in, so the function which is now defined as:

ad_proc -public dtype::form::edit {
    {-form_name:required}
    {-form_id:required}
} {
    Update dynamic form name
} {
    db_dml update_form {}

    set event(object_type) $object_type
    set event(dform) $form_name
    set event(action) updated
    util::event::fire -event dtype.form event
}

would be altered so it reads like this:

ad_proc -public dtype::form::edit {
    {-form_name:required}
    {-form_id:required}
    {-object_type:required} # just this line
} {
    Update dynamic form name
} {
    db_dml update_form {}

    set event(object_type) $object_type
    set event(dform) $form_name
    set event(action) updated
    util::event::fire -event dtype.form event
}