Files
marechai/Marechai/Areas/Admin/Views/Companies/Edit.cshtml

154 lines
6.3 KiB
Plaintext

@{
/******************************************************************************
// MARECHAI: Master repository of computing history artifacts information
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2020 Natalia Portillo
*******************************************************************************/
}
@using Marechai.Database
@model Marechai.Database.Models.Company
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>Company</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger">
</div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Name" class="control-label">
</label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Founded" class="control-label">
</label>
<input asp-for="Founded" class="form-control" />
<span asp-validation-for="Founded" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Website" class="control-label">
</label>
<input asp-for="Website" class="form-control" />
<span asp-validation-for="Website" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Twitter" class="control-label">
</label>
<input asp-for="Twitter" class="form-control" />
<span asp-validation-for="Twitter" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Facebook" class="control-label">
</label>
<input asp-for="Facebook" class="form-control" />
<span asp-validation-for="Facebook" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Sold" class="control-label">
</label>
<input asp-for="Sold" class="form-control" />
<span asp-validation-for="Sold" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="SoldTo" class="control-label">
</label>
<select asp-for="SoldToId" class="form-control" asp-items="ViewBag.SoldToId">
<option value="">None or unknown</option>
</select>
<span asp-validation-for="SoldToId" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Address" class="control-label">
</label>
<input asp-for="Address" class="form-control" />
<span asp-validation-for="Address" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="City" class="control-label">
</label>
<input asp-for="City" class="form-control" />
<span asp-validation-for="City" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Province" class="control-label">
</label>
<input asp-for="Province" class="form-control" />
<span asp-validation-for="Province" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="PostalCode" class="control-label">
</label>
<input asp-for="PostalCode" class="form-control" />
<span asp-validation-for="PostalCode" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="CountryId" class="control-label">
</label>
<select asp-for="CountryId" class="form-control" asp-items="ViewBag.CountryId">
</select>
<span asp-validation-for="CountryId" class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Status" class="control-label">
</label>
<select asp-for="Status" class="form-control" asp-items="Html.GetEnumSelectList<CompanyStatus>().OrderBy(s => s.Text)">
</select>
<span asp-validation-for="Status" class="text-danger">
</span>
</div>
<div class="form-group">
<input class="btn btn-primary" type="submit" value="Save" />
<a asp-action="Index" class="btn btn-secondary">
Back to List
</a>
</div>
</form>
</div>
</div>
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}