* Max subscribers can now be defined in the Reseller contract * Max subscribers is now shown in int Reseller's "Reseller Contract" Details (with an indictaion of how many subscribers are created out of the defined max subscribers, as well as when the limit is reached (similar to the Customer's Details page) * Add reseller subscribers count checks on the UI Create Subscriber page * Add reseller subscribers count checks in /api/contracts POST/PUT * Prevent max_subscribers definition for Peering contracts in /api/contracts POST/PUT Change-Id: I1561d4eb7da5b1a0a0c99acabd18d2a9cd98dec7mr12.0
parent
8fbd46e5fc
commit
6953de937c
@ -1,4 +1,4 @@
|
||||
package NGCP::Panel::Form::Contract::PeeringReseller;
|
||||
package NGCP::Panel::Form::Contract::Peering;
|
||||
|
||||
use HTML::FormHandler::Moose;
|
||||
extends 'NGCP::Panel::Form::Contract::Base';
|
@ -0,0 +1,52 @@
|
||||
package NGCP::Panel::Form::Contract::Reseller;
|
||||
|
||||
use HTML::FormHandler::Moose;
|
||||
extends 'NGCP::Panel::Form::Contract::Base';
|
||||
|
||||
has '+prepaid_billing_profile_forbidden' => ( default => 1 );
|
||||
|
||||
has_field 'contact' => (
|
||||
type => '+NGCP::Panel::Field::ContactNoReseller',
|
||||
label => 'Contact',
|
||||
validate_when_empty => 1,
|
||||
element_attr => {
|
||||
rel => ['tooltip'],
|
||||
title => ['The contact id this contract belongs to.']
|
||||
},
|
||||
);
|
||||
|
||||
has_field 'billing_profile' => (
|
||||
type => '+NGCP::Panel::Field::BillingProfileNoPrepaid',
|
||||
element_attr => {
|
||||
rel => ['tooltip'],
|
||||
title => ['The billing profile used to charge this contract.']
|
||||
},
|
||||
);
|
||||
|
||||
has_field 'billing_profiles.profile' => (
|
||||
type => '+NGCP::Panel::Field::BillingProfileNoPrepaid',
|
||||
validate_when_empty => 1,
|
||||
element_attr => {
|
||||
rel => ['tooltip'],
|
||||
title => ['The billing profile used to charge this contract.']
|
||||
},
|
||||
);
|
||||
|
||||
has_field 'max_subscribers' => (
|
||||
type => 'PosInteger',
|
||||
label => 'Max Subscribers',
|
||||
required => 0,
|
||||
element_attr => {
|
||||
rel => ['tooltip'],
|
||||
title => ['Optionally set the maximum number of subscribers for this reseller contract. Leave empty for unlimited.']
|
||||
},
|
||||
);
|
||||
|
||||
has_block 'fields' => (
|
||||
tag => 'div',
|
||||
class => [qw/modal-body/],
|
||||
render_list => [qw/contact billing_profile_definition billing_profile billing_profiles profile_add status external_id max_subscribers/],
|
||||
);
|
||||
|
||||
1;
|
||||
# vim: set tabstop=4 expandtab:
|
Loading…
Reference in new issue