OpenBuildings / jam-tart

Jam Admin Builder
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

Include filters in pagination slider form #10

Open hkdobrev opened 10 years ago

hkdobrev commented 10 years ago

The pagination links are including the existing query string. However the pagination slider form is not. IMHO this is a bug, because you have no use of such pagination.


Including URL::query() to the form action would not change a thing. In the HTML5 standard the query string from the form action is stripped out when its method is GET and have some form inputs.

Let query be the result of encoding the form data set using the application/x-www-form-urlencoded encoding algorithm, interpreted as a US-ASCII string.

Set parsed action's query component to query.

Source: http://www.w3.org/html/wg/drafts/html/master/forms.html#form-submission-algorithm 4.10.22.3 > step 18. > "Mutate action URL".


I guess the solution should iterate the current query and include a hidden input for every parameter preceding the current inputs.

hkdobrev commented 10 years ago

Here is a nice SO answer on the subject: http://stackoverflow.com/a/9882750/679227

ivank commented 10 years ago

Yeah I think hidden inputs are the answer at the moment if we want to have this feature

hkdobrev commented 10 years ago

@ivank It's not a feature. If a pagination is not preserving the filters it is not a pagination at all.