<% # procedure-form.adp -- an included file for procedure-edit.adp and procedure-add.adp # which shares the form between those two pages # # required arguments - the text for the "submit button" and the action # for the form if { [ns_adp_argc] != 3 } { ns_log error "wrong number of arguments passed to procedure-form.adp. The text for the submit button should be included, as well as the form action to send the data to." ns_adp_abort } ns_adp_bind_args submit_button_text form_action if { ![info exists source] } { set source "" } if ![info exists importance] { set importance "1" } if ![info exists responsible_user_group] { set responsible_user_group "" } if ![info exists procedure_description] { set procedure_description "" } %> <%= [glassroom_form_action "$form_action"] %> <% # keep around the old procedure name if they're going to be editing it if ![info exists old_procedure_name] { ns_puts "[philg_hidden_input old_procedure_name $procedure_name]" } else { ns_puts "[philg_hidden_input old_procedure_name $old_procedure_name]" } %>
Procedure Name: >
Procedure Description:
Responsible User: <% if { ![info exists responsible_user] || [empty_string_p $responsible_user] } { set whom "nobody" } else { set whom [database_to_tcl_string $db "select first_names || ' ' || last_name from users where user_id=$responsible_user"] ns_puts [export_form_vars responsible_user] } ns_puts "$whom" %>
Responsible User Group:
Maximum Time Interval: > (days or fractions of days)
Importance:

<%= [glassroom_submit_button "Add Procedure"] %>