[freeside-commits] branch FREESIDE_3_BRANCH updated. 4778dab8ae1c8cb6e6c784c9da1e475072479516
Jonathan Prykop
jonathan at 420.am
Wed Feb 11 11:45:07 PST 2015
The branch, FREESIDE_3_BRANCH has been updated
via 4778dab8ae1c8cb6e6c784c9da1e475072479516 (commit)
from 56fabf7ddfea7308bb22e43b79df04dd46a1620f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 4778dab8ae1c8cb6e6c784c9da1e475072479516
Author: Jonathan Prykop <jonathan at freeside.biz>
Date: Mon Feb 2 22:02:53 2015 -0600
RT#27425: Fixed/blank svc_phone domain
diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm
index 0bef7bc..c2003c4 100644
--- a/FS/FS/part_svc.pm
+++ b/FS/FS/part_svc.pm
@@ -698,6 +698,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 46b2311..fba232d 100644
--- a/FS/FS/svc_phone.pm
+++ b/FS/FS/svc_phone.pm
@@ -194,6 +194,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 53cda85..2bb4f5e 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
-----------------------------------------------------------------------
Summary of changes:
FS/FS/part_svc.pm | 2 ++
FS/FS/svc_phone.pm | 1 +
httemplate/edit/elements/part_svc_column.html | 3 ++-
3 files changed, 5 insertions(+), 1 deletion(-)
More information about the freeside-commits
mailing list