| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | @extends('layout.default') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @if($mode == 'edit') | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | @section('title', $__t('Edit userentity')) | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | @else | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | @section('title', $__t('Create userentity')) | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | @endif | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @section('viewJsName', 'userentityform') | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | @section('content') | 
					
						
							| 
									
										
										
										
											2020-04-19 08:51:02 -04:00
										 |  |  | <div class="row"> | 
					
						
							|  |  |  | 	<div class="col"> | 
					
						
							|  |  |  | 		<h2 class="title">@yield('title')</h2> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-08 15:09:10 +01:00
										 |  |  | <hr class="my-2"> | 
					
						
							| 
									
										
										
										
											2020-10-31 18:37:10 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | <div class="row"> | 
					
						
							| 
									
										
										
										
											2021-06-24 22:46:47 +02:00
										 |  |  | 	<div class="col-lg-6 col-12"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 		<script> | 
					
						
							|  |  |  | 			Grocy.EditMode = '{{ $mode }}'; | 
					
						
							|  |  |  | 		</script> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		@if($mode == 'edit') | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 		<script> | 
					
						
							|  |  |  | 			Grocy.EditObjectId = {{ $userentity->id }}; | 
					
						
							|  |  |  | 		</script> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 		@endif | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 		<form id="userentity-form" | 
					
						
							|  |  |  | 			novalidate> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 			<div class="form-group"> | 
					
						
							|  |  |  | 				<label for="name">{{ $__t('Name') }}</label> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<input @if($mode=='edit' | 
					
						
							|  |  |  | 					) | 
					
						
							|  |  |  | 					disabled | 
					
						
							|  |  |  | 					@endif | 
					
						
							|  |  |  | 					type="text" | 
					
						
							|  |  |  | 					class="form-control" | 
					
						
							|  |  |  | 					required | 
					
						
							|  |  |  | 					pattern="^[a-zA-Z0-9]*$" | 
					
						
							|  |  |  | 					id="name" | 
					
						
							|  |  |  | 					name="name" | 
					
						
							|  |  |  | 					value="@if($mode == 'edit'){{ $userentity->name }}@endif"> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 				<div class="invalid-feedback">{{ $__t('This is required and can only contain letters and numbers') }}</div> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			<div class="form-group"> | 
					
						
							|  |  |  | 				<label for="name">{{ $__t('Caption') }}</label> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<input type="text" | 
					
						
							|  |  |  | 					class="form-control" | 
					
						
							|  |  |  | 					required | 
					
						
							|  |  |  | 					id="caption" | 
					
						
							|  |  |  | 					name="caption" | 
					
						
							|  |  |  | 					value="@if($mode == 'edit'){{ $userentity->caption }}@endif"> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 				<div class="invalid-feedback">{{ $__t('A caption is required') }}</div> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			<div class="form-group"> | 
					
						
							|  |  |  | 				<label for="description">{{ $__t('Description') }}</label> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<textarea class="form-control" | 
					
						
							|  |  |  | 					rows="2" | 
					
						
							|  |  |  | 					id="description" | 
					
						
							|  |  |  | 					name="description">@if($mode == 'edit'){{ $userentity->description }}@endif</textarea> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 			</div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			<div class="form-group"> | 
					
						
							| 
									
										
										
										
											2020-11-08 19:00:12 +01:00
										 |  |  | 				<div class="custom-control custom-checkbox"> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 					<input @if($mode=='edit' | 
					
						
							|  |  |  | 						&& | 
					
						
							| 
									
										
										
										
											2020-11-08 19:00:12 +01:00
										 |  |  | 						$userentity->show_in_sidebar_menu == 1) checked @endif class="form-check-input custom-control-input" type="checkbox" id="show_in_sidebar_menu" name="show_in_sidebar_menu" value="1"> | 
					
						
							|  |  |  | 					<label class="form-check-label custom-control-label" | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 						for="show_in_sidebar_menu">{{ $__t('Show in sidebar menu') }}</label> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 				</div> | 
					
						
							|  |  |  | 			</div> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 			<div class="form-group"> | 
					
						
							|  |  |  | 				<label for="name">{{ $__t('Icon CSS class') }}</label> | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 				<input type="text" | 
					
						
							|  |  |  | 					class="form-control" | 
					
						
							|  |  |  | 					id="icon_css_class" | 
					
						
							|  |  |  | 					name="icon_css_class" | 
					
						
							|  |  |  | 					value="@if($mode == 'edit'){{ $userentity->icon_css_class }}@endif" | 
					
						
							|  |  |  | 					placeholder='{{ $__t('For example') }} "fas fa-smile"'> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 			</div> | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-08-31 20:32:50 +02:00
										 |  |  | 			<button id="save-userentity-button" | 
					
						
							|  |  |  | 				class="btn btn-success">{{ $__t('Save') }}</button> | 
					
						
							| 
									
										
										
										
											2019-09-18 16:18:15 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 		</form> | 
					
						
							|  |  |  | 	</div> | 
					
						
							|  |  |  | </div> | 
					
						
							|  |  |  | @stop |