Line | |
---|
1 | <div style="display: inline-block; vertical-align: top"> |
---|
2 | <h3>Créer un alias d'object:</h3> |
---|
3 | <form action="[% c.uri_for('/oaliases', 'create') %]"> |
---|
4 | Type d'oject: |
---|
5 | <select name=otype id=otype> |
---|
6 | <option value=user>Utilisateur:</option> |
---|
7 | </select> |
---|
8 | <br> |
---|
9 | Nom de l'objet: |
---|
10 | <input type=text id=name name=name> |
---|
11 | <br> |
---|
12 | Références: |
---|
13 | <input type=text id=oalias name=oalias> |
---|
14 | <br> |
---|
15 | <input type=submit> |
---|
16 | <script> |
---|
17 | $(function() { |
---|
18 | $('#oalias').autocomplete({ |
---|
19 | delay: 200, |
---|
20 | minLength: 0, |
---|
21 | source: function( request, response ) { |
---|
22 | $.ajax({ |
---|
23 | url: '[% c.uri_for('/json/list') %]', |
---|
24 | data: { |
---|
25 | otype: $('#otype').val(), |
---|
26 | term: request.term, |
---|
27 | }, |
---|
28 | success: function(data) { |
---|
29 | response(data); |
---|
30 | }, |
---|
31 | }); |
---|
32 | }, |
---|
33 | }); |
---|
34 | $( "#oalias" ).focus(function() { $( "#oalias" ).autocomplete("search", "" ); }); |
---|
35 | $( "#oalias" ).click(function() { $( "#oalias" ).autocomplete("search", "" ); }); |
---|
36 | }); |
---|
37 | </script> |
---|
38 | |
---|
39 | </form> |
---|
40 | </div> |
---|
Note: See
TracBrowser
for help on using the repository browser.