Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select Category fixed #96

Merged
merged 3 commits into from
Jan 18, 2024
Merged

Select Category fixed #96

merged 3 commits into from
Jan 18, 2024

Conversation

Pomog
Copy link
Owner

@Pomog Pomog commented Jan 18, 2024

No description provided.

@Pomog
Copy link
Owner Author

Pomog commented Jan 18, 2024

internal/handler/moderPanelHanlder.go

	topicID := r.FormValue("topicID")
	selectedCategory := r.FormValue("btnradio" + topicID)

template/moderMain.page.html

                            {{range $index, $category := $categories}}
                            <div class="btn-group" role="group" aria-label="Basic radio toggle button group">
                                <input type="radio" class="btn-check" name="btnradio{{$topicID}}" id="btnradio{{$topicID}}{{$index}}"
                                    autocomplete="off" value="{{$category}}" {{ if eq $category $topicCategory }}
                                    checked {{end}}>
                                <label class="btn btn-outline-primary" for="btnradio{{$topicID}}{{$index}}"> {{$category}} </label>
                                <input type="hidden" name="topicID" value="{{ $topicID }}">
                            </div>
                            {{end}}

@Pomog
Copy link
Owner Author

Pomog commented Jan 18, 2024

throwing an error through the entire chain of functions

@TartuDen TartuDen merged commit 94114ad into main Jan 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants