| |
|
1 |
ad_page_contract { |
| |
|
2 |
|
| |
|
3 |
Create the club for an organization. |
| |
|
4 |
|
| |
|
5 |
} { |
| |
|
6 |
{party_id:integer} |
| |
|
7 |
} -validate { |
| |
|
8 |
contact_exists -requires {party_id} { |
| |
|
9 |
if { ![contact::exists_p -party_id $party_id] } { |
| |
|
10 |
ad_complain "[_ contacts.lt_The_contact_specified]" |
| |
|
11 |
} |
| |
|
12 |
} |
| |
|
13 |
} |
| |
|
14 |
|
| |
|
15 |
|
| |
|
16 |
ad_progress_bar_begin -title "[_ contacts.Creating_Club]" -message_1 "[_ contacts.lt_We_are_creating_the_c]" -message_2 "[_ contacts.lt_We_will_continue_auto]" |
| |
|
17 |
|
| |
|
18 |
set group_id [group::get_id -group_name "Customers"] |
| |
|
19 |
callback contact::organization_new_group -organization_id $party_id -group_id $group_id |
| |
|
20 |
|
| |
|
21 |
ad_progress_bar_end -url "/contacts/$party_id" |