landed the "Create Conference" dialog
This commit is contained in:
@@ -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
|
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)
|
||||||
|
}
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ func setupEcho() *echo.Echo {
|
|||||||
commGroup.POST("/admin/logo", ui.AmWrap(EditCommunityLogo))
|
commGroup.POST("/admin/logo", ui.AmWrap(EditCommunityLogo))
|
||||||
|
|
||||||
// conference group
|
// conference group
|
||||||
|
commGroup.GET("/create_conf", ui.AmWrap(CreateConferenceForm))
|
||||||
commGroup.GET("/conf", ui.AmWrap(Conferences), ui.ValidateConference)
|
commGroup.GET("/conf", ui.AmWrap(Conferences), ui.ValidateConference)
|
||||||
confGroup := commGroup.Group("/conf/:confid", ui.ValidateConference, ui.SetConference)
|
confGroup := commGroup.Group("/conf/:confid", ui.ValidateConference, ui.SetConference)
|
||||||
confGroup.GET("", ui.AmWrap(Topics))
|
confGroup.GET("", ui.AmWrap(Topics))
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
#
|
||||||
|
# Amsterdam Web Communities System
|
||||||
|
# Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved
|
||||||
|
#
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||||
|
#
|
||||||
|
name: "conf.create"
|
||||||
|
formName: "newconfform"
|
||||||
|
menuSelector: "community"
|
||||||
|
title: "Create New Conference"
|
||||||
|
action: "/comm/[CID]/create_conf"
|
||||||
|
fields:
|
||||||
|
- type: "text"
|
||||||
|
name: "name"
|
||||||
|
caption: "Conference Name"
|
||||||
|
required: true
|
||||||
|
size: 32
|
||||||
|
maxlength: 128
|
||||||
|
- type: "ams_id"
|
||||||
|
name: "alias"
|
||||||
|
caption: "Conference Alias"
|
||||||
|
required: true
|
||||||
|
size: 32
|
||||||
|
maxlength: 64
|
||||||
|
- type: "text"
|
||||||
|
name: "descr"
|
||||||
|
caption: "Description"
|
||||||
|
required: false
|
||||||
|
size: 32
|
||||||
|
maxlength: 255
|
||||||
|
- type: "dropdown"
|
||||||
|
name: "ctype"
|
||||||
|
caption: "Conference type"
|
||||||
|
required: true
|
||||||
|
choices:
|
||||||
|
- id: "0"
|
||||||
|
text: "Public"
|
||||||
|
default: true
|
||||||
|
- id: "1"
|
||||||
|
text: "Private"
|
||||||
|
- type: "checkbox"
|
||||||
|
name: "hide"
|
||||||
|
caption: "Hide conference in the community's conference list"
|
||||||
|
- type: "button"
|
||||||
|
name: "create"
|
||||||
|
caption: "Create"
|
||||||
|
param: "blue"
|
||||||
|
- type: "button"
|
||||||
|
name: "cancel"
|
||||||
|
caption: "Cancel"
|
||||||
|
param: "red"
|
||||||
@@ -1,14 +1,6 @@
|
|||||||
#
|
#
|
||||||
# Amsterdam Web Communities System
|
# Amsterdam Web Communities System
|
||||||
# Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved
|
# Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved
|
||||||
#
|
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# Amsterdam Web Communities System
|
|
||||||
# Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved
|
|
||||||
#
|
#
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if canCreate }}
|
{{ if canCreate }}
|
||||||
<a href="TODO"
|
<a href="/comm/{{ commAlias }}/create_conf"
|
||||||
class="inline-block bg-green-600 hover:bg-green-700 text-white px-6 py-2 rounded font-medium transition-colors">
|
class="inline-block bg-green-600 hover:bg-green-700 text-white px-6 py-2 rounded font-medium transition-colors">
|
||||||
Create New
|
Create New
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user