mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 18:37:36 -02:30
Removes rogue comment and marks JT inventory validation string for translation.
This commit is contained in:
@@ -17,8 +17,6 @@ const QS_CONFIG = getQSConfig('inventory', {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function InventoryLookup({ value, onChange, onBlur, required, i18n, history }) {
|
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 [inventories, setInventories] = useState([]);
|
||||||
const [count, setCount] = useState(0);
|
const [count, setCount] = useState(0);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
|
|||||||
@@ -1370,15 +1370,16 @@ const FormikApp = withFormik({
|
|||||||
setErrors(errors);
|
setErrors(errors);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
validate: values => {
|
validate: (values, { i18n }) => {
|
||||||
const errors = {};
|
const errors = {};
|
||||||
|
|
||||||
if (
|
if (
|
||||||
(!values.inventory || values.inventory === '') &&
|
(!values.inventory || values.inventory === '') &&
|
||||||
!values.ask_inventory_on_launch
|
!values.ask_inventory_on_launch
|
||||||
) {
|
) {
|
||||||
errors.inventory =
|
errors.inventory = i18n._(
|
||||||
'Please select an Inventory or check the Prompt on Launch option.';
|
t`Please select an Inventory or check the Prompt on Launch option.`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return errors;
|
return errors;
|
||||||
|
|||||||
Reference in New Issue
Block a user