parent
4b4c393c41
commit
394595cd48
@ -0,0 +1,26 @@
|
||||
package NGCP::Panel::Field::CustomerContract;
|
||||
use HTML::FormHandler::Moose;
|
||||
extends 'HTML::FormHandler::Field::Compound';
|
||||
|
||||
has_field 'id' => (
|
||||
type => '+NGCP::Panel::Field::DataTable',
|
||||
label => 'Customer',
|
||||
do_label => 0,
|
||||
do_wrapper => 0,
|
||||
required => 1,
|
||||
template => 'share/templates/helpers/datatables_field.tt',
|
||||
ajax_src => '/contract/customer/ajax',
|
||||
table_titles => ['#', 'Contact #', 'External #', 'Status'],
|
||||
table_fields => ['id', 'contact_id', 'external_id', 'status'],
|
||||
);
|
||||
|
||||
has_field 'create' => (
|
||||
type => 'Button',
|
||||
do_label => 0,
|
||||
value => 'Create Contract',
|
||||
element_class => [qw/btn btn-tertiary pull-right/],
|
||||
);
|
||||
|
||||
1;
|
||||
|
||||
# vim: set tabstop=4 expandtab:
|
||||
@ -0,0 +1,18 @@
|
||||
package NGCP::Panel::Field::NumberStatusSelect;
|
||||
use Moose;
|
||||
extends 'HTML::FormHandler::Field::Select';
|
||||
|
||||
sub build_options {
|
||||
my ($self) = @_;
|
||||
|
||||
return [
|
||||
{ label => 'active', value => 'active' },
|
||||
{ label => 'reserved', value => 'reserved' },
|
||||
{ label => 'locked', value => 'locked' },
|
||||
{ label => 'deported', value => 'deported' },
|
||||
];
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set tabstop=4 expandtab:
|
||||
@ -0,0 +1,17 @@
|
||||
package NGCP::Panel::Field::SubscriberStatusSelect;
|
||||
use Moose;
|
||||
extends 'HTML::FormHandler::Field::Select';
|
||||
|
||||
sub build_options {
|
||||
my ($self) = @_;
|
||||
|
||||
return [
|
||||
{ label => 'active', value => 'active' },
|
||||
{ label => 'locked', value => 'locked' },
|
||||
{ label => 'terminated', value => 'terminated' },
|
||||
];
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
# vim: set tabstop=4 expandtab:
|
||||
@ -0,0 +1,25 @@
|
||||
[% META title = 'Subscribers' -%]
|
||||
[%
|
||||
helper.name = 'Subscriber';
|
||||
helper.data = subscribers;
|
||||
helper.messages = messages;
|
||||
helper.column_titles = [ '#', 'Username', 'Domain #' ];
|
||||
helper.column_fields = [ 'id', 'username', 'domain_id' ];
|
||||
|
||||
helper.close_target = close_target;
|
||||
helper.create_flag = create_flag;
|
||||
helper.edit_flag = edit_flag;
|
||||
helper.form_object = form;
|
||||
helper.ajax_uri = c.uri_for( c.controller.action_for('ajax') );
|
||||
|
||||
helper.dt_buttons = [
|
||||
{ name = 'Delete', uri = "/subscriber/'+full[\"id\"]+'/delete", class = 'btn-small btn-secondary', icon = 'icon-trash' },
|
||||
{ name = 'Preferences', uri = "/subscriber/'+full[\"id\"]+'/preferences", class = 'btn-small btn-tertiary', icon = 'icon-list' },
|
||||
];
|
||||
helper.top_buttons = [
|
||||
{ name = 'Create Subscriber', uri = c.uri_for_action('/subscriber/create_list'), icon = 'icon-star' },
|
||||
];
|
||||
|
||||
PROCESS 'helpers/datatables.tt';
|
||||
-%]
|
||||
[% # vim: set tabstop=4 syntax=html expandtab: -%]
|
||||
Loading…
Reference in new issue