Skip to content

Commit 347dfb5

Browse files
committed
Adding community checkbox
1 parent 3af42fa commit 347dfb5

File tree

6 files changed

+33
-8
lines changed

6 files changed

+33
-8
lines changed

compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ services:
2929
submit:
3030
build:
3131
context: .
32-
dockerfile: src/main/docker/Dockerfile.jvm
32+
dockerfile: Dockerfile
3333
ports:
3434
- "8080:8080"
3535
env_file:

src/main/java/no/java/submit/form/SessionForm.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public class SessionForm {
4949

5050
public Category suggestedCategory;
5151

52+
public boolean interestedInLocalCommunity;
53+
5254
@AssertTrue(message = "Must select a valid option")
5355
// Make sure one of the active kinds are selected
5456
private boolean isKind() {
@@ -79,6 +81,7 @@ public Map<String, TalksService.DataField<Object>> toData() {
7981
result.put("suggestedKeywords", new TalksService.DataField<>(false, suggestedKeywords));
8082
result.put("infoToProgramCommittee", new TalksService.DataField<>(true, infoToProgramCommittee));
8183
result.put("suggestedCategory", new TalksService.DataField<>(true, suggestedCategory != null ? suggestedCategory.tag : ""));
84+
result.put("interestedInLocalCommunity", new TalksService.DataField<>(true, interestedInLocalCommunity));
8285

8386
if (kind.isWorkshop())
8487
result.put("workshopPrerequisites", new TalksService.DataField<>(false, workshopPrerequisites));
@@ -115,6 +118,8 @@ public static SessionForm parse(TalksService.Session source) {
115118
result.infoToProgramCommittee = (String) source.data.get("infoToProgramCommittee").value;
116119
if (source.data.containsKey("suggestedCategory"))
117120
result.suggestedCategory = Category.of((String) source.data.get("suggestedCategory").value);
121+
if (source.data.containsKey("interestedInLocalCommunity"))
122+
result.interestedInLocalCommunity = Boolean.parseBoolean(source.data.get("interestedInLocalCommunity").value.toString());
118123

119124
result.speakers = source.speakers.stream().map(SpeakerForm::parse).toList();
120125

src/main/java/no/java/submit/util/SessionHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static List<String> getTags(TalksService.Session session) {
3030
}
3131

3232
static void partialUpdate(TalksService.Session session, TalksService.Session updates) {
33-
for (var key : Arrays.asList("title", "abstract", "outline", "intendedAudience", "equipment", "participation", "workshopPrerequisites", "suggestedKeywords", "infoToProgramCommittee")) {
33+
for (var key : Arrays.asList("title", "abstract", "outline", "intendedAudience", "equipment", "participation", "workshopPrerequisites", "suggestedKeywords", "infoToProgramCommittee", "interestedInLocalCommunity")) {
3434
if (updates.data.containsKey(key))
3535
session.data.put(key, updates.data.get(key));
3636
else

src/main/resources/application.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ quarkus.http.auth.permission.authenticated.policy=authenticated
1313
# Cache
1414
quarkus.cache.caffeine."sessions".expire-after-write=5m
1515

16-
# Timeline, 2025
17-
conference.current=ffbdc06b-b570-4409-bf2f-7d3b5dd2aed3
18-
timeline.opening=2025-02-14T00:00:00Z
19-
timeline.closing=2025-04-28T23:59:59Z
20-
timeline.feedback=2025-06-30T00:00:00Z
21-
timeline.refund=2025-08-01T00:00:00Z
16+
# Timeline, 2026
17+
conference.current=95759742-2a8c-4542-9eb0-7c52f598a3da
18+
timeline.opening=2025-12-31T23:00:00Z
19+
timeline.closing=2026-04-14T23:00:00Z
20+
timeline.feedback=2026-06-30T00:00:00Z
21+
timeline.refund=2026-08-01T00:00:00Z
2222

2323

2424
# Production configuration

src/main/resources/templates/partial/forms.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,18 @@
3131
<div class="message error">{v.message}</div>
3232
{/for}
3333
{/if}
34+
{/fragment}
35+
36+
{#fragment checkbox}
37+
{@Boolean disabled=false}
38+
<div class="field{#if val.containsKey(path)} error{/if}">
39+
<label for="form-{path}" class="checkbox">
40+
<input type="checkbox" name="{path}" id="form-{path}" value="true"{#if value} checked="checked"{/if}{#if disabled} disabled="disabled"{/if}/>
41+
{title}
42+
</label>
43+
{#if description != null}
44+
<p>{description}</p>
45+
{/if}
46+
{#include partial/forms$validation /}
47+
</div>
3448
{/fragment}

src/main/resources/templates/sessionForm.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,12 @@ <h2>Internal information (not public)</h2>
101101

102102
<p>All talks at JavaZone are filmed, live-streamed and published for free at Vimeo after the conference. Should you have any reservations about this, let the program committee know in the field above. This might affect your chance of getting selected, but if you have a good reason please let us know.</p>
103103

104+
{#include partial/forms$checkbox
105+
title="I am/we are open to presenting this talk at a local community meetup."
106+
path="interestedInLocalCommunity"
107+
value=form.interestedInLocalCommunity
108+
description="javaBin organizes meetups in local communities across Norway. By checking this box, you indicate that you’d be open to presenting this talk at one of our local user groups, regardless of whether it is accepted for JavaZone. If this happens, javaBin will cover reasonable travel and accommodation expenses. This option is also available to international speakers." /}
109+
104110
<div id="speakers">
105111
{#for speaker in form.speakers}
106112
{#fragment id=speaker}

0 commit comments

Comments
 (0)