projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fcdbe29
)
disable fcc 477 deployment zones, RT#85668
author
Ivan Kohler
<ivan@freeside.biz>
Thu, 18 Mar 2021 02:28:00 +0000
(19:28 -0700)
committer
Ivan Kohler
<ivan@freeside.biz>
Thu, 18 Mar 2021 02:28:00 +0000
(19:28 -0700)
FS/FS/Schema.pm
patch
|
blob
|
history
FS/FS/deploy_zone.pm
patch
|
blob
|
history
httemplate/browse/deploy_zone.html
patch
|
blob
|
history
httemplate/edit/deploy_zone-fixed.html
patch
|
blob
|
history
diff --git
a/FS/FS/Schema.pm
b/FS/FS/Schema.pm
index
569401b
..
4ebda4e
100644
(file)
--- a/
FS/FS/Schema.pm
+++ b/
FS/FS/Schema.pm
@@
-7450,6
+7450,7
@@
sub tables_hashref {
'is_business', 'char', 'NULL', 1, '', '',
'active_date', @date_type, '', '',
'expire_date', @date_type, '', '',
'is_business', 'char', 'NULL', 1, '', '',
'active_date', @date_type, '', '',
'expire_date', @date_type, '', '',
+ 'disabled', 'char', 'NULL', 1, '', '',
],
'primary_key' => 'zonenum',
'unique' => [],
],
'primary_key' => 'zonenum',
'unique' => [],
diff --git
a/FS/FS/deploy_zone.pm
b/FS/FS/deploy_zone.pm
index
306b4fb
..
723b491
100644
(file)
--- a/
FS/FS/deploy_zone.pm
+++ b/
FS/FS/deploy_zone.pm
@@
-187,8
+187,15
@@
returns the error, otherwise returns false.
=cut
=cut
-# the replace method can be inherited from FS::Record
+sub replace {
+ my $self = shift;
+ my $old = shift || $self->replace_old;
+
+ $self->expire_date(time)
+ if $self->disabled eq 'Y' && ! $old->disabled && ! $self->expire_date;
+ $self->SUPER::replace($old, @_);
+}
=item check
Checks all fields to make sure this is a valid zone record. If there is
=item check
Checks all fields to make sure this is a valid zone record. If there is
diff --git
a/httemplate/browse/deploy_zone.html
b/httemplate/browse/deploy_zone.html
index
a1bd57f
..
5514d7d
100644
(file)
--- a/
httemplate/browse/deploy_zone.html
+++ b/
httemplate/browse/deploy_zone.html
@@
-61,6
+61,8
@@
nohtmlheader => 1,
disable_maxselect => 1,
disable_total => 1,
nohtmlheader => 1,
disable_maxselect => 1,
disable_total => 1,
+ disableable => 1,
+ disabled_statuspos => 2,
&>
<P><FONT SIZE="+1"><B>Mobile Zones</B></FONT></P>
<& elements/browse.html,
&>
<P><FONT SIZE="+1"><B>Mobile Zones</B></FONT></P>
<& elements/browse.html,
@@
-112,6
+114,8
@@
nohtmlheader => 1,
disable_maxselect => 1,
disable_total => 1,
nohtmlheader => 1,
disable_maxselect => 1,
disable_total => 1,
+ disableable => 1,
+ disabled_statuspos => 2,
&>
<& /elements/footer.html &>
&>
<& /elements/footer.html &>
diff --git
a/httemplate/edit/deploy_zone-fixed.html
b/httemplate/edit/deploy_zone-fixed.html
index
24e03b0
..
ce98c46
100644
(file)
--- a/
httemplate/edit/deploy_zone-fixed.html
+++ b/
httemplate/edit/deploy_zone-fixed.html
@@
-4,6
+4,7
@@
'post_url' => popurl(1).'process/deploy_zone-fixed.html',
'viewall_dir' => 'browse',
'labels' => {
'post_url' => popurl(1).'process/deploy_zone-fixed.html',
'viewall_dir' => 'browse',
'labels' => {
+ 'zonenum' => 'Deployment zone',
'description' => 'Description',
'agentnum' => 'Agent',
'dbaname' => 'Business name (if different from agent)',
'description' => 'Description',
'agentnum' => 'Agent',
'dbaname' => 'Business name (if different from agent)',
@@
-14,6
+15,7
@@
'cir_speed_down' => 'Downstream',
'is_consumer' => 'Consumer/mass market',
'is_business' => 'Business/government',
'cir_speed_down' => 'Downstream',
'is_consumer' => 'Consumer/mass market',
'is_business' => 'Business/government',
+ 'disabled' => 'Disabled',
'blocknum' => '',
'active_date' => 'Active since',
'file' => 'Import blocks from text file',
'blocknum' => '',
'active_date' => 'Active since',
'file' => 'Import blocks from text file',
@@
-37,6
+39,9
@@
$cgi->param('active_date') || $object->active_date || time;
},
},
$cgi->param('active_date') || $object->active_date || time;
},
},
+ { field => 'expire_date',
+ type => 'hidden',
+ },
{ field => 'agentnum',
type => 'select-agent',
disable_empty => 1,
{ field => 'agentnum',
type => 'select-agent',
disable_empty => 1,
@@
-50,6
+55,7
@@
},
{ field => 'is_consumer', type => 'checkbox', value=>'Y' },
{ field => 'is_business', type => 'checkbox', value=>'Y' },
},
{ field => 'is_consumer', type => 'checkbox', value=>'Y' },
{ field => 'is_business', type => 'checkbox', value=>'Y' },
+ { field => 'disabled', type=>'checkbox', value=>'Y', },
{ type => 'tablebreak-tr-title',
value => 'Advertised maximum speed (Mbps)' },
'adv_speed_down',
{ type => 'tablebreak-tr-title',
value => 'Advertised maximum speed (Mbps)' },
'adv_speed_down',