Skip to content

Commit

Permalink
remove "notes" from formTemplate page
Browse files Browse the repository at this point in the history
  • Loading branch information
paolini committed Oct 10, 2023
1 parent 445813f commit ce429af
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions frontend/src/pages/FormTemplatePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ export default function FormTemplatePage() {
<th>Richiede approvazione</th>
<td>{formTemplate.requires_approval?"si":"no"}</td>
</tr>
<tr>
<th>Note</th>
<td>{formTemplate.notes}</td>
</tr>
</tbody></table>
</Card>
<Card>
Expand All @@ -93,13 +89,12 @@ function FormTemplateForm({ submit, formTemplate, isEdit }) {
const [name, setName] = useState(formTemplate.name)
const [require_approval, setRequireApproval] = useState(formTemplate.require_approval)
const [notify_emails, setNotifyEmails] = useState(formTemplate.notify_emails.join(", "))
const [notes, setNotes] = useState(formTemplate.notes || '')
const [text, setText] = useState(formTemplate.text || '')

const [validation, setValidation] = useState({})

function onSubmit() {
submit({ enabled, name, notify_emails, require_approval, notes, text }, setValidation)
submit({ enabled, name, notify_emails, require_approval, text }, setValidation)
}

return <>
Expand Down Expand Up @@ -138,14 +133,6 @@ function FormTemplateForm({ submit, formTemplate, isEdit }) {
value={notify_emails}
onChange={e => setNotifyEmails(e.target.value)}
/>
<Group
validationError={validation.notes}
controlId="notes"
label="Note"
as="textarea"
value={notes}
onChange={e => setNotes(e.target.value)}
/>
<Group
validationError={validation.text}
controlId="text"
Expand All @@ -171,7 +158,6 @@ export function AddFormTemplatePage() {
notify_emails: [],
require_approval: false,
text: '',
notes: '',
}

function submit(data, setErrors) {
Expand Down

0 comments on commit ce429af

Please sign in to comment.