diff --git a/assets/src/legacy/filter.js b/assets/src/legacy/filter.js
index 760d742cf5..6623f5fe4b 100644
--- a/assets/src/legacy/filter.js
+++ b/assets/src/legacy/filter.js
@@ -392,7 +392,6 @@ var lizLayerFilterTool = function () {
* @param field_item
*/
function textFormInput(field_item) {
- // Ajout des données d'autocompletion
var field = field_item['field'];
var sdata = {
request: 'getUniqueValues',
@@ -400,40 +399,50 @@ var lizLayerFilterTool = function () {
fieldname: field,
filter: ''
};
- $.get(globalThis['filterConfigData'].url, sdata, function (result) {
- if (!checkResult(result)) {
- return false;
- }
-
- var autocompleteData = [];
- for (var a in result) {
- var feat = result[a];
- if (feat['v'] === null || !feat['v'] || (typeof feat['v'] === 'string' && feat['v'].trim() === ''))
- continue;
- autocompleteData.push(feat['v']);
- }
-
- var html = '';
- html += getFormFieldHeader(field_item);
- html += '
'
- html += ' ';
- html += '
'
- html += getFormFieldFooter(field_item);
-
- $("#filter-field-order" + String(field_item.order)).append(html);
- addFieldEvents(field_item);
- $("#liz-filter-field-text" + lizMap.cleanName(field_item.title)).autocomplete({
- source: autocompleteData,
- autoFocus: false, // do not autofocus, because this prevents from searching with LIKE
- delay: 200,
- minLength: 2,
- select: function (event, ui) {
- $(this).val(ui.item.value);
- $(this).change();
+ var html = '';
+ html += getFormFieldHeader(field_item);
+ html += ''
+ html += ' ';
+ html += '
'
+ html += getFormFieldFooter(field_item);
+
+ $("#filter-field-order" + String(field_item.order)).append(html);
+ addFieldEvents(field_item);
+
+ $("#liz-filter-field-text" + lizMap.cleanName(field_item.title)).autocomplete({
+ source: function (request, response) {
+ const autocompleteFilter = `"${field}" ILIKE '%${request.term}%' `;
+ if (!globalThis['filterConfigData'].filter) {
+ sdata.filter = autocompleteFilter;
+ } else {
+ sdata.filter = ' ( ' + globalThis['filterConfigData'].filter + ' ) AND ' + autocompleteFilter;
}
- });
- }, 'json');
+ fetch(globalThis['filterConfigData'].url, {
+ method: "POST",
+ body: new URLSearchParams(sdata)
+ }).then(response => {
+ return response.json();
+ }).then(result => {
+ var autocompleteData = [];
+ for (var a in result) {
+ var feat = result[a];
+ if (feat['v'] === null || !feat['v'] || (typeof feat['v'] === 'string' && feat['v'].trim() === '')) {
+ continue;
+ }
+ autocompleteData.push(feat['v']);
+ }
+ response(autocompleteData);
+ });
+ },
+ autoFocus: false, // do not autofocus, because this prevents from searching with LIKE
+ delay: 500,
+ minLength: 3,
+ select: function (event, ui) {
+ $(this).val(ui.item.value);
+ $(this).blur();
+ }
+ });
}
// Get the HTML form element for the uniqueValues field type
diff --git a/tests/end2end/cypress/integration/form-filter-ghaction.js b/tests/end2end/cypress/integration/form-filter-ghaction.js
deleted file mode 100644
index fe9fe6955e..0000000000
--- a/tests/end2end/cypress/integration/form-filter-ghaction.js
+++ /dev/null
@@ -1,70 +0,0 @@
-describe('Form filter', () => {
- it('Test the form filter with checkboxes', function () {
- // There is randomly an error in the console when attribute table is resized
- // This avoid test to fail
- Cypress.on('uncaught:exception', (err, runnable) => {
- // returning false here prevents Cypress from
- // failing the test
- return false
- })
-
- cy.visit('/index.php/view/map/?repository=testsrepository&project=form_filter')
- cy.get('#button-filter').click()
-
- cy.intercept('*REQUEST=GetMap*',
- { middleware: true },
- (req) => {
- req.on('before:response', (res) => {
- // force all API responses to not be cached
- // It is needed when launching tests multiple time in headed mode
- res.headers['cache-control'] = 'no-store'
- })
- }).as('getMap')
-
- const combo = '#liz-filter-field-test_filter'
- const countFeature = '#liz-filter-item-layer-total-count'
-
- // Default
- cy.get('#liz-filter-item-layer-total-count').should('have.text', '2')
- cy.get(combo + ' > option:nth-child(1)').should('have.text', ' --- ')
-
- // Open the attribute tables for the 2 layers
- cy.get('button[value="form_filter__a_"].btn-open-attribute-layer').click({ force: true })
- cy.get('button[value="form_filter_child_bus_stops"].btn-open-attribute-layer').click({ force: true })
-
- // Select the first one
- cy.get(combo).select('_uvres_d_art_et_monuments_de_l_espace_urbain')
- cy.get(countFeature).should('have.text', '1')
-
- // Wait for the cascading filter to happen
- cy.wait(300)
- cy.wait('@getMap')
-
- // Check the attribute table shows only one line
- cy.get('#attribute-layer-table-form_filter__a_ tbody tr').should('have.length', 1)
-
- // Check the child features are filtered too (3 children)
- cy.get('#attribute-layer-table-form_filter_child_bus_stops tbody tr').should('have.length', 3)
-
- // Reset
- cy.get('#liz-filter-unfilter').click()
- cy.get(countFeature).should('have.text', '2')
-
- cy.wait('@getMap')
-
- // Select the second one
- cy.get(combo).select('simple_label')
- cy.get(countFeature).should('have.text', '1')
-
- // Check the attribute table shows only one line
- cy.wait('@getMap')
- cy.get('#attribute-layer-table-form_filter__a_ tbody tr').should('have.length', 1)
-
- // Check the child features are filtered too (2 children)
- cy.get('#attribute-layer-table-form_filter_child_bus_stops tbody tr').should('have.length', 2)
-
- // Disable combobox
- cy.get('div#liz-filter-box-test_filter button.btn-primary:nth-child(2)').click()
- cy.get(countFeature).should('have.text', '2')
- })
-})
diff --git a/tests/end2end/playwright/form-filter.spec.js b/tests/end2end/playwright/form-filter.spec.js
new file mode 100644
index 0000000000..c2b0813fd1
--- /dev/null
+++ b/tests/end2end/playwright/form-filter.spec.js
@@ -0,0 +1,106 @@
+// @ts-check
+import { test, expect } from '@playwright/test';
+import { gotoMap } from './globals';
+
+test.describe('Form filter', () => {
+ test.beforeEach(async ({ page }) => {
+ const url = '/index.php/view/map/?repository=testsrepository&project=form_filter';
+ await gotoMap(url, page);
+ await page.locator('#button-filter').click();
+ });
+
+ test('Form filter with combobox', async ({ page }) => {
+ let getMapPromise = page.waitForRequest(/GetMap/);
+
+ const combo = '#liz-filter-field-test_filter';
+ const countFeature = '#liz-filter-item-layer-total-count';
+
+ // Default
+ await expect(page.locator('#liz-filter-item-layer-total-count')).toHaveText('4');
+ await expect(page.locator(combo + ' > option:nth-child(1)')).toHaveText(' --- ');
+
+ // Open the attribute tables for the 2 layers
+ await page.locator('#button-attributeLayers').click();
+ await page.locator('button[value="form_filter__a_"].btn-open-attribute-layer').click({ force: true });
+ await page.locator('#nav-tab-attribute-summary').click();
+ await page.locator('button[value="form_filter_child_bus_stops"].btn-open-attribute-layer').click({ force: true });
+
+ // Select the first one
+ await page.locator(combo).selectOption('_uvres_d_art_et_monuments_de_l_espace_urbain');
+ await expect(page.locator(countFeature)).toHaveText('1');
+
+ let getMapRequest = await getMapPromise;
+ // Re-send the request with additionnal echo param to retrieve the WMS Request
+ let echoGetMap = await page.request.get(getMapRequest.url() + '&__echo__');
+ let originalUrl = decodeURIComponent(await echoGetMap.text());
+ let urlObj = new URLSearchParams((new URL(originalUrl).search));
+
+ expect(urlObj.get('filter')).toBe('form_filter_layer:"id" IN ( 2 ) ');
+
+ // Check the attribute table shows only one line
+ await page.locator('#nav-tab-attribute-layer-form_filter__a_').click({ force: true });
+ await expect(page.locator('#attribute-layer-table-form_filter__a_ tbody tr')).toHaveCount(1);
+
+ // Check the child features are filtered too (3 children)
+ await page.locator('#nav-tab-attribute-layer-form_filter_child_bus_stops').click({ force: true });
+ await expect(page.locator('#attribute-layer-table-form_filter_child_bus_stops tbody tr')).toHaveCount(3);
+
+ // Reset
+ getMapPromise = page.waitForRequest(/GetMap/);
+ page.locator('#liz-filter-unfilter').click();
+ await expect(page.locator(countFeature)).toHaveText('4');
+
+ getMapRequest = await getMapPromise;
+
+ // Re-send the request with additionnal echo param to retrieve the WMS Request
+ echoGetMap = await page.request.get(getMapRequest.url() + '&__echo__');
+ originalUrl = decodeURIComponent(await echoGetMap.text());
+ urlObj = new URLSearchParams((new URL(originalUrl).search));
+
+ expect(urlObj.get('filter')).toBeNull();
+
+ // Select the second one
+ await page.locator(combo).selectOption('simple_label');
+ await expect(page.locator(countFeature)).toHaveText('1');
+
+ // Check the attribute table shows only one line
+ await getMapPromise;
+ await page.locator('#nav-tab-attribute-layer-form_filter__a_').click({ force: true });
+ await expect(page.locator('#attribute-layer-table-form_filter__a_ tbody tr')).toHaveCount(1);
+
+ // Check the child features are filtered too (2 children)
+ await page.locator('#nav-tab-attribute-layer-form_filter_child_bus_stops').click({ force: true });
+ await expect(page.locator('#attribute-layer-table-form_filter_child_bus_stops tbody tr')).toHaveCount(2);
+
+ // Disable combobox
+ await page.locator('div#liz-filter-box-test_filter button.btn-primary:nth-child(2)').click();
+ await expect(page.locator(countFeature)).toHaveText('4');
+ });
+
+ test('Form filter with autocomplete', async ({ page }) => {
+ await page.locator('#liz-filter-field-textautocomplete').fill('mon');
+
+ // Assert autocomplete list has 3 values
+ await expect(page.locator('#ui-id-2 .ui-menu-item')).toHaveCount(3);
+
+ await page.locator('#liz-filter-field-textautocomplete').fill('');
+
+ // Filter by ID then assert autocomplete list has now 2 values
+ // when filling 'mon' in the autocomplete field
+ await page.locator('#liz-filter-field-max-numericIDs').fill('3');
+ await page.locator('#liz-filter-field-textautocomplete').fill('mon');
+ await expect(page.locator('#ui-id-2 .ui-menu-item')).toHaveCount(2);
+
+ // Reset
+ await page.locator('#liz-filter-field-textautocomplete').fill('');
+ await page.locator('#liz-filter-unfilter').click();
+
+ // Filter by combobox then assert autocomplete list has now 1 value
+ // when filling 'mon' in the autocomplete field
+ await page.locator('#liz-filter-field-test_filter').selectOption('monuments');
+ await page.locator('#liz-filter-field-textautocomplete').fill('mon');
+ await expect(page.locator('#ui-id-2 .ui-menu-item')).toHaveCount(1);
+ await expect(page.locator('#ui-id-2 .ui-menu-item div')).toHaveText('monuments');
+ });
+});
+
diff --git a/tests/qgis-projects/tests/form_filter.md b/tests/qgis-projects/tests/form_filter.md
deleted file mode 100644
index 206adbf332..0000000000
--- a/tests/qgis-projects/tests/form_filter.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Test form filter
-
-**Project : form_filter**
-
-**Note :** This test is highly covered by cypress, but GetMap requests are not checked in Cypress
-
-## Procedure
-
-* [ ] Display form filter tool then:
-* [ ] Selecting "simple label" in `test_filter` should only display one point with "simple label" label on map
-* [ ] Selecting "Œuvres d'art et monuments de l'espace urbain" in `test_filter` should only display one point with "Œuvres d'art et monuments de l'espace urbain" label on map
-* [ ] Clicking cross button should display the two initial points on map
diff --git a/tests/qgis-projects/tests/form_filter.qgs b/tests/qgis-projects/tests/form_filter.qgs
index 1d5b6c850f..3a11dfe20a 100644
--- a/tests/qgis-projects/tests/form_filter.qgs
+++ b/tests/qgis-projects/tests/form_filter.qgs
@@ -1,11 +1,10 @@
-
+
-
-
-
+
+
-
+
PROJCRS["RGF93 v1 / Lambert-93",BASEGEOGCRS["RGF93 v1",DATUM["Reseau Geodesique Francais 1993 v1",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4171]],CONVERSION["Lambert-93",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",46.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",49,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",700000,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",6600000,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["France - onshore and offshore, mainland and Corsica."],BBOX[41.15,-9.86,51.56,10.38]],ID["EPSG",2154]]
+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
145
@@ -17,6 +16,7 @@
false
+
@@ -58,7 +58,7 @@
0
-
+
PROJCRS["RGF93 v1 / Lambert-93",BASEGEOGCRS["RGF93 v1",DATUM["Reseau Geodesique Francais 1993 v1",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4171]],CONVERSION["Lambert-93",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",46.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",49,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",700000,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",6600000,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["France - onshore and offshore, mainland and Corsica."],BBOX[41.15,-9.86,51.56,10.38]],ID["EPSG",2154]]
+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
145
@@ -87,8 +87,7 @@
-
-
+
Annotations_1b82beaa_5a0a_445e_b2ad_d7288106e20f
@@ -96,7 +95,7 @@
-
+
0
@@ -116,10 +115,11 @@
+
-
+
0
@@ -134,23 +134,32 @@
+
+ 1
+ 1
+ 1
+ 0
+
+
+
+
1
0
-
+
639.26738227050134356
-681
- 662
+ 1062.67599971713116247
-291.40733550341667524
-1.3590046014910826
-5.98787712656267779
- -1.35872929593759695
- -5.98544315188782594
+ -1.35623708791804964
+ -5.98530531082845574
form_filter_8bfd580f_2848_4bd4_80cf_facb270a9af5
service='lizmapdb' sslmode=disable key='id' estimatedmetadata=true srid=2154 type=Point checkPrimaryKeyUnicity='1' table="tests_projects"."form_filter" (geom)
@@ -160,7 +169,7 @@
form filter (à)
-
+
PROJCRS["RGF93 v1 / Lambert-93",BASEGEOGCRS["RGF93 v1",DATUM["Reseau Geodesique Francais 1993 v1",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4171]],CONVERSION["Lambert-93",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",46.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",49,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",700000,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",6600000,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["France - onshore and offshore, mainland and Corsica."],BBOX[41.15,-9.86,51.56,10.38]],ID["EPSG",2154]]
+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
145
@@ -189,10 +198,11 @@
+
-
+
PROJCRS["RGF93 v1 / Lambert-93",BASEGEOGCRS["RGF93 v1",DATUM["Reseau Geodesique Francais 1993 v1",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4171]],CONVERSION["Lambert-93",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",46.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",49,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",700000,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",6600000,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["France - onshore and offshore, mainland and Corsica."],BBOX[41.15,-9.86,51.56,10.38]],ID["EPSG",2154]]
+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
145
@@ -236,13 +246,147 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
-
+
@@ -250,7 +394,7 @@
-
+
@@ -272,25 +416,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -300,7 +425,7 @@
-
+
@@ -308,7 +433,7 @@
-
+
@@ -330,25 +455,84 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -360,7 +544,7 @@
-
+
@@ -368,7 +552,7 @@
-
+
@@ -390,25 +574,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -422,14 +587,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
@@ -437,7 +646,7 @@
-
+
@@ -459,25 +668,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -487,7 +677,7 @@
-
+
@@ -495,7 +685,7 @@
-
+
@@ -509,17 +699,6 @@
-
-
-
-
-
-
-
-
-
-
-
@@ -541,8 +720,8 @@
-
-
+
+
@@ -562,7 +741,7 @@
-
+
@@ -583,7 +762,6 @@
-
@@ -595,10 +773,10 @@
1
-
+
-
+
@@ -606,7 +784,7 @@
-
+
@@ -636,33 +814,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -691,14 +842,14 @@
-
+
-
+
@@ -710,6 +861,10 @@
+
+
+
+
@@ -729,7 +884,7 @@
-
+
@@ -775,9 +930,9 @@ def my_form_open(dialog, layer, feature):
"id"
-
+
-
+
515.92221776402072919
-833.24502244259929284
@@ -798,7 +953,7 @@ def my_form_open(dialog, layer, feature):
form_filter_child_bus_stops
-
+
PROJCRS["RGF93 v1 / Lambert-93",BASEGEOGCRS["RGF93 v1",DATUM["Reseau Geodesique Francais 1993 v1",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4171]],CONVERSION["Lambert-93",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",46.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",49,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",700000,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",6600000,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["France - onshore and offshore, mainland and Corsica."],BBOX[41.15,-9.86,51.56,10.38]],ID["EPSG",2154]]
+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
145
@@ -827,10 +982,11 @@ def my_form_open(dialog, layer, feature):
+
-
+
PROJCRS["RGF93 v1 / Lambert-93",BASEGEOGCRS["RGF93 v1",DATUM["Reseau Geodesique Francais 1993 v1",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4171]],CONVERSION["Lambert-93",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",46.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",49,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",700000,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",6600000,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["France - onshore and offshore, mainland and Corsica."],BBOX[41.15,-9.86,51.56,10.38]],ID["EPSG",2154]]
+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
145
@@ -874,13 +1030,145 @@ def my_form_open(dialog, layer, feature):
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
@@ -888,7 +1176,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -910,25 +1198,6 @@ def my_form_open(dialog, layer, feature):
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -938,7 +1207,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -946,7 +1215,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -968,25 +1237,6 @@ def my_form_open(dialog, layer, feature):
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -998,7 +1248,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1006,7 +1256,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1028,25 +1278,6 @@ def my_form_open(dialog, layer, feature):
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1060,14 +1291,17 @@ def my_form_open(dialog, layer, feature):
+
+
+
-
+
-
+
-
+
@@ -1075,7 +1309,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1097,25 +1331,6 @@ def my_form_open(dialog, layer, feature):
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1125,7 +1340,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1133,7 +1348,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1147,17 +1362,6 @@ def my_form_open(dialog, layer, feature):
-
-
-
-
-
-
-
-
-
-
-
@@ -1179,8 +1383,8 @@ def my_form_open(dialog, layer, feature):
-
-
+
+
@@ -1200,7 +1404,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1232,10 +1436,10 @@ def my_form_open(dialog, layer, feature):
1
-
+
-
+
@@ -1243,7 +1447,7 @@ def my_form_open(dialog, layer, feature):
-
+
@@ -1273,33 +1477,6 @@ def my_form_open(dialog, layer, feature):
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -1332,21 +1509,21 @@ def my_form_open(dialog, layer, feature):
-
+
-
+
-
+
@@ -1359,6 +1536,11 @@ def my_form_open(dialog, layer, feature):
+
+
+
+
+
@@ -1431,7 +1613,7 @@ def my_form_open(dialog, layer, feature):
"id"
-
+
@@ -1439,14 +1621,7 @@ def my_form_open(dialog, layer, feature):
-
-
-
-
-
- 1
- true
-
+
2
@@ -1478,6 +1653,7 @@ def my_form_open(dialog, layer, feature):
16
30
2.5
+ false
false
false
0
@@ -1621,16 +1797,21 @@ def my_form_open(dialog, layer, feature):
+
+
+
2021-04-12T08:10:15
+
+
-
-
+
+
PROJCRS["RGF93 v1 / Lambert-93",BASEGEOGCRS["RGF93 v1",DATUM["Reseau Geodesique Francais 1993 v1",ELLIPSOID["GRS 1980",6378137,298.257222101,LENGTHUNIT["metre",1]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],ID["EPSG",4171]],CONVERSION["Lambert-93",METHOD["Lambert Conic Conformal (2SP)",ID["EPSG",9802]],PARAMETER["Latitude of false origin",46.5,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8821]],PARAMETER["Longitude of false origin",3,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8822]],PARAMETER["Latitude of 1st standard parallel",49,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8823]],PARAMETER["Latitude of 2nd standard parallel",44,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8824]],PARAMETER["Easting at false origin",700000,LENGTHUNIT["metre",1],ID["EPSG",8826]],PARAMETER["Northing at false origin",6600000,LENGTHUNIT["metre",1],ID["EPSG",8827]]],CS[Cartesian,2],AXIS["easting (X)",east,ORDER[1],LENGTHUNIT["metre",1]],AXIS["northing (Y)",north,ORDER[2],LENGTHUNIT["metre",1]],USAGE[SCOPE["Engineering survey, topographic mapping."],AREA["France - onshore and offshore, mainland and Corsica."],BBOX[41.15,-9.86,51.56,10.38]],ID["EPSG",2154]]
+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs
145
@@ -1643,19 +1824,58 @@ def my_form_open(dialog, layer, feature):
+
+
+
-
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GEOGCRS["WGS 84",ENSEMBLE["World Geodetic System 1984 ensemble",MEMBER["World Geodetic System 1984 (Transit)"],MEMBER["World Geodetic System 1984 (G730)"],MEMBER["World Geodetic System 1984 (G873)"],MEMBER["World Geodetic System 1984 (G1150)"],MEMBER["World Geodetic System 1984 (G1674)"],MEMBER["World Geodetic System 1984 (G1762)"],MEMBER["World Geodetic System 1984 (G2139)"],ELLIPSOID["WGS 84",6378137,298.257223563,LENGTHUNIT["metre",1]],ENSEMBLEACCURACY[2.0]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["geodetic latitude (Lat)",north,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["geodetic longitude (Lon)",east,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]],USAGE[SCOPE["Horizontal component of 3D system."],AREA["World."],BBOX[-90,-180,90,180]],ID["EPSG",4326]]
+ +proj=longlat +datum=WGS84 +no_defs
+ 3452
+ 4326
+ EPSG:4326
+ WGS 84
+ longlat
+ EPSG:7030
+ true
+
+
-
+
+
+
+
\ No newline at end of file
diff --git a/tests/qgis-projects/tests/form_filter.qgs.cfg b/tests/qgis-projects/tests/form_filter.qgs.cfg
index 5dc6b4901a..4745549fc6 100644
--- a/tests/qgis-projects/tests/form_filter.qgs.cfg
+++ b/tests/qgis-projects/tests/form_filter.qgs.cfg
@@ -1,15 +1,17 @@
{
"metadata": {
- "qgis_desktop_version": 32216,
- "lizmap_plugin_version_str": "3.17.1-alpha",
- "lizmap_plugin_version": 31701,
- "lizmap_web_client_target_version": 30700,
+ "qgis_desktop_version": 33413,
+ "lizmap_plugin_version_str": "4.4.6-alpha",
+ "lizmap_plugin_version": 40406,
+ "lizmap_web_client_target_version": 31000,
"lizmap_web_client_target_status": "Dev",
"instance_target_url": "http://localhost:8130/",
- "instance_target_repository": "intranet",
- "project_valid": true
+ "instance_target_repository": "intranet"
+ },
+ "warnings": {},
+ "debug": {
+ "total_time": 0.657
},
- "warnings": [],
"options": {
"projection": {
"proj4": "+proj=lcc +lat_0=46.5 +lon_0=3 +lat_1=49 +lat_2=44 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs",
@@ -31,16 +33,19 @@
],
"minScale": 10000,
"maxScale": 500000,
+ "use_native_zoom_levels": false,
+ "hide_numeric_scale_value": false,
"initialExtent": [
- -1027.6760398981332,
- -1652.927886247878,
- 2893.747729202038,
- 556.2721137521228
+ -1027.676,
+ -1652.9279,
+ 2893.7477,
+ 556.2721
],
"popupLocation": "dock",
"pointTolerance": 25,
"lineTolerance": 10,
"polygonTolerance": 5,
+ "automatic_permalink": false,
"tmTimeFrameSize": 10,
"tmTimeFrameType": "seconds",
"tmAnimationFrameLength": 1000,
@@ -58,7 +63,7 @@
"extent": [
639.2673822705013,
-681.0,
- 662.0,
+ 1062.6759997171312,
-291.4073355034167
],
"crs": "EPSG:2154",
@@ -164,12 +169,31 @@
},
"formFilterLayers": {
"0": {
+ "layerId": "form_filter_8bfd580f_2848_4bd4_80cf_facb270a9af5",
+ "title": "IDs",
+ "type": "numeric",
+ "start_field": "id",
+ "end_field": "id",
+ "order": 0,
+ "provider": "postgres"
+ },
+ "1": {
"layerId": "form_filter_8bfd580f_2848_4bd4_80cf_facb270a9af5",
"title": "test_filter",
"type": "uniquevalues",
"field": "label",
"format": "select",
- "order": 0,
+ "order": 1,
+ "provider": "postgres"
+ },
+ "2": {
+ "layerId": "form_filter_8bfd580f_2848_4bd4_80cf_facb270a9af5",
+ "title": "autocomplete",
+ "type": "text",
+ "field": "label",
+ "start_field": "id",
+ "end_field": "id",
+ "order": 2,
"provider": "postgres"
}
}
diff --git a/tests/qgis-projects/tests/tests_dataset.sql b/tests/qgis-projects/tests/tests_dataset.sql
index d9c7f2872c..03b7821e0c 100644
--- a/tests/qgis-projects/tests/tests_dataset.sql
+++ b/tests/qgis-projects/tests/tests_dataset.sql
@@ -3408,6 +3408,8 @@ COPY tests_projects.form_edition_vr_point (id, code_without_exp, code_with_simpl
COPY tests_projects.form_filter (id, label, geom) FROM stdin;
1 simple label 01010000206A080000ABDA509923FA8340CA9A3B72843672C0
2 Œuvres d'art et monuments de l'espace urbain 01010000206A0800000000000000B0844000000000004885C0
+3 monuments 01010000206A080000BC144539B49A9040D88E7FA8F0C072C0
+4 monuments 2 01010000206A080000BA9926EC46DC9140DD5B3AA4A0AD80C0
\.
@@ -4123,7 +4125,7 @@ SELECT pg_catalog.setval('tests_projects.form_filter_child_bus_stops_id_seq', 5,
-- Name: form_filter_id_seq; Type: SEQUENCE SET; Schema: tests_projects; Owner: -
--
-SELECT pg_catalog.setval('tests_projects.form_filter_id_seq', 2, true);
+SELECT pg_catalog.setval('tests_projects.form_filter_id_seq', 4, true);
--
@@ -5050,3 +5052,4 @@ ALTER TABLE ONLY tests_projects.tramway_pivot
--
-- PostgreSQL database dump complete
--
+