| 
									
										
										
										
											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') | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col-lg-6 col-xs-12"> | 
					
						
							|  |  |  | 		<h1>@yield('title')</h1> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 		<script>Grocy.EditMode = '{{ $mode }}';</script> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 		@if($mode == 'edit') | 
					
						
							|  |  |  | 			<script>Grocy.EditObjectId = {{ $location->id }};</script> | 
					
						
							|  |  |  | 		@endif | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-11 19:43:05 +02:00
										 |  |  | 		<form id="location-form" novalidate> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 			<div class="form-group"> | 
					
						
							|  |  |  | 				<label for="name">{{ $L('Name') }}</label> | 
					
						
							|  |  |  | 				<input type="text" class="form-control" required id="name" name="name" value="@if($mode == 'edit'){{ $location->name }}@endif"> | 
					
						
							| 
									
										
										
										
											2018-07-11 19:43:05 +02:00
										 |  |  | 				<div class="invalid-feedback">{{ $L('A name is required') }}</div> | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 			</div> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 			<div class="form-group"> | 
					
						
							|  |  |  | 				<label for="description">{{ $L('Description') }}</label> | 
					
						
							|  |  |  | 				<textarea class="form-control" rows="2" id="description" name="description">@if($mode == 'edit'){{ $location->description }}@endif</textarea> | 
					
						
							|  |  |  | 			</div> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 			<button id="save-location-button" type="submit" class="btn btn-success">{{ $L('Save') }}</button> | 
					
						
							| 
									
										
										
										
											2017-04-19 21:09:28 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-07-10 20:37:13 +02:00
										 |  |  | 		</form> | 
					
						
							|  |  |  | 	</div> | 
					
						
							| 
									
										
										
										
											2017-04-15 23:16:20 +02:00
										 |  |  | </div> | 
					
						
							| 
									
										
										
										
											2018-04-11 19:49:35 +02:00
										 |  |  | @stop |