Custom user fields #711 (#772)

Custom user fields during registration and profile edit #711
This commit is contained in:
Nabeel S
2020-08-11 17:48:51 -04:00
committed by GitHub
parent 3739cc8e91
commit 3ebf4f2924
36 changed files with 740 additions and 107 deletions
@@ -0,0 +1,16 @@
<tr>
<td>
{{ $field->field->name }}
@if($field->field->required === true)
<span class="text-danger">*</span>
@endif
</td>
<td>
<div class="input-group input-group-sm form-group">
{{ Form::text($field->field->slug, $field->value, [
'class' => 'form-control',
]) }}
</div>
<p class="text-danger">{{ $errors->first('field_'.$field->slug) }}</p>
</td>
</tr>
@@ -108,6 +108,27 @@
@endif
</td>
</tr>
{{-- Custom fields --}}
@foreach($userFields as $field)
<tr>
<td>
{{ $field->name }}
@if($field->required === true)
<span class="text-danger">*</span>
@endif
</td>
<td>
<div class="input-group input-group-sm form-group">
{{ Form::text('field_'.$field->slug, $field->value, [
'class' => 'form-control',
]) }}
</div>
<p class="text-danger">{{ $errors->first('field_'.$field->slug) }}</p>
</td>
</tr>
@endforeach
<tr>
<td>@lang('profile.opt-in')</td>
<td>
@@ -128,4 +128,20 @@
</div>
</div>
@endif
<div class="clearfix" style="height: 50px;"></div>
<div class="row">
<div class="col-sm-12">
<table class="table table-full-width">
@foreach($userFields as $field)
@if($field->public === true)
<tr>
<td>{{ $field->name }}</td>
<td>{{ $field->value }}</td>
</tr>
@endif
@endforeach
</table>
</div>
</div>
@endsection