9 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
10 |
|
|
11 |
|
|
12 |
template '/skole' => page { |
template 'ldap' => page { |
13 |
h1 { _('Schools in system') }; |
h1 { _('LDAP data about Schools in system') }; |
|
show 'skole_sve'; |
|
|
}; |
|
|
|
|
|
private template 'skole_sve' => sub { |
|
14 |
my $ldap = A3C::LDAP->new; |
my $ldap = A3C::LDAP->new; |
15 |
div { |
div { |
16 |
$ldap->search( |
$ldap->search( |
32 |
} |
} |
33 |
}; |
}; |
34 |
|
|
35 |
template '/search-users' => page { |
template 'people' => page { |
36 |
|
|
37 |
|
h1 { _('Find people') } |
38 |
|
|
39 |
my $action = new_action( |
my $action = new_action( |
40 |
class => 'SearchUser', |
class => 'SearchPerson', |
41 |
moniker => 'search-users' |
moniker => 'search-users', |
42 |
|
sticky_on_success => 1, |
43 |
|
sticky_on_failure => 1, |
44 |
); |
); |
45 |
|
|
46 |
|
|
47 |
form { |
form { |
48 |
render_action( $action => [ 'uid_contains', 'cn_contains' ] ); |
render_action( $action => [ 'uid_contains', 'cn_contains' ] ); |
49 |
form_submit( label => _('Find someone') ); |
form_submit( label => _('Find someone') ); |
65 |
|
|
66 |
}; |
}; |
67 |
|
|
68 |
template '/sync' => page { |
template 'sync' => page { |
69 |
|
|
70 |
|
h1 { _('Sync school from LDAP') } |
71 |
|
|
72 |
my $action = new_action( |
my $action = new_action( |
73 |
class => 'SyncOrganization', |
class => 'SyncOrganization', |