﻿@model IssueTrackingSystem2.Web.InputModels.Label.LabelCreateInputModel

@{
    ViewData["Title"] = $"{ValuesConstants.Create} {GlobalConstants.Label}";
}

<h1>@ViewData["Title"]</h1>

<hr />
<div class="row">
    <div class="col-md-4">
        <form asp-action="Create">
            <div asp-validation-summary="ModelOnly" class="text-danger"></div>
            <div class="form-group">
                <label asp-for="Title" class="control-label"></label>
                <input asp-for="Title" class="form-control" />
                <span asp-validation-for="Title" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Description" class="control-label"></label>
                <input asp-for="Description" class="form-control" />
                <span asp-validation-for="Description" class="text-danger"></span>
            </div>
            <div class="form-group">
                <label asp-for="Color" class="control-label"></label>
                <select asp-for="Color"
                        asp-items="@(new SelectList(items: Enum.GetNames(typeof(LabelColors))))"
                        id="color"
                        class="form-control text-success">
                    <option value="0">---Select Color---</option>
                </select>
                @*<jqx-colorpicker instance="Color" height="250" width="250"></jqx-colorpicker>*@
                <span asp-validation-for="Color" class="text-danger"></span>
            </div>
            <div class="form-group">
                <input asp-route-leaderId="@this.ViewData[ValuesConstants.LeaderId]"
                       asp-route-assigneeId="@this.ViewData[ValuesConstants.AssigneeId]"
                       type="submit"
                       value="Create"
                       class="btn btn-primary" />
            </div>
        </form>
    </div>
</div>

<div>
    <a asp-action="Index">Back to List</a>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
