The first question:
I am following the example from documentation for ad_form function. My code looks like:
ad_page_contract {
Simple add/edit form for d-bug.
} {
dbug_id:integer,optional
}
set user_id [ad_maybe_redirect_for_registration]
set title "Add a D-Bug"
if {[exists_and_not_null dbug_id]} {
set title "Edit a D-Bug"
}
ad_form -name d-bug -form {
dbug_id:key(dbg_dbg_id_sq)
{component:integer
{label "Component"}
}
{sumary:text(textarea)
{label "Title"}
}
{version_found:integer
{label "Ver.Found"}
}
{version_willfix:integer
{label "Ver. Will Fix"}
}
{version_didfix:integer
{label "Ver. Did Fix"}
}
{description:text(textarea)
{label "Summary"}
}
} -select_query {
SELECT *
FROM d_bug
WHERE dbug_id = :d_bug_id
} -new_data {
db_dml do_insert "
INSERT INTO d_bug
VALUES (
:dbug_id,
:component,
:sumary,
:version_found,
:version_willfix,
:version_didfix,
:description
)
"
} -edit_data {
db_dml do_update "
UPDATE d_bug
SET component = :component,
sumary = :sumary,
version_found = :version_found,
version_willfix = :version_willfix,
version_didfix = :version_didfix,
description = :description
WHERE dbug_id = :key"
} -after_submit {
ad_returnredirect "index"
}
While inserting a new bug works ok, when I click on edit, I have this error message:
Not Found
The requested URL was not found on this server.
And this is the link in browser:
http://192.x.x.114:8000/d-bug/d_bug-edit?dbug_id=1
If anyone is willing to give an advice, or need more information, please ask.
My second question is how to use custom default-master.adp for only one package? I assume, that if I adjust default-master.adp, all packages will change, not just my testing package.
Thank you for your time.
DanielD