Fixed #7046 - added user website url back into UI

This commit is contained in:
snipe 2019-05-21 18:55:12 -07:00
parent 729e3eb70d
commit b2eacb147b
5 changed files with 19 additions and 0 deletions

View file

@ -278,6 +278,7 @@ class UsersController extends Controller
$user->activated = $request->input('activated', 0);
$user->jobtitle = $request->input('jobtitle', null);
$user->phone = $request->input('phone');
$user->website = $request->input('website', null);
$user->location_id = $request->input('location_id', null);
$user->company_id = Company::getIdForUser($request->input('company_id', null));
$user->manager_id = $request->input('manager_id', null);

View file

@ -35,6 +35,7 @@ class UsersTransformer
] : null,
'jobtitle' => ($user->jobtitle) ? e($user->jobtitle) : null,
'phone' => ($user->phone) ? e($user->phone) : null,
'website' => ($user->website) ? e($user->website) : null,
'address' => ($user->address) ? e($user->address) : null,
'city' => ($user->city) ? e($user->city) : null,
'state' => ($user->state) ? e($user->state) : null,

View file

@ -69,6 +69,7 @@ class User extends SnipeModel implements AuthenticatableContract, CanResetPasswo
'email' => 'email|nullable',
'password' => 'required|min:6',
'locale' => 'max:10|nullable',
'website' => 'url|nullable',
];
use Searchable;

View file

@ -273,6 +273,15 @@
</div>
</div>
<!-- Website URL -->
<div class="form-group {{ $errors->has('website') ? ' has-error' : '' }}">
<label for="website" class="col-md-3 control-label">{{ trans('general.website') }}</label>
<div class="col-md-8">
<input class="form-control" type="text" name="website" id="website" value="{{ Input::old('website', $user->website) }}" />
{!! $errors->first('website', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
</div>
</div>
<!-- Address -->
<div class="form-group{{ $errors->has('address') ? ' has-error' : '' }}">
<label class="col-md-3 control-label" for="address">{{ trans('general.address') }}</label>

View file

@ -193,6 +193,13 @@
</tr>
@endif
@if ($user->website)
<tr>
<td class="text-nowrap">{{ trans('general.website') }}</td>
<td><a href="{{ $user->website }}" target="_blank">{{ $user->website }}</a></td>
</tr>
@endif
@if ($user->phone)
<tr>
<td class="text-nowrap">{{ trans('admin/users/table.phone') }}</td>