<commit_before>﻿@model Forum.Models.IMessageFormViewModel

<div asp-validation-summary="ModelOnly" class="error"></div>

<div id="@(!string.IsNullOrEmpty(Model.ElementId) ? Model.ElementId : "message-form")">
	<form method="post"
		  class="message-form"
		  asp-action="@Model.FormAction"
		  asp-controller="@Model.FormController"
		  asp-route-returnurl="@ViewData["Referrer"]">

		<input type="hidden" name="Id" value="@Model.Id" />

		@if (ViewData["Categories"] is List<ViewModels.Boards.Items.IndexCategory>) {
			@foreach (var category in ViewData["Categories"] as List<ViewModels.Boards.Items.IndexCategory>) {
				@foreach (var board in category.Boards) {
					<input type="hidden" name="Selected_@board.Id" value="@(board.Id == Model.BoardId ? "True" : "False")" />
				}
			}
		}

		<div>
			<p class="pad-top">
				<button class="add-bbcode small-button" bbcode="quote">Quote</button>
				<button class="add-bbcode small-button" bbcode="url">Link</button>
				<button class="add-bbcode small-button" bbcode="img">Image</button>
				<button class="add-bbcode small-button" bbcode="code">Code</button>
				<button class="add-bbcode small-button" bbcode="spoiler">Spoiler</button>
				<button class="add-bbcode small-button" bbcode="list">List</button>
				<button class="add-bbcode small-button" bbcode="numlist"># List</button>
			</p>
			<p class="pad-top">
				<button class="add-bbcode small-button" bbcode="bold"><span class="bbc-bold">Bold</span></button>
				<button class="add-bbcode small-button" bbcode="italics"><span class="bbc-italic">Italics</span></button>
				<button class="add-bbcode small-button" bbcode="underline"><span class="bbc-underline">Underline</span></button>
				<button class="add-bbcode small-button" bbcode="strike"><span class="bbc-strike">Strike</span></button>
				<button class="add-bbcode small-button" bbcode="color"><span>Color</span></button>
				<button class="add-bbcode small-button" bbcode="size"><span>Size</span></button>

				<img class="add-smiley pointer align-middle pad-left" src="~/images/smiley.png" alt="Smiley" title="Smiley" />
			</p>

			<p class="pad-top">
				<span class="warning font-small"></span>
				<span class="error" data-valmsg-for="@nameof(Model.Body)"></span>
			</p>
			<p class="pad-top"><textarea asp-for="@Model.Body" name="body"></textarea></p>
		</div>

		<p>
			<button class="save-button" message-id="@Model.Id">Save</button>
			@if(Model.Id != "0") {
				<cancel-button />
			}
		</p>
	</form>
</div><commit_msg>Removed redundant message-form id<commit_after>﻿@model Forum.Models.IMessageFormViewModel

<div asp-validation-summary="ModelOnly" class="error"></div>

<div @Html.Raw(!string.IsNullOrEmpty(Model.ElementId) ? $@"id=""{Model.ElementId}""" : string.Empty)>
	<form method="post"
		  class="message-form"
		  asp-action="@Model.FormAction"
		  asp-controller="@Model.FormController"
		  asp-route-returnurl="@ViewData["Referrer"]">

		<input type="hidden" name="Id" value="@Model.Id" />

		@if (ViewData["Categories"] is List<ViewModels.Boards.Items.IndexCategory>) {
			@foreach (var category in ViewData["Categories"] as List<ViewModels.Boards.Items.IndexCategory>) {
				@foreach (var board in category.Boards) {
					<input type="hidden" name="Selected_@board.Id" value="@(board.Id == Model.BoardId ? "True" : "False")" />
				}
			}
		}

		<div>
			<p class="pad-top">
				<button class="add-bbcode small-button" bbcode="quote">Quote</button>
				<button class="add-bbcode small-button" bbcode="url">Link</button>
				<button class="add-bbcode small-button" bbcode="img">Image</button>
				<button class="add-bbcode small-button" bbcode="code">Code</button>
				<button class="add-bbcode small-button" bbcode="spoiler">Spoiler</button>
				<button class="add-bbcode small-button" bbcode="list">List</button>
				<button class="add-bbcode small-button" bbcode="numlist"># List</button>
			</p>
			<p class="pad-top">
				<button class="add-bbcode small-button" bbcode="bold"><span class="bbc-bold">Bold</span></button>
				<button class="add-bbcode small-button" bbcode="italics"><span class="bbc-italic">Italics</span></button>
				<button class="add-bbcode small-button" bbcode="underline"><span class="bbc-underline">Underline</span></button>
				<button class="add-bbcode small-button" bbcode="strike"><span class="bbc-strike">Strike</span></button>
				<button class="add-bbcode small-button" bbcode="color"><span>Color</span></button>
				<button class="add-bbcode small-button" bbcode="size"><span>Size</span></button>

				<img class="add-smiley pointer align-middle pad-left" src="~/images/smiley.png" alt="Smiley" title="Smiley" />
			</p>

			<p class="pad-top">
				<span class="warning font-small"></span>
				<span class="error" data-valmsg-for="@nameof(Model.Body)"></span>
			</p>
			<p class="pad-top"><textarea asp-for="@Model.Body" name="body"></textarea></p>
		</div>

		<p>
			<button class="save-button" message-id="@Model.Id">Save Message</button>
			@if (Model.Id != "0") {
				<cancel-button />
			}
		</p>
	</form>
</div>
{'fraction_non_alphanumeric': 0.20114828746782815, 'fraction_numerical': 0.0003959611958028113, 'mean_word_length': 4.888111888111888, 'pattern_counts': {'":': 0, '<': 143, '<?xml version=': 0, '>': 143, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6599881', 'n_tokens_mistral': 1968, 'n_tokens_neox': 1697, 'n_words': 280}