Discussion:
[Mayan EDMS: 2614] Customize the search form
(too old to reply)
LeVon Smoker
2018-07-31 18:17:45 UTC
Permalink
Is there a good way to do this to...
- change the field labels
- add a custom search widget (autocomplete)

As always, I don't want to hack the original source code...

Thanks.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2018-08-08 21:11:44 UTC
Permalink
Autocomplete is possible but will require a new API to return the top
result values so that a smart widget like Select2 could display them.
Possible but requires code changes.

What do you mean by "change the field labels"? Can you expand on this? This
one might be simpler to implement.
Post by LeVon Smoker
Is there a good way to do this to...
- change the field labels
- add a custom search widget (autocomplete)
As always, I don't want to hack the original source code...
Thanks.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
LeVon Smoker
2018-08-09 18:51:06 UTC
Permalink
Using a custom app, I overrode (is that a word?) the appearance/home.html
template to point at my own url on the Advanced button ({% url
'my_overrides:search_advanced' search_model='documents.Document' %}). From
there it was creating custom versions of AdvancedSearchForm,
AdvancedSearchView, and ResultsView to get what I wanted. My version of
AdvancedSearchForm adds a ModelMultipleChoiceField which provides an
autocomplete way to find specific documents.

In my AdvancedSearchForm, I was able to change the label on a field - Label
- to Name (users were confused - "where's the document name?")
Post by Roberto Rosario
Autocomplete is possible but will require a new API to return the top
result values so that a smart widget like Select2 could display them.
Possible but requires code changes.
What do you mean by "change the field labels"? Can you expand on this?
This one might be simpler to implement.
Post by LeVon Smoker
Is there a good way to do this to...
- change the field labels
- add a custom search widget (autocomplete)
As always, I don't want to hack the original source code...
Thanks.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Roberto Rosario
2018-08-20 04:28:56 UTC
Permalink
"I overrode (is that a word?)" I'm not a native speaker, my guess is as
good as yours :D

Thanks for sharing your customization. I'll see if we can add some of your
changes so you don't have to rewrite all from scratch on the next update.
Post by LeVon Smoker
Using a custom app, I overrode (is that a word?) the appearance/home.html
template to point at my own url on the Advanced button ({% url
'my_overrides:search_advanced' search_model='documents.Document' %}). From
there it was creating custom versions of AdvancedSearchForm,
AdvancedSearchView, and ResultsView to get what I wanted. My version of
AdvancedSearchForm adds a ModelMultipleChoiceField which provides an
autocomplete way to find specific documents.
In my AdvancedSearchForm, I was able to change the label on a field -
Label - to Name (users were confused - "where's the document name?")
Post by Roberto Rosario
Autocomplete is possible but will require a new API to return the top
result values so that a smart widget like Select2 could display them.
Possible but requires code changes.
What do you mean by "change the field labels"? Can you expand on this?
This one might be simpler to implement.
Post by LeVon Smoker
Is there a good way to do this to...
- change the field labels
- add a custom search widget (autocomplete)
As always, I don't want to hack the original source code...
Thanks.
--
---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mayan-edms+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...