File: Borrower.pm

package info (click to toggle)
libhtml-formhandler-model-dbic-perl 0.29-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 640 kB
  • sloc: perl: 1,873; sql: 259; makefile: 14
file content (62 lines) | stat: -rw-r--r-- 1,367 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package BookDB::Form::Borrower;

use HTML::FormHandler::Moose;
extends 'HTML::FormHandler::Model::DBIC';

=head1 NAME

Form object for Borrower

=head1 DESCRIPTION

Catalyst Controller.

=cut


has '+item_class' => ( default => 'Borrower' );

__PACKAGE__->meta->make_immutable;

has_field 'name' => (
                type => 'Text',
                required => 1,
                order    => 1,
                label    => "Name",
                unique   => 1,
                unique_message => 'That name is already in our user directory',
);
has_field 'email'      => (
                type => 'Email',
                required => 1,
                order => 4,
                label => "Email",
            );
has_field 'phone' => (
                type => 'Text',
                order => 2,
                label => "Telephone",
            );
has_field 'url' => (
                type => 'Text',
                order => 3,
                label => 'URL',
            );
has_field 'active' => ( type => 'Boolean', label => "Active?" );

has_field 'submit' => ( type => 'Submit', value => 'Save' );

=head1 AUTHOR

Gerda Shank

=head1 LICENSE AND COPYRIGHT

This module is free software; you can redistribute it and/or
modify it under the same terms as Perl itself. See L<perlartistic>.

=cut

__PACKAGE__->meta->make_immutable;
no HTML::FormHandler::Moose;
1;