<commit_before>﻿@model LojaNinja.MVC.Models.PedidoModel

@{
    Layout = null;
    ViewBag.titulo = "Cadastro"
}

<!DOCTYPE html>
<html lang="pt-br">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width" />
    <title>Cadastro</title>
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
</head>
<body>


    @using (Html.BeginForm("Salvar", "Pedido", FormMethod.Post, new { id = "form-pedido" }))
    {
        <div class="form-horizontal">
            <h4>Produto</h4>
            <hr/>
            @Html.ValidationSummary(true, "", new { @class = "text-danger" })

            <div class="form-group">
                @Html.LabelFor(model => model.DataEntrega, htmlAttributes: new { @class = "control-label col-md-2", @placeholder = "dd/MM/YYYY" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.DataEntrega, new { htmlAttributes = new { id = "datepicker", @class = "form-control" } })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.NomeProduto, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.NomeProduto, new { htmlAttributes = new { @class = "form-control", @placeholder = "Ex: kunai" } })
                    @Html.ValidationMessageFor(model => model.NomeProduto, "", new { @class = "text-danger" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Valor, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Valor, new { htmlAttributes = new { @class = "form-control" }, @placeholder = "Ex: 45,50" })
                    @Html.ValidationMessageFor(model => model.Valor, "", new { @class = "text-danger" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.TipoDePagamento, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EnumDropDownListFor(model => model.TipoDePagamento, new { @class = "control-label col-md-2", @placeholder = "Tipo Pagamento" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.NomeCliente, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.NomeCliente, new { htmlAttributes = new { @class = "form-control", @placeholder = "Ex: <NAME>" } })
                    @Html.ValidationMessageFor(model => model.NomeCliente, "", new { @class = "text-danger" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Cidade, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Cidade, new { htmlAttributes = new { @class = "form-control", @placeholder = "Ex: Sâo Leopoldo" } })
                    @Html.ValidationMessageFor(model => model.Cidade, "", new { @class = "text-danger" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Estado, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Estado, new { htmlAttributes = new { @class = "form-control", @placeholder = "Ex: Rio Grande do Sul" } })
                    @Html.ValidationMessageFor(model => model.Estado, "", new { @class = "text-danger" })
                </div>
            </div>

            @Html.HiddenFor(model => model.NumeroPedido);
            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="Create" class="btn btn-default" />
                </div>
            </div>
        </div>
    }
    <div>
        @Html.ActionLink("Back to List", "Index")
    </div>
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script type="text/javascript">
        $.validator.methods.date = function (value, element) {
            var date = new Date(value.replace(/(\d{2})[/](\d{2})[/](\d{4})/, "$2/$1/$3")); //31/12/2015
            return this.optional(element) || !/Invalid|NaN/.test(date.toString());
        }
    </script>
    <script>
        $.validator.methods.number = function (value, element) {
            var regex = /^(\d*)(\,\d{1,2})?$/; //99999,99
            return this.optional(element) || regex.test(value);
        }
    </script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <script src="~/scripts/Custom/comportamento.js"></script>
</body>
</html><commit_msg>refactor(Cadastro): atualizar pagina de cadastro, utilizando layout.<commit_after>﻿@model LojaNinja.MVC.Models.PedidoModel

@section scripts {
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
    <script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
    <script src="~/scripts/Custom/comportamento.js"></script>
    <script src="~/scripts/Custom/formatos.js"></script>
}

@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.titulo = "Cadastro";
}


    @using (Html.BeginForm("Salvar", "Pedido", FormMethod.Post, new { id = "form-pedido" }))
    {
        <div class="form-horizontal">
            <h4>Produto</h4>
            <hr />
            @Html.ValidationSummary(true, "", new { @class = "text-danger" })

            <div class="form-group">
                @Html.LabelFor(model => model.DataEntrega, htmlAttributes: new { @class = "control-label col-md-2", @placeholder = "dd/MM/YYYY" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.DataEntrega, new { htmlAttributes = new { id = "datepicker", @class = "form-control" } })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.NomeProduto, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.NomeProduto, new { htmlAttributes = new { @class = "form-control", @placeholder = "Ex: kunai" } })
                    @Html.ValidationMessageFor(model => model.NomeProduto, "", new { @class = "text-danger" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Valor, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Valor, new { htmlAttributes = new { @class = "form-control" }, @placeholder = "Ex: 45,50" })
                    @Html.ValidationMessageFor(model => model.Valor, "", new { @class = "text-danger" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.TipoDePagamento, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EnumDropDownListFor(model => model.TipoDePagamento, new { @class = "control-label col-md-2", @placeholder = "Tipo Pagamento" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.NomeCliente, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.NomeCliente, new { htmlAttributes = new { @class = "form-control", @placeholder = "Ex: <NAME>" } })
                    @Html.ValidationMessageFor(model => model.NomeCliente, "", new { @class = "text-danger" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Cidade, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Cidade, new { htmlAttributes = new { @class = "form-control", @placeholder = "Ex: Sâo Leopoldo" } })
                    @Html.ValidationMessageFor(model => model.Cidade, "", new { @class = "text-danger" })
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(model => model.Estado, htmlAttributes: new { @class = "control-label col-md-2" })
                <div class="col-md-10">
                    @Html.EditorFor(model => model.Estado, new { htmlAttributes = new { @class = "form-control", @placeholder = "Ex: Rio Grande do Sul" } })
                    @Html.ValidationMessageFor(model => model.Estado, "", new { @class = "text-danger" })
                </div>
            </div>

            @Html.HiddenFor(model => model.NumeroPedido);
            <div class="form-group">
                <div class="col-md-offset-2 col-md-10">
                    <input type="submit" value="Enviar" class="btn btn-default" />
                </div>
            </div>
        </div>
    }
{'fraction_non_alphanumeric': 0.17286629468898532, 'fraction_numerical': 0.010952676172762967, 'mean_word_length': 2.0012403100775193, 'pattern_counts': {'":': 0, '<': 122, '<?xml version=': 0, '>': 162, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, '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': '1118554', 'n_tokens_mistral': 3085, 'n_tokens_neox': 2919, 'n_words': 537}