mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 13:11:19 -03:30
Removes rogue comment and marks JT inventory validation string for translation.
This commit is contained in:
parent
0582079606
commit
0e663921d6
@ -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);
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user