6 <& /util/import_javascript.mas, classes => [ 'jquery', 'jquery.dataTables' ] &>
8 <& /page/page_title.mas, title=>'Search People' &>
10 <div class="row" id="people_search_form" >
11 <div class="col-sm-1">
13 <div class="col-sm-10 well">
16 <div class="col-sm-6">
17 <div class="form-horizontal">
18 <div class="form-group">
19 <label class="col-sm-6 control-label">Last Name: </label>
20 <div class="col-sm-6" >
21 <input type="text" class="form-control" id="last_name" />
24 <div class="form-group">
25 <label class="col-sm-6 control-label">First Name: </label>
26 <div class="col-sm-6" >
27 <input type="text" class="form-control" id="first_name" />
32 <div class="col-sm-6">
33 <div class="form-horizontal">
34 <div class="form-group">
35 <label class="col-sm-6 control-label">Organization: </label>
36 <div class="col-sm-6" >
37 <input type="text" class="form-control" id="organization" />
40 <div class="form-group">
41 <label class="col-sm-6 control-label">Country: </label>
42 <div class="col-sm-6" >
43 <input type="text" class="form-control" id="country" />
49 <button class="btn btn-primary" id="submit_people_search" >Search</button>
54 <div class="col-sm-1">
59 <div id="people_search_form">
61 <tr><td><label for="last_name">Last name</label></td>
62 <td><input id="last_name" /><br /></td><td><label for="first_name">First name</label></td><td><input id="first_name" /><br /></td></tr>
63 <tr><td><label for="organization">Organization</label></td><td><input id="organization" /><br /></td><td><label for="country">Country</label></td><td><input id="country" /><br /></td></tr>
64 <tr><td colspan="4" align="right">
65 <button id="submit_people_search" >Search</button>
72 <table id="people_search_results" class="display">
84 <& /util/import_css.mas, paths => ['/documents/inc/datatables/jquery.dataTables.css'] &>
90 jQuery(document).ready(function () {
92 var table = jQuery('#people_search_results').DataTable( {
98 'ajax': { 'url': '/ajax/search/people',
100 d.first_name = jQuery('#first_name').val();
101 d.last_name = jQuery('#last_name').val();
102 d.organization = jQuery('#organization').val();
103 d.country = jQuery('#country').val();
109 jQuery('#submit_people_search').click( function() {
110 table.search("").draw();
115 jQuery('#people_search_form').keypress( function( e ) {
116 var code = e.keyCode || e.which;
119 jQuery('#submit_people_search').click();