summaryrefslogtreecommitdiff
path: root/httemplate/edit/elements
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/elements')
-rw-r--r--httemplate/edit/elements/class_Common.html8
-rw-r--r--httemplate/edit/elements/svc_Common.html18
2 files changed, 21 insertions, 5 deletions
diff --git a/httemplate/edit/elements/class_Common.html b/httemplate/edit/elements/class_Common.html
index 0a0916ebc..723227f23 100644
--- a/httemplate/edit/elements/class_Common.html
+++ b/httemplate/edit/elements/class_Common.html
@@ -30,7 +30,13 @@ unless ( $opt{'nocat'} ) {
my $fields = [ 'classname',
(scalar(@category)
- ? { field=>'categorynum', type=>'select-table', 'empty_label'=>'(none)', 'table'=>$category_table, 'name_col'=>'categoryname' }
+ ? { field => 'categorynum',
+ type => 'select-table',
+ table => $category_table,
+ hashref => { 'disabled' => '' },
+ name_col => 'categoryname',
+ empty_label => '(none)',
+ }
: { field=>'categorynum', type=>'hidden' }
),
{ field=>'disabled', type=>'checkbox', value=>'Y', },
diff --git a/httemplate/edit/elements/svc_Common.html b/httemplate/edit/elements/svc_Common.html
index 321c68545..413150858 100644
--- a/httemplate/edit/elements/svc_Common.html
+++ b/httemplate/edit/elements/svc_Common.html
@@ -101,14 +101,17 @@
my $columndef = $part_svc->part_svc_column($f->{'field'});
my $flag = $columndef->columnflag;
- if ( $flag eq 'F' ) {
+
+ if ( $flag eq 'F' ) { #fixed
$f->{'type'} = length($columndef->columnvalue)
? 'fixed'
: 'hidden';
$f->{'value'} = $columndef->columnvalue;
- } elsif ( $flag eq 'A' ) {
+
+ } elsif ( $flag eq 'A' ) { #auto assign from inventory
$f->{'type'} = 'hidden';
- } elsif ( $flag eq 'M' ) {
+
+ } elsif ( $flag eq 'M' ) { #manually assign from inventory
$f->{'type'} = 'select-inventory_item';
$f->{'empty_label'} = 'Select inventory item';
$f->{'extra_sql'} = 'WHERE ( svcnum IS NULL ' .
@@ -116,11 +119,18 @@
')';
$f->{'classnum'} = $columndef->columnvalue;
$f->{'disable_empty'} = $object->svcnum ? 1 : 0;
- } elsif ( $flag eq 'H' ) {
+
+ } elsif ( $flag eq 'H' ) { #hardware
$f->{'type'} = 'select-hardware_type';
$f->{'hashref'} = {
'classnum'=>$columndef->columnvalue
};
+
+ } elsif ( $flag eq 'S' ) { #selectable choice
+ $f->{type} = 'select';
+ $f->{options} = [ split( /\s*,\s*/,
+ $columndef->columnvalue)
+ ];
}
if ( $f->{'type'} eq 'select-svc_pbx'