Skip to content

Commit

Permalink
Merge pull request #576 from portagenetwork/aaron/issues/552
Browse files Browse the repository at this point in the history
Fix "undefined" Tooltip Messages
  • Loading branch information
aaronskiba authored Jan 12, 2024
2 parents 66d91a1 + ced5718 commit 174947f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@

### Fixed

- Fixed tooltips that were previously rendering 'undefined' as their message [#552](https://github.com/portagenetwork/roadmap/issues/552)

- Patched a validation check to enable updates for all existing DMP Assistant Orgs [#587](https://github.com/portagenetwork/roadmap/issues/587)

- Fix duplicate guidance choices [#560](https://github.com/portagenetwork/roadmap/issues/560)
Expand Down
3 changes: 2 additions & 1 deletion app/javascript/src/utils/requiredField.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import getConstant from './constants';
import { isObject } from './isType';

const asterisk = `<span class="red" title="${getConstant('REQUIRED_FIELD_TEXT')}">* </span>`;
var asterisk;

export const addAsterisk = (el) => {
const target = $(el);
Expand Down Expand Up @@ -32,5 +32,6 @@ export const addAsterisks = (el) => {
};

$(() => {
asterisk = `<span class="red" title="${getConstant('REQUIRED_FIELD_TEXT')}">* </span>`;
addAsterisks('body');
});
1 change: 1 addition & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
MAX_NUMBER_GUIDANCE_SELECTIONS: 6,

REQUIRED_FIELD_TEXT: _('This field is required.'),
VALIDATION_MESSAGE_PASSWORDS_MATCH: _('The passwords must match.'),

SHOW_PASSWORD_MESSAGE: _('Show password'),
SHOW_SELECT_ORG_MESSAGE: _('Select an organisation from the list.'),
Expand Down

0 comments on commit 174947f

Please sign in to comment.