@using InventoryTraker.Web.Helpers
@model InventoryTraker.Web.Models.ProfileForm
<form novalidate
	  name="vm.form"
	  ng-submit="vm.form.$valid && vm.save()">
	<fieldset ng-disabled="vm.saving">
        <div class="panel">
            <div class="panel-body">

                <status-message message="vm.statusMessage"></status-message>
                <error-list errors="vm.errorMessages"></error-list>
                <div class="alert alert-success" ng-show="vm.success && vm.form.$pristine">
                    <span class="fa fa-check"></span>
                    Changes saved
                </div>

                @Html.Angular().FormForModel("vm.profile")

            </div>

            <div class="panel-footer">
                <button class="btn btn-success" ng-disabled="vm.form.$invalid || vm.form.$pristine">Save</button>
                <a class="btn btn-default" href="/">Cancel</a>
            </div>

        </div>
	</fieldset>
</form>