Removes rogue comment and marks JT inventory validation string for translation.

This commit is contained in:
mabashian 2020-02-19 15:50:12 -05:00
parent 0582079606
commit 0e663921d6
2 changed files with 4 additions and 5 deletions

View File

@ -17,8 +17,6 @@ const QS_CONFIG = getQSConfig('inventory', {
});
function InventoryLookup({ value, onChange, onBlur, required, i18n, history }) {
// some stuff was stripped out of this component - need to propagate those changes
// out to other forms that use this lookup
const [inventories, setInventories] = useState([]);
const [count, setCount] = useState(0);
const [error, setError] = useState(null);

View File

@ -1370,15 +1370,16 @@ const FormikApp = withFormik({
setErrors(errors);
}
},
validate: values => {
validate: (values, { i18n }) => {
const errors = {};
if (
(!values.inventory || values.inventory === '') &&
!values.ask_inventory_on_launch
) {
errors.inventory =
'Please select an Inventory or check the Prompt on Launch option.';
errors.inventory = i18n._(
t`Please select an Inventory or check the Prompt on Launch option.`
);
}
return errors;