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

fixing filter for Results By Username #10980

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions doc/release-notes/7239-mydata-results-by-username.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## Fix My Data filter results by username for Administrators

The filtering for the username on the MyData page was not working. This is only available for superusers. This fixes the "Results for Username" field to return the data for the desired user. See also #7239 and #10980.
6 changes: 3 additions & 3 deletions src/main/webapp/mydata_fragment.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@
<div id="div-search-params" class="well" style="display:none;"></div>
</div><!-- end: filter column -->
<!-- start: workspace column -->
<div class="col-xs-9">
<div class="col-xs-9" id="my_data_filter_column3">
<div class="text-right" style="" jsf:rendered="#{MyDataPage.isSuperuser()}">
#{bundle['mydataFragment.resultsByUserName']}
<input type="text" name="userIdentifier" id="userIdentifier" value="#{MyDataPage.getAuthUserIdentifier()}" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all"/>
<input type="text" name="userIdentifier" id="userIdentifier" value="#{MyDataPage.getAuthUserIdentifier()}" class="ui-inputfield ui-inputtext ui-widget ui-state-default ui-corner-all search-input"/>
</div>
<div id="div-pagination"></div>
<!--<div id="div-test-json" class="well">(pagination)</div>-->
Expand Down Expand Up @@ -150,4 +150,4 @@
</script>
</div><!-- end panel body -->
</div><!-- end panel -->
</ui:composition>
</ui:composition>
2 changes: 1 addition & 1 deletion src/main/webapp/resources/js/mydata.js
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ function submit_my_data_search(){
// --------------------------------
// ah, but with the horribly coded xhtml page, we can't use form tags...
//var formData = $('#mydata_filter_form').serialize();
var formData = $("#my_data_filter_column :input").serialize() + '&' + $("#my_data_filter_column2 :input").serialize() ;
var formData = $("#my_data_filter_column :input").serialize() + '&' + $("#my_data_filter_column3 :input").serialize()+ '&' + $("#my_data_filter_column2 :input").serialize() ;

// For debugging, show the search params
if (MYDATA_DEBUG_ON){
Expand Down