Bug 24847: Select AND by default in items search

In items search form, when clicking on "New field" a new conjunction and search field are added.
It would save time to select AND conjunction by default, like it is in advanced search.

Test plan:
1) Go to items search
2) Click on  "New field"
3) Check that AND is selected

Signed-off-by: Sally <sally.healey@cheshiresharedservices.gov.uk>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Fridolin Somers 2020-03-11 14:00:21 +03:00 committed by Martin Renvoize
parent 45423f4ecd
commit efb7c4c687
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F

View file

@ -270,7 +270,7 @@
copy.find('input,select').not('[type="hidden"]').each(function() {
$(this).val('');
});
copy.find('.form-field-conjunction').prop('disabled', false);
copy.find('.form-field-conjunction').prop('disabled', false).val('and');
form_field.after(copy);
link.remove();
copy.find('select.form-field-column').change();