Index: openacs-4/packages/contacts/www/contact-rels.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact-rels.adp,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/contacts/www/contact-rels.adp 28 May 2005 15:44:06 -0000 1.4
+++ openacs-4/packages/contacts/www/contact-rels.adp 15 Jul 2005 01:39:42 -0000 1.5
@@ -7,7 +7,7 @@
-
+
#contacts.lt_Existing_Relationship#
Index: openacs-4/packages/contacts/www/contact-rels.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact-rels.tcl,v
diff -u -r1.13 -r1.14
--- openacs-4/packages/contacts/www/contact-rels.tcl 6 Jul 2005 23:40:25 -0000 1.13
+++ openacs-4/packages/contacts/www/contact-rels.tcl 15 Jul 2005 01:39:42 -0000 1.14
@@ -59,7 +59,7 @@
}
if { $org_valid_p && $person_valid_p } {
# we do nothing
- set type_clause
+ set type_clause ""
} else {
if { $org_valid_p } {
set type_clause "and parties.party_id in ( select organization_id from organizations )"
@@ -94,7 +94,7 @@
set context {}
set package_url [ad_conn package_url]
-if { [exists_and_not_null query] } {
+if { [exists_and_not_null query] && [exists_and_not_null row_two] } {
set primary_party $party_id
@@ -175,13 +175,19 @@
set rel_options [concat [list [list "[_ contacts.--select_one--]" ""]] $rel_options]
ad_form -name "search" -method "GET" -export {party_id} -form {
- {role_two:text(select) {label "[_ contacts.Add]"} {options $rel_options}}
+ {role_two:text(select),optional {label "[_ contacts.Add]"} {options $rel_options}}
{query:text(text) {label ""} {html {size 24}}}
{search:text(submit) {label "[_ contacts.Search]"}}
} -on_request {
} -edit_request {
} -on_refresh {
} -on_submit {
+ if { ![exists_and_not_null role_two] } {
+ template::element::set_error search role_two "[_ contacts.A_role_is_required]"
+ }
+ if { ![template::form::is_valid search] } {
+ break
+ }
} -after_submit {
}