summaryrefslogtreecommitdiff
path: root/httemplate/edit/part_svc_link.html
blob: 8ea851a4e3ed03204ebce057a50b07e74c1e6182 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<& elements/edit.html,
  'table'         => 'part_svc_link',
  'name_singular' => 'dependency',
  'labels'        => \%labels,
  'fields'        => \@fields,
  'viewall_dir'   => 'browse',
&>
<%init>
die "access denied"
  unless $FS::CurrentUser::CurrentUser->access_right('Configuration');

my @fields = (
  { field       => 'agentnum',
    type        => 'select-agent',
    empty_label => '(global)',
  },
  { field       => 'src_svcpart',
    type        => 'select-part_svc',
    empty_label => 'Select service definition',
  },
  { field       => 'dst_svcpart',
    type        => 'select-part_svc',
    empty_label => 'Select service definition',
  },
  { field       => 'link_type',
    type        => 'select',
    #XXX false laziness w/part_svc_link POD documentation
    options     =>[ qw(
      part_pkg_restrict part_pkg_restrict_soft
      cust_svc_provision_restrict cust_svc_unprovision_restrict
      cust_svc_unprovision_cascade cust_svc_suspend_cascade
    )],
    labels      => {
      part_pkg_restrict => 'In package defintions, require the destination service definition when the source service definition is included',
      part_pkg_restrict_soft => 'In package definitions, suggest the destination service definition when the source service definition is included',
      cust_svc_provision_restrict => 'Require the target service to be provisioned before the source service',
      cust_svc_unprovision_restrict => 'Require the target service to be unprovisioned before the source service',
      cust_svc_unprovision_cascade => 'Automatically unprovision the target service when the source service is unprovisioned',
      cust_svc_suspend_cascade => 'Suspend the target service after the source service',
    },
  },
  { field => 'disabled', type => 'checkbox', value => 'Y' }
);
my %labels = (
  'svclinknum ' => 'Dependency',
  'agentnum'    => 'Agent',
  'src_svcpart' => 'Source service',
  'dst_svcpart' => 'Destination service',
  'link_type'   => 'Dependency type',
  'disabled'    => 'Disabled'
);
</%init>