From: Jonathan Prykop Date: Tue, 3 Feb 2015 04:02:53 +0000 (-0600) Subject: RT#27425: Fixed/blank svc_phone domain X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=2177596bf13e9de77f09c7380d038200bd675f46 RT#27425: Fixed/blank svc_phone domain --- diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm index 2748686cc..f56878acf 100644 --- a/FS/FS/part_svc.pm +++ b/FS/FS/part_svc.pm @@ -697,6 +697,8 @@ some components specified by "select-.*.html", and a bunch more... =item select_label - Used with select_table, this is the field name of labels +=item select_allow_empty - Used with select_table, adds an empty option + =back =cut diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index 06ce94848..71a61ad16 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -196,6 +196,7 @@ sub table_info { select_table => 'svc_domain', select_key => 'svcnum', select_label => 'domain', + select_allow_empty => 1, disable_inventory => 1, }, 'circuit_svcnum' => { label => 'Circuit', diff --git a/httemplate/edit/elements/part_svc_column.html b/httemplate/edit/elements/part_svc_column.html index 53cda859e..2bb4f5e41 100644 --- a/httemplate/edit/elements/part_svc_column.html +++ b/httemplate/edit/elements/part_svc_column.html @@ -140,7 +140,8 @@ that field. 'value_col' => $def->{'select_key'}, 'order_by' => dbdef->table($def->{'select_table'})->primary_key, 'multiple' => $def->{'multiple'}, - 'disable_empty' => 1, + 'disable_empty' => $def->{'select_allow_empty'} ? undef : 1, + 'empty_label' => $def->{'select_allow_empty'} ? ' ' : undef, 'curr_value' => $value, # these can be switched between multiple and singular, # so put the complete curr_value in an attribute