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

WEBUI-186: add validation to save search name and also fix cancel button #1180

Merged
merged 1 commit into from Mar 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 11 additions & 2 deletions elements/search/nuxeo-search-form.js
Expand Up @@ -352,10 +352,19 @@ Polymer({

<nuxeo-dialog id="saveDialog" with-backdrop reparent>
<h3>[[i18n('searchForm.savePopup.heading')]]</h3>
<paper-input id="savedSearchTitle" label="[[i18n('searchForm.savePopup.label')]]" autofocus no-label-float>
<paper-input
id="savedSearchTitle"
label="[[i18n('searchForm.savePopup.label')]]"
autofocus
no-label-float
auto-validate
error-message="[[i18n('searchForm.savePopup.error')]]"
pattern="^[^/]*$"
required
>
</paper-input>
<div class="buttons">
<paper-button class="secondary">[[i18n('command.cancel')]]</paper-button>
<paper-button dialog-dismiss class="secondary">[[i18n('command.cancel')]]</paper-button>
<paper-button noink class="primary" on-tap="_saveSearch">[[i18n('command.save')]]</paper-button>
</div>
</nuxeo-dialog>
Expand Down
1 change: 1 addition & 0 deletions i18n/messages.json
Expand Up @@ -1261,6 +1261,7 @@
"searchForm.renamePopup.heading": "Rename Saved Search",
"searchForm.renamePopup.label": "Enter a new name for your saved search.",
"searchForm.savePopup.heading": "Save Search",
"searchForm.savePopup.error": "You cannot use the character '/' in the name",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, move this line above to keep alphabetical order

"searchForm.savePopup.label": "Enter a name for your saved search.",
"searchForm.searchFilters": "Search Filters",
"searchForm.shared.heading": "Share Saved Search",
Expand Down