summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Prykop <jonathan@freeside.biz>2015-02-02 22:02:53 -0600
committerJonathan Prykop <jonathan@freeside.biz>2015-02-02 22:02:53 -0600
commit2177596bf13e9de77f09c7380d038200bd675f46 (patch)
tree426ec7d3b31441d306ce7df6bebd255a90b91c46
parent5b884dd940f7dce415ba77dcbc2ab6840f0b5673 (diff)
RT#27425: Fixed/blank svc_phone domain
-rw-r--r--FS/FS/part_svc.pm2
-rw-r--r--FS/FS/svc_phone.pm1
-rw-r--r--httemplate/edit/elements/part_svc_column.html3
3 files changed, 5 insertions, 1 deletions
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