Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using dates as a searchfield #11

Open
jesusbagpuss opened this issue Jul 4, 2016 · 1 comment
Open

Using dates as a searchfield #11

jesusbagpuss opened this issue Jul 4, 2016 · 1 comment

Comments

@jesusbagpuss
Copy link
Contributor

If you add 'dates' to the search config, you get a textbox.
If you add 'dates_date_type' AND 'dates_date', you get check-boxes for the date_types, and a textbox for the date.
Using this doesn't restrict the date entered to the date_type selected.

It would be better if adding 'dates' resulted in a compound field the same as the input fields.

@jesusbagpuss
Copy link
Contributor Author

NB Compound search fields aren't a think in EPrints as far as I can see.

As a work-around you can add search field config to always show help:

  { meta_fields => [qw( dates_date_type ) ], show_help => 'always' },
  { meta_fields => [qw( dates_date ) ], show_help => 'always' },

and define phrases e.g.

<epp:phrase id="searchfield_help_dates_date_type">Select a value from this field, and put the date required in the field below</epp:phrase>
<epp:phrase id="searchfield_help_dates_date">Remember to select a value from the date types above too!</epp:phrase>

If desired, you could add some javascript to the help phrase to tie the fields together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants