diff --git a/src/objects/js/components/admin/permissions/permission-form.js b/src/objects/js/components/admin/permissions/permission-form.js index 7c02bdc2..f7e4b5ac 100644 --- a/src/objects/js/components/admin/permissions/permission-form.js +++ b/src/objects/js/components/admin/permissions/permission-form.js @@ -65,6 +65,7 @@ const PermissionForm = ({objectFields, tokenChoices, objecttypeChoices, modeChoi id="id_object_type" label="Object type:" choices={objecttypeChoices} + helpText="Changing the Object type will not maintain the previously selected authorization fields." initialValue={values["object_type"]} errors={errors["object_type"]} onChange={(value) => { diff --git a/src/objects/js/components/forms/inputs.js b/src/objects/js/components/forms/inputs.js index cde6f68e..915a0760 100644 --- a/src/objects/js/components/forms/inputs.js +++ b/src/objects/js/components/forms/inputs.js @@ -3,7 +3,7 @@ import React, { useState } from "react"; import { ErrorList } from "./error-list"; -const CheckboxInput = ({name, id, value, label, disabled, onChange}) => { +const CheckboxInput = ({name, id, value, label, disabled, onChange, helpText}) => { return (
{ }} /> {label ? : null} + {helpText ?
{helpText}
: null}
); }; -const TextInput = ({id, name, value, label, onChange, hidden}) => { +const TextInput = ({id, name, value, label, onChange, hidden, helpText}) => { return (
@@ -41,12 +42,13 @@ const TextInput = ({id, name, value, label, onChange, hidden}) => { }} value={value} /> + {helpText ?
{helpText}
: null}
); }; -const SelectInput = ({choices, name, id, label, onChange, initialValue, errors}) => { +const SelectInput = ({choices, name, id, label, onChange, initialValue, errors, helpText}) => { const [currentValue, setCurrentValue] = useState(initialValue || ""); const [_errors, setErrors] = useState(errors || []); @@ -74,6 +76,7 @@ const SelectInput = ({choices, name, id, label, onChange, initialValue, errors}) > {options} + {helpText ?
{helpText}
: null} ) }