landed the "Create Conference" dialog

This commit is contained in:
2026-02-02 16:22:43 -07:00
parent 9d99719b6b
commit 045461a347
5 changed files with 79 additions and 10 deletions
+23
View File
@@ -121,3 +121,26 @@ func EditConference(ctxt ui.AmContext) (string, any, error) {
return "redirect", fmt.Sprintf("/comm/%s/conf/%s/manage", comm.Alias, ctxt.GetScratch("currentAlias")), nil
}
/* CreateConferenceForm displays the dialog for creating a new conference.
* Parameters:
* ctxt - The AmContext for the request.
* Returns:
* Command string dictating what to be rendered.
* Data as a parameter for the command string.
* Standard Go error status.
*/
func CreateConferenceForm(ctxt ui.AmContext) (string, any, error) {
comm := ctxt.CurrentCommunity()
if !comm.TestPermission("Community.Create", ctxt.EffectiveLevel()) {
ctxt.SetRC(http.StatusForbidden)
return ui.ErrorPage(ctxt, ENOPERM)
}
dlg, err := ui.AmLoadDialog("create_conference")
if err != nil {
return ui.ErrorPage(ctxt, err)
}
dlg.SetCommunity(comm)
return dlg.Render(ctxt)
}