Skip to content

Commit

Permalink
Fixed a bug where, if a user tried to use filters in the Translation …
Browse files Browse the repository at this point in the history
…section and pressed the Enter key, Translation mode was activated instead of updating the filters

Manual merge of PR: Aspen-Discovery#1882
  • Loading branch information
mdnoble73 committed Jul 29, 2024
1 parent ab03396 commit cf3b38e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</div>
</div>

<form class="form" id="translationSettings">
<form class="form" id="serverOptions">
<div class="row">
<div class="col-xs-12 col-md-3">
<label for="showErrorsOnly">{translate text='Show Errors Only' isAdminFacing=true}</label>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
{strip}
<div id="main-content" class="col-md-12">
<h1>{translate text="Translations" isAdminFacing=true}</h1>
<form class="form" id="translationSettings">
<form class="form" id="translationSettingsToolbar">
<div class="form-group">
{if !empty($translationModeActive)}
<button class="btn btn-primary" type="submit" name="stopTranslationMode">{translate text="Exit Translation Mode" isAdminFacing=true}</button>
<button class="btn btn-primary" name="stopTranslationMode" onclick="return AspenDiscovery.changeTranslationMode(false)">{translate text="Exit Translation Mode" isAdminFacing=true}</button>
{else}
<button class="btn btn-primary" type="submit" name="startTranslationMode">{translate text="Start Translation Mode" isAdminFacing=true}</button>
<button class="btn btn-primary"name="startTranslationMode" onclick="return AspenDiscovery.changeTranslationMode(true)">{translate text="Start Translation Mode" isAdminFacing=true}</button>
{/if}

<button class="btn btn-primary" type="submit" name="exportAllTranslations">{translate text="Export All Translations" isAdminFacing=true}</button>
<button class="btn btn-primary" type="submit" name="exportForBulkTranslation">{translate text="Export For Bulk Translation" isAdminFacing=true}</button>
<a class="btn btn-primary" id="importTranslations" href="/Translation/ImportTranslations">{translate text="Import Translations" isAdminFacing=true}</a>
<a class="btn btn-primary" id="importBulkTranslations" href="/Translation/ImportBulkTranslations">{translate text="Import Bulk Translations" isAdminFacing=true}</a>
</div>
</form>

<form class="form" id="translationSettings">
<div class="form-group">
<input type="checkbox" name="hideTranslated" id="hideTranslated" {if !empty($showTranslated)}checked{/if}>&nbsp;
<label for="hideTranslated">{translate text="Hide terms that have been translated already" isAdminFacing=true}</label>
Expand Down
2 changes: 1 addition & 1 deletion code/web/interface/themes/responsive/js/aspen.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion code/web/interface/themes/responsive/js/aspen/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ var AspenDiscovery = (function(){

changeTranslationMode: function(start){
var url = window.location.href;
url = url.replace(/[&?](start|stop)TranslationMode=true/, '');
url = url.replace(/[&?](start|stop)TranslationMode=(true)?/, '');
if (start) {
url = this.buildUrl(url,'startTranslationMode', 'true');
}else{
Expand Down
4 changes: 3 additions & 1 deletion code/web/release_notes/24.08.00.MD
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ To generate the passkey file, the following command should be run (as root):
`php /usr/local/aspen-discovery/code/web/cron/createKeyFile.php <serverName>`

// lucas

### Other Updates
- Fixed a bug where, if a user tried to use filters in the Translation section and pressed the Enter key, Translation mode was activated instead of updating the filters. (Ticket 117950) (*LM, MDN*)
-
// James Staub
### Reports
- Nashville-specific: Circulation Holds Report now includes item-level holds (*JStaub*)
Expand Down

0 comments on commit cf3b38e

Please sign in to comment.