grocy/views/shoppinglocationform.blade.php
Zack Arnett 4629df17b4
Cosmetic Update (#753)
* UI changes

* New (header) style was missing on some pages

* Added/changed new localization strings

* Unify page titles / apply .title class everywhere

* Reduce spacing below page title

Co-authored-by: Bernd Bestel <bernd@berrnd.de>
2020-04-19 14:51:02 +02:00

50 lines
1.3 KiB
PHP

@extends('layout.default')
@if($mode == 'edit')
@section('title', $__t('Edit store'))
@else
@section('title', $__t('Create store'))
@endif
@section('viewJsName', 'shoppinglocationform')
@section('content')
<div class="row">
<div class="col">
<h2 class="title">@yield('title')</h2>
<hr>
</div>
</div>
<div class="row">
<div class="col-lg-6 col-xs-12">
<script>Grocy.EditMode = '{{ $mode }}';</script>
@if($mode == 'edit')
<script>Grocy.EditObjectId = {{ $shoppinglocation->id }};</script>
@endif
<form id="shoppinglocation-form" novalidate>
<div class="form-group">
<label for="name">{{ $__t('Name') }}</label>
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $shoppinglocation->name }}@endif">
<div class="invalid-feedback">{{ $__t('A name is required') }}</div>
</div>
<div class="form-group">
<label for="description">{{ $__t('Description') }}</label>
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $shoppinglocation->description }}@endif</textarea>
</div>
@include('components.userfieldsform', array(
'userfields' => $userfields,
'entity' => 'shopping_locations'
))
<button id="save-shopping-location-button" class="btn btn-success">{{ $__t('Save') }}</button>
</form>
</div>
</div>
@stop