-
Notifications
You must be signed in to change notification settings - Fork 7
Customize search button and placeholder #94
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
base: main
Are you sure you want to change the base?
Changes from all commits
1f6424d
de7d4c3
21f40fa
6631196
5c5518f
aa37f5b
02b9765
ddd9f78
18fae44
344875f
0f7b676
4cb79a5
00f4327
32864d4
0467825
e36f66d
3361354
f7dd5b0
b5dbe36
e25809c
a846e83
494f4c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,15 +6,16 @@ | |
| <header class="portletHeader" tal:condition="view/title" tal:content="view/title">Title</header> | ||
| <div class="searchContent"> | ||
| <form method="get" name="searchForm" role="form" action="${view/action_url}"> | ||
| <input type="hidden" name="collectionfilter" value="1"/> | ||
| <tal:urlquery repeat="item python:view.urlquery"> | ||
| <input type="hidden" name="${python:item[0]}" value="${python:item[1]}"/> | ||
| </tal:urlquery> | ||
| <input name="SearchableText" type="text" | ||
| placeholder="Search" | ||
| placeholder="${view/settings/placeholder}" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. need the same changes for tiles |
||
| data-url="${view/ajax_url}" | ||
| value="${view/value}" | ||
| i18n:attributes="placeholder text_search"/> | ||
| <button type="submit" i18n:translate="button_search">Search</button> | ||
| <button type="submit" i18n:translate="button_search">${view/settings/button_text}</button> | ||
| </form> | ||
| </div> | ||
| </aside> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,3 +38,9 @@ Scenario: Searching through a portlet with ajax disabled | |
| # and should be 4 filter options | ||
|
|
||
|
|
||
| Scenario: Customize search porlet text with ajax disabled | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needs to be rebased against the testing branch. There aren't tests specific to portlets anymore. The same test should work for tiles and portlets |
||
| Given I've got a site with a collection | ||
| and my collection has a collection search portlet | ||
| When I'm viewing the collection | ||
| Then I should see the search portlet search button displays the text "Click to search" | ||
| and I should see the search portlet placeholder displays the text "Enter some keyword" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have no default so the default will be translated based on the language of the site.
Same as the button text