% # host-form.adp -- an included file for service-edit.adp and service-add.adp which # shares this 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 host-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 # create a set of hosts set select_sql "select host_id, hostname from glassroom_hosts order by hostname" set selection [ns_db select $db $select_sql] set hosts "" lappend hosts [list "" "None"] while { [ns_db getrow $db $selection] } { set_variables_after_query lappend hosts [list $host_id $hostname] } ns_log notice "FNORD $hosts" # make sure these variables exist so we don't generate lots of errors # accessing unknown variables below if { ![info exists web_service_host] } { set web_service_host "" } if { ![info exists rdbms_host] } { set rdbms_host "" } if { ![info exists dns_primary_host] } { set dns_primary_host "" } if { ![info exists dns_secondary_host] } { set dns_secondary_host "" } if { ![info exists disaster_host] } { set disaster_host "" } %> <%=[glassroom_form_action "$form_action" ]%> <% if { [info exists service_name] } { set old_service_name $service_name ns_puts "[export_form_vars service_name old_service_name]\n" } %>
Service Name: | > |
WebService Host: | |
RDBMS Host: | |
DNS Primary Host: | |
DNS Secondary Host: | |
Disaster Host: |
<%=[glassroom_submit_button "$submit_button_text" ]%>