package component import ( "forge.cadoles.com/wpetit/clearcase/internal/core/model" "forge.cadoles.com/wpetit/clearcase/internal/http/form" common "forge.cadoles.com/wpetit/clearcase/internal/http/handler/webui/common/component" ) type IssuePageVModel struct { SummaryForm *form.Form IssueForm *form.Form Projects []*model.Project SelectedProjectID string } func NewIssueSummaryForm() *form.Form { return form.New( form.NewField( "project", form.Attrs{}, form.NonEmpty("This field should not be empty"), ), form.NewField( "summary", form.Attrs{ "type": "textarea", "rows": "20", "placeholder": "Write a rapid description of the issue here...", }, form.NonEmpty("This field should not be empty"), ), ) } func NewIssueForm() *form.Form { return form.New( form.NewField( "content", form.Attrs{ "type": "textarea", "rows": "25", }, form.NonEmpty("This field should not be empty"), ), ) } templ IssuePage(vmodel IssuePageVModel) { @common.Page(common.WithTitle("New issue")) {