Files
grocy/views/locationform.blade.php

39 lines
1.1 KiB
PHP
Raw Normal View History

2018-04-11 19:49:35 +02:00
@extends('layout.default')
2018-04-12 21:13:38 +02:00
@if($mode == 'edit')
2018-04-16 19:11:32 +02:00
@section('title', $L('Edit location'))
2018-04-12 21:13:38 +02:00
@else
2018-04-16 19:11:32 +02:00
@section('title', $L('Create location'))
2018-04-12 21:13:38 +02:00
@endif
@section('viewJsName', 'locationform')
2018-04-11 19:49:35 +02:00
@section('content')
<div class="col-lg-4 col-xs-12">
2018-04-12 21:13:38 +02:00
<h1 class="page-header">@yield('title')</h1>
2017-04-15 23:16:20 +02:00
2018-04-12 21:13:38 +02:00
<script>Grocy.EditMode = '{{ $mode }}';</script>
2017-04-15 23:16:20 +02:00
2018-04-12 21:13:38 +02:00
@if($mode == 'edit')
<script>Grocy.EditObjectId = {{ $location->id }};</script>
@endif
2017-04-15 23:16:20 +02:00
<form id="location-form">
2017-04-19 21:09:28 +02:00
2017-04-15 23:16:20 +02:00
<div class="form-group">
2018-04-16 19:11:32 +02:00
<label for="name">{{ $L('Name') }}</label>
2018-04-12 21:13:38 +02:00
<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $location->name }}@endif">
2017-04-16 23:11:03 +02:00
<div class="help-block with-errors"></div>
2017-04-15 23:16:20 +02:00
</div>
2017-04-19 21:09:28 +02:00
2017-04-15 23:16:20 +02:00
<div class="form-group">
2018-04-16 19:11:32 +02:00
<label for="description">{{ $L('Description') }}</label>
2018-04-12 21:13:38 +02:00
<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $location->description }}@endif</textarea>
2017-04-15 23:16:20 +02:00
</div>
2017-04-19 21:09:28 +02:00
2018-04-16 19:11:32 +02:00
<button id="save-location-button" type="submit" class="btn btn-default">{{ $L('Save') }}</button>
2017-04-19 21:09:28 +02:00
2017-04-15 23:16:20 +02:00
</form>
</div>
2018-04-11 19:49:35 +02:00
@stop