able to display the "Edit Conference" dialog

This commit is contained in:
2026-02-01 23:16:58 -07:00
parent 2c55eef7bf
commit 17af0192f4
10 changed files with 335 additions and 13 deletions
+8 -1
View File
@@ -1,6 +1,6 @@
/*
* 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
@@ -238,6 +238,13 @@ func (d *Dialog) SetCommunity(comm *database.Community) {
}
}
// SetConference alters a dialog's content to reflect the conference.
func (d *Dialog) SetConference(conf *database.Conference, alias string) {
d.Title = strings.ReplaceAll(d.Title, "[CONFNAME]", conf.Name)
d.Subtitle = strings.ReplaceAll(d.Subtitle, "[CONFNAME]", conf.Name)
d.Action = strings.ReplaceAll(d.Action, "[CONFID]", alias)
}
/* Field returns a pointer to a dialog's field, given its name.
* Parameters:
* name - The name of the field to find.
+96
View File
@@ -0,0 +1,96 @@
#
# 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
# 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
# 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.edit"
formName: "editconfform"
menuSelector: "community"
title: "Edit Conference:"
subtitle: "[CONFNAME]"
action: "/comm/[CID]/conf/[CONFID]/edit"
fields:
- type: "header"
name: "header1"
caption: "Basic Information"
- type: "text"
name: "name"
caption: "Conference Name"
required: true
size: 32
maxlength: 128
- type: "text"
name: "descr"
caption: "Description"
required: false
size: 32
maxlength: 255
- type: "checkbox"
name: "hide"
caption: "Hide conference in the community's conference list"
- type: "header"
name: "header2"
caption: "Security Information"
- type: "rolelist"
name: "read_lvl"
caption: "Security level required to read conference"
required: true
param: "Conference.Read"
- type: "rolelist"
name: "post_lvl"
caption: "Security level required to post to conference"
required: true
param: "Conference.Post"
- type: "rolelist"
name: "create_lvl"
caption: "Security level required to create new topics in conference"
required: true
param: "Conference.Create"
- type: "rolelist"
name: "hide_lvl"
caption: "Security level required to archive or freeze topics"
subcaption: "(or to hide posts of which you are not the owner)"
required: true
param: "Conference.Hide"
- type: "rolelist"
name: "nuke_lvl"
caption: "Security level required to delete topics or nuke posts"
subcaption: "(or to scribble posts of which you are not the owner)"
required: true
param: "Conference.Nuke"
- type: "rolelist"
name: "change_lvl"
caption: "Security level required to change conference attributes"
required: true
param: "Conference.Change"
- type: "rolelist"
name: "delete_lvl"
caption: "Security level required to delete conference"
required: true
param: "Conference.Delete"
- type: "header"
name: "header3"
caption: "Conference Properties"
- type: "checkbox"
name: "pic_in_post"
caption: "Display users' pictures next to their posts"
subcaption: "(user can override)"
- type: "button"
name: "update"
caption: "Update"
param: "blue"
- type: "button"
name: "cancel"
caption: "Cancel"
param: "red"
+1 -1
View File
@@ -92,7 +92,7 @@ menudefs:
conference. Use with care and review all changes before applying them to the conference.
items:
- text: "Change Conference Information"
link: "/TODO/comm/[CID]/conf/[CONFID]/info"
link: "/comm/[CID]/conf/[CONFID]/edit"
- text: "Manage Conference Aliases"
link: "/TODO/comm/[CID]/conf/[CONFID]/aliases"
- text: "Manage Conference Members"
+7 -5
View File
@@ -1,6 +1,6 @@
{*
* 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
@@ -9,10 +9,12 @@
<!-- BEGIN DIALOG {{ amsterdam_dialog.Name }} -->
<div class="p-4">
<div class="mb-6">
<h1 class="text-blue-800 text-4xl font-bold mb-2">{{ amsterdam_dialog.Title }}</h1>
{{ if amsterdam_dialog.Subtitle != "" }}
<span class="text-blue-800 text-2xl font-bold ml-2">{{ amsterdam_dialog.Subtitle }}</span>
{{ end }}
<div class=" flex items-baseline gap-2">
<h1 class="text-blue-800 text-4xl font-bold mb-2">{{ amsterdam_dialog.Title }}</h1>
{{ if amsterdam_dialog.Subtitle != "" }}
<span class="text-blue-800 text-2xl font-bold ml-2">{{ amsterdam_dialog.Subtitle }}</span>
{{ end }}
</div>
<hr class="border-2 border-gray-400 w-4/5 mb-4">
</div>
<form name="{{ amsterdam_dialog.FormName }}" method="POST" action="{{ amsterdam_dialog.Action }}" class="max-w-2xl">