1
{{extend "layout.html"}}
2
{{include "gis/catalogue_toolbar.html"}}
3
{{form[0].insert(-3, TR(TD(LABEL(T("Advanced:"))), INPUT(_name="advanced", _type="checkbox", _value="on", _id="advanced", _class="boolean")))}}
4
{{include "_create.html"}}
5
<script type="text/javascript">//<![CDATA[
11
// Hide the query row unless user clicks 'Advanced'
12
$('#gis_feature_layer_query__row').hide();
13
// Convert the field row to a dropdown (initially empty)
14
$('#gis_feature_layer_filter_field').parent().html('<select id="gis_feature_layer_filter_field" name="filter_field"></select>');
15
// When the checkbox changes:
16
$('#advanced').change(function() {
17
// What is the new value?
18
advanced = $(this).attr('checked');
20
// Display the query row
21
$("#gis_feature_layer_query__row").show();
22
// Hide the simple rows
23
$("#gis_feature_layer_resource__row").hide();
24
$("#gis_feature_layer_filter_field__row").hide();
25
$("#gis_feature_layer_filter_value__row").hide();
27
// Hide the query row again
28
$("#gis_feature_layer_query__row").hide();
29
// Show the simple rows
30
$("#gis_feature_layer_resource__row").show();
31
$("#gis_feature_layer_filter_field__row").show();
32
$("#gis_feature_layer_filter_value__row").show();
35
// @ToDo: Populate the list of fields from server when the resource changes
36
$('#gis_feature_layer_resource').change(function() {
37
resource = $(this).val();
38
url = '{{=URL3(r=request)}}' + '/' + resource + '/fields.json';
43
// options += '<option value="' + data[key] + '">' + data[key] + '</option>';
45
//$('#gis_feature_layer_filter_field').html(options);
b'\\ No newline at end of file'