TT#41013 Separate edit and create form for extension subsctibers

Change-Id: Ib46a3d2cfaa3c6addcd86a545b4e302a2370f295
changes/15/22615/2
Irina Peshinskaya 7 years ago
parent 145167e3db
commit c21965865c

@ -2696,8 +2696,7 @@ sub edit_master :Chained('master') :PathPart('edit') :Args(0) :Does(ACL) :ACLDet
$form = NGCP::Panel::Form::get("NGCP::Panel::Form::Customer::PbxExtensionSubscriberEditSubadmin", $c);
} else {
$is_admin = 1;
$form = NGCP::Panel::Form::get("NGCP::Panel::Form::Customer::PbxExtensionSubscriber", $c);
$form->field('username')->inactive(1);
$form = NGCP::Panel::Form::get("NGCP::Panel::Form::Customer::PbxExtensionSubscriberEdit", $c);
}
$pbx_ext = 1;
}

@ -0,0 +1,38 @@
package NGCP::Panel::Form::Customer::PbxExtensionSubscriberEdit;
use HTML::FormHandler::Moose;
extends 'NGCP::Panel::Form::Customer::PbxExtensionSubscriber';
#This separate package exists to avoid collisions between cached edit form with one that is used for subscriber creation
has_block 'fields' => (
tag => 'div',
class => [qw/modal-body/],
render_list => [qw/domain group_select alias_select pbx_extension display_name email webusername webpassword password administrative lock status external_id timezone profile_set profile/ ],
);
1;
=head1 NAME
NGCP::Panel::Form::PbxExtensionSubscriberEdit
=head1 DESCRIPTION
Form to modify a subscriber.
=head1 METHODS
=head1 AUTHOR
Gerhard Jungwirth
=head1 LICENSE
This library is free software. You can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
# vim: set tabstop=4 expandtab:
Loading…
Cancel
Save