1 <% include('elements/edit.html',
2 'name_singular' => 'custom field',
3 'viewall_dir' => 'browse',
4 'table' => 'part_virtual_field',
5 'labels' => { 'vfieldpart' => '',
10 'dbtable_dummy' => 'Table',
13 { field=>'vfieldpart', type=>'hidden', },
14 { field=>'name', type=>'text', },
17 options => [ 'svc_broadband', 'router', 'cust_main', ],
19 { field=>'label', type=>'text', },
20 { field=>'length', type=>'text', },
22 'edit_callback' => $callback,
23 'error_callback' => $callback,
24 'html_init' => 'Please be patient after clicking the button as
25 this process may take more than 10 seconds.
32 my ($cgi, $object, $fields) = (shift, shift, shift);
33 my @edit_fixed_fields = qw( dbtable name length );
34 foreach my $f ( @{$fields} ) {
35 # XXX: editing anything other than label is disabled for now
37 if $object->vfieldpart && grep { $f->{field} eq $_ } @edit_fixed_fields;
42 unless $FS::CurrentUser::CurrentUser->access_right('Configuration');