summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2011-01-18 02:46:36 +0000
committerivan <ivan>2011-01-18 02:46:36 +0000
commit8c5326a6dfb96630aad04c9abd7a5895f03b09e1 (patch)
treebae66d08d7ad155ff2df2094edfb4873dc46e54a
parent12585f80aac73d6c5f2ee792f904affdb2cb6829 (diff)
better export labeling for DID import, RT#11219
-rw-r--r--FS/FS/part_export.pm11
-rw-r--r--httemplate/misc/phone_avail-import.html3
2 files changed, 13 insertions, 1 deletions
diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm
index 6f5aedc35..c0d3c54a2 100644
--- a/FS/FS/part_export.pm
+++ b/FS/FS/part_export.pm
@@ -177,6 +177,17 @@ sub check {
$self->SUPER::check;
}
+=item label
+
+Returns a label for this export, "exportname||exportype (machine)".
+
+=cut
+
+sub label {
+ my $self = shift;
+ ($self->exportname || $self->exporttype ). ' ('. $self->machine. ')';
+}
+
#=item part_svc
#
#Returns the service definition (see L<FS::part_svc>) for this export.
diff --git a/httemplate/misc/phone_avail-import.html b/httemplate/misc/phone_avail-import.html
index de280d0f9..c664c0726 100644
--- a/httemplate/misc/phone_avail-import.html
+++ b/httemplate/misc/phone_avail-import.html
@@ -21,7 +21,8 @@ Import a file containing phone numbers (DIDs).
<% include( '/elements/tr-select-table.html',
'table' => 'part_export',
- 'name_col' => 'machine',
+ 'name_col' => 'label',
+ 'order_by' => 'ORDER BY exportname, machine',
'label' => 'Export',
'empty_label' => 'Select export',
'hashref' => { 'exporttype' => 'internal_diddb', },