fix warning, add datatables into /contract/create

- fix warning caused by missing "widget" attribute
- use datatables to select contacts in /contract/create
agranig/1_0_subfix
Gerhard Jungwirth 12 years ago
parent 63484ee94a
commit d6d7784969

@ -3,9 +3,12 @@ use HTML::FormHandler::Moose;
extends 'HTML::FormHandler::Field::Compound';
has_field 'contact' => (
type => '+NGCP::Panel::Field::ContactSelect',
type => '+NGCP::Panel::Field::DataTable',
label => 'Contact',
required => 1,
do_wrapper => 0,
ajax_src => '/contact/ajax',
table_fields => ['#', 'First Name', 'Last Name', 'Email'],
);
has_field 'create' => (

@ -3,7 +3,10 @@ use Moose;
use Template;
extends 'HTML::FormHandler::Field';
has 'template' => ( isa => 'Str', is => 'rw' );
has '+widget' => (default => ''); # leave this empty, as there is no widget ...
has 'template' => ( isa => 'Str',
is => 'rw',
default => 'share/templates/helpers/datatables_field.tt' );
has 'ajax_src' => ( isa => 'Str', is => 'rw' );
has 'table_fields' => ( isa => 'ArrayRef', is => 'rw' );

Loading…
Cancel
Save