Skip to content
Open
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
6 changes: 5 additions & 1 deletion src/lib/forms/FeedbackLabel.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ import { InvenioPopup } from "../elements/accessibility";
import PropTypes from "prop-types";
import { Field } from "formik";

const ORIGIN_ICONS = {
orcha: "fire blue",
};

export class FeedbackLabel extends Component {
getAllErrSubPaths = (obj, prev = "") => {
const result = [];
Expand Down Expand Up @@ -80,7 +84,7 @@ export class FeedbackLabel extends Component {
<InvenioPopup
popupId={`invenio-form-feedback-error-${fieldPath}`}
ariaLabel="Form field feedback error"
trigger={<Icon name={icon} />}
trigger={<Icon name={ORIGIN_ICONS[error.origin] || icon} />}
// Rule descriptions can contain HTML to link to a page with more details about the rule.
// This field is sanitized in the backend with SanitizedHTML.
content={<span dangerouslySetInnerHTML={{ __html: error.description }} />}
Expand Down
Loading