service dependencies: cust_svc_suspend_cascade, RT#33685
[freeside.git] / httemplate / edit / part_svc_link.html
1 <& elements/edit.html,
2   'table'         => 'part_svc_link',
3   'name_singular' => 'dependency',
4   'labels'        => \%labels,
5   'fields'        => \@fields,
6 &>
7 <%init>
8 die "access denied"
9   unless $FS::CurrentUser::CurrentUser->access_right('Configuration');
10
11 my @fields = (
12   { field       => 'agentnum',
13     type        => 'select-agent',
14     empty_label => '(global)',
15   },
16   { field       => 'src_svcpart',
17     type        => 'select-part_svc',
18     empty_label => 'Select service definition',
19   },
20   { field       => 'dst_svcpart',
21     type        => 'select-part_svc',
22     empty_label => 'Select service definition',
23   },
24   { field       => 'link_type',
25     type        => 'select',
26     #XXX false laziness w/part_svc_link POD documentation
27     options     =>[ qw(
28       part_pkg_restrict part_pkg_restrict_soft
29       cust_svc_provision_restrict cust_svc_unprovision_restrict
30       cust_svc_unprovision_cascade cust_svc_suspend_cascade
31     )],
32     labels      => {
33       part_pkg_restrict => 'In package defintions, require the destination service definition when the source service definition is included',
34       part_pkg_restrict_soft => 'In package definitions, suggest the destination service definition when the source service definition is included',
35       cust_svc_provision_restrict => 'Require the target service to be provisioned before the source service',
36       cust_svc_unprovision_restrict => 'Require the target service to be unprovisioned before the source service',
37       cust_svc_unprovision_cascade => 'Automatically unprovision the target service when the source service is unprovisioned',
38       cust_svc_suspend_cascade => 'Suspend the target service after the source service',
39     },
40   },
41   { field => 'disabled', type => 'checkbox', value => 'Y' }
42 );
43 my %labels = (
44   'svclinknum ' => '',
45   'agentnum'    => 'Agent',
46   'src_svcpart' => 'Source service',
47   'dst_svcpart' => 'Destination service',
48   'link_type'   => 'Dependency type',
49   'disabled'    => 'Disabled'
50 );
51 </%init>