Change-Id: If1fa5574d28cd18df1790e0dd2eccff76b255894changes/26/2826/8
parent
e60f943030
commit
8c45fc5a7c
@ -0,0 +1,46 @@
|
|||||||
|
package NGCP::Panel::Form::Customer::PbxGroupEditSubadmin;
|
||||||
|
|
||||||
|
use HTML::FormHandler::Moose;
|
||||||
|
extends 'NGCP::Panel::Form::Customer::PbxGroupBase';
|
||||||
|
|
||||||
|
has_field 'alias_select' => (
|
||||||
|
type => '+NGCP::Panel::Field::DataTable',
|
||||||
|
label => 'Numbers',
|
||||||
|
do_label => 0,
|
||||||
|
do_wrapper => 0,
|
||||||
|
required => 0,
|
||||||
|
template => 'helpers/datatables_multifield.tt',
|
||||||
|
ajax_src => '/invalid',
|
||||||
|
table_titles => ['#', 'Number', 'Subscriber'],
|
||||||
|
table_fields => ['id', 'number', 'subscriber_username'],
|
||||||
|
);
|
||||||
|
|
||||||
|
has_block 'fields' => (
|
||||||
|
tag => 'div',
|
||||||
|
class => [qw/modal-body/],
|
||||||
|
render_list => [qw/pbx_extension pbx_hunt_policy pbx_hunt_timeout alias_select/],
|
||||||
|
);
|
||||||
|
|
||||||
|
sub field_list {
|
||||||
|
my ($self) = @_;
|
||||||
|
|
||||||
|
my $c = $self->ctx;
|
||||||
|
return unless($c);
|
||||||
|
|
||||||
|
if($self->field('alias_select')) {
|
||||||
|
my $sub;
|
||||||
|
if($c->stash->{pilot}) {
|
||||||
|
$sub = $c->stash->{pilot};
|
||||||
|
}
|
||||||
|
|
||||||
|
if($sub) {
|
||||||
|
$self->field('alias_select')->ajax_src(
|
||||||
|
$c->uri_for_action("/subscriber/aliases_ajax", [$sub->id])->as_string,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
||||||
|
# vim: set tabstop=4 expandtab:
|
||||||
Loading…
Reference in new issue