X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fusage_class.html;h=be01d2e67ce36d4373b8a73bd8a0f7c8317ab4ce;hb=90e15da7354b55cc5461b58ac087096ed47e0240;hp=ef4b1fff40d94cf4f6e30d779928c3b93a2c8969;hpb=ef0d8db38d1ee28a65a7ecdc6e11c7a82c0a741b;p=freeside.git diff --git a/httemplate/edit/usage_class.html b/httemplate/edit/usage_class.html index ef4b1fff4..be01d2e67 100644 --- a/httemplate/edit/usage_class.html +++ b/httemplate/edit/usage_class.html @@ -3,14 +3,26 @@ 'table' => 'usage_class', 'fields' => [ 'classname', - { field=>'disabled', - type=>'checkbox', - value=>'Y', + 'weight', + { field => 'format', + type => $useformat ? 'select' : 'hidden', + ( $useformat + ? ( 'options' => [ keys %labels ], + 'labels' => \%labels, + ) + : () + ), + }, + { field => 'disabled', + type => 'checkbox', + value => 'Y', }, ], 'labels' => { 'classnum' => 'Class number', 'classname' => 'Class name', + 'weight' => 'Weight', + 'format' => 'Format', 'disabled' => 'Disable class', }, 'viewall_dir' => 'browse', @@ -22,4 +34,9 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Configuration'); +my $conf = new FS::Conf; +my $useformat = $conf->exists('usage_class_as_a_section'); + +my %labels = &FS::usage_class::summary_formats_labelhash(); +