remove variable attribute section for traits.
[sgn.git] / mason / brapiclient / programs.mas
blobd9ea72ea0fbe44eae0dae88d755442ba12210888
1 <%args>
2 </%args>
4 <div id="brapi_home_programs_div">
6     <h4>Programs</h4>
7     <input name="brapi_home_program_name" id="brapi_home_program_name" class="form-control" type="text" placeholder="ProgramName e.g. test" value="test"/>
8     <button class="btn btn-primary" name="brapi_home_program_submit" id="brapi_home_program_submit">Get Programs</button>
9     <br/><br/>
10     <div id="brapi_programs_result_div">
11     </div>
13 </div>
15 <script>
17 jQuery(document).ready(function() {
18     jQuery("#brapi_home_program_submit").click(function() {
19         jQuery.ajax( {
20           'url': jQuery('#brapi_home_url_select').val()+'/brapi/v1/programs?programName='+jQuery('#brapi_home_program_name').val(),
21           'method': 'GET',
22           'success': function(response) {
23             console.log(response);
24             brapi_create_paginated_table(response.result.data, response.metadata.pagination, 'brapi_programs_result_div', jQuery('#brapi_home_url_select').val()+'/brapi/v1/programs?programName='+jQuery('#brapi_home_program_name').val(), undefined);
26           },
27           error: function(response) {
28             alert('An error occurred');
29           }
30         });
32     });
33 });
35 </script>