Skip to content

Commit

Permalink
Update user.blade.php
Browse files Browse the repository at this point in the history
Create new user account from asset form - additional fields #10420
  • Loading branch information
Robert-Azelis authored Dec 13, 2021
1 parent 503c802 commit 01608d8
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions resources/views/modals/user.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,67 @@
<form action="{{ route('api.users.store') }}" onsubmit="return false">
<div class="alert alert-danger" id="modal_error_msg" style="display:none">
</div>

<!-- Setup of default company, taken from asset creator -->
@if ($user->company)
<input type="hidden" name="company_id" id='modal-company' value='{{ $user->company->id }}' class="form-control">
@endif

<!-- Select company, only for users with multicompany access - replace default company -->
<div class="dynamic-form-row">
@include ('partials.forms.edit.company-select', ['translated_name' => trans('general.company'), 'fieldname' => 'company_id'])
</div>

<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-first_name">{{ trans('general.first_name') }}:</label></div>
<div class="col-md-3 col-xs-12"><label for="modal-first_name">{{ trans('general.first_name') }}:</label></div>
<div class="col-md-8 col-xs-12 required"><input type='text' name="first_name" id='modal-first_name' class="form-control"></div>
</div>

<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-last_name">{{ trans('general.last_name') }}:</label></div>
<div class="col-md-3 col-xs-12"><label for="modal-last_name">{{ trans('general.last_name') }}:</label></div>
<div class="col-md-8 col-xs-12"><input type='text' name="last_name" id='modal-last_name' class="form-control"> </div>
</div>

<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-username">{{ trans('admin/users/table.username') }}:</label></div>
<div class="col-md-3 col-xs-12"><label for="modal-username">{{ trans('admin/users/table.username') }}:</label></div>
<div class="col-md-8 col-xs-12 required"><input type='text' name="username" id='modal-username' class="form-control"></div>
</div>

<!-- User email address -->
<div class="dynamic-form-row">
<div class="col-md-3 col-xs-12"><label for="modal-email">{{ trans('admin/users/table.email') }}:</label></div>
<div class="col-md-8 col-xs-12">
<input class="form-control" type="text" name="email" id="modal-email" autocomplete="off">
{!! $errors->first('email', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>

<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-password">{{ trans('admin/users/table.password') }}:</label></div>
<div class="col-md-3 col-xs-12"><label for="modal-password">{{ trans('admin/users/table.password') }}:</label></div>
<div class="col-md-8 col-xs-12 required"><input type='password' name="password" id='modal-password' class="form-control">
<a href="#" class="left" id="modal-genPassword">Generate</a>
</div>
</div>

<div class="dynamic-form-row">
<div class="col-md-4 col-xs-12"><label for="modal-password_confirmation">{{ trans('admin/users/table.password_confirm') }}:</label></div>
<div class="col-md-3 col-xs-12"><label for="modal-password_confirmation">{{ trans('admin/users/table.password_confirm') }}:</label></div>
<div class="col-md-8 col-xs-12 required"><input type='password' name="password_confirmation" id='modal-password_confirmation' class="form-control">
<div id="modal-generated-password"></div>
</div>
</div>

<!-- Space for keep consistance of layout -->
<div class="dynamic-form-row"></div>

<!-- Checkbox for activation new user, by default set for activated -->
<div class="dynamic-form-row">
<div class="col-md-3 col-xs-12"><label for="modal-activated">{{ trans('general.login_enabled') }}:</label></div>
<div class="col-md-8 col-xs-12">
<input type="checkbox" value="1" name="activated" id="modal-activated" class="minimal" {{ (old('activated', $user->activated)) == '1' ? ' checked="checked"' : '' }} aria-label="activated">
{{ trans('admin/users/general.activated_help_text') }}
</div>
</div>

</form>
</div>
<div class="modal-footer">
Expand Down

0 comments on commit 01608d8

Please sign in to comment.