|
|
@ -20,6 +20,7 @@ const form = `[green]package[white] main
|
|
|
|
[red]"Administration"[white],
|
|
|
|
[red]"Administration"[white],
|
|
|
|
}, [red]0[white], nil).
|
|
|
|
}, [red]0[white], nil).
|
|
|
|
[yellow]AddCheckbox[white]([red]"On vacation:"[white], false, nil).
|
|
|
|
[yellow]AddCheckbox[white]([red]"On vacation:"[white], false, nil).
|
|
|
|
|
|
|
|
[yellow]AddPasswordField[white]([red]"Password:"[white], [red]""[white], [red]10[white], [red]'*'[white], nil).
|
|
|
|
[yellow]AddButton[white]([red]"Save"[white], [yellow]func[white]() { [blue]/* Save data */[white] }).
|
|
|
|
[yellow]AddButton[white]([red]"Save"[white], [yellow]func[white]() { [blue]/* Save data */[white] }).
|
|
|
|
[yellow]AddButton[white]([red]"Cancel"[white], [yellow]func[white]() { [blue]/* Cancel */[white] })
|
|
|
|
[yellow]AddButton[white]([red]"Cancel"[white], [yellow]func[white]() { [blue]/* Cancel */[white] })
|
|
|
|
tview.[yellow]NewApplication[white]().
|
|
|
|
tview.[yellow]NewApplication[white]().
|
|
|
@ -34,8 +35,9 @@ func Form(nextSlide func()) (title string, content tview.Primitive) {
|
|
|
|
AddInputField("Last name:", "", 20, nil, nil).
|
|
|
|
AddInputField("Last name:", "", 20, nil, nil).
|
|
|
|
AddDropDown("Role:", []string{"Engineer", "Manager", "Administration"}, 0, nil).
|
|
|
|
AddDropDown("Role:", []string{"Engineer", "Manager", "Administration"}, 0, nil).
|
|
|
|
AddCheckbox("On vacation:", false, nil).
|
|
|
|
AddCheckbox("On vacation:", false, nil).
|
|
|
|
|
|
|
|
AddPasswordField("Password:", "", 10, '*', nil).
|
|
|
|
AddButton("Save", nextSlide).
|
|
|
|
AddButton("Save", nextSlide).
|
|
|
|
AddButton("Cancel", nextSlide)
|
|
|
|
AddButton("Cancel", nextSlide)
|
|
|
|
f.SetBorder(true).SetTitle("Employee Information")
|
|
|
|
f.SetBorder(true).SetTitle("Employee Information")
|
|
|
|
return "Forms", Code(f, 36, 13, form)
|
|
|
|
return "Forms", Code(f, 36, 15, form)
|
|
|
|
}
|
|
|
|
}
|
|
|
|