Skip to content

Commit

Permalink
fix: user view/edit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mitulgolakiya committed Jun 23, 2022
1 parent ee4940e commit 732e1c4
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 32 deletions.
46 changes: 30 additions & 16 deletions templates/scaffold/users/edit.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,36 @@

@section('content')
<section class="content-header">
<h1>
User
</h1>
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-12">
<h1>User</h1>
</div>
</div>
</div>
</section>
<div class="content">
@include('adminlte-templates::common.errors')
<div class="box box-primary">
<div class="box-body">
<div class="row">
{!! Form::model($user, ['route' => ['users.update', $user->id], 'method' => 'patch']) !!}

@include('users.fields')

{!! Form::close() !!}
</div>
</div>

<div class="content px-3">

@include('adminlte-templates::common.errors')

<div class="card">

{!! Form::model($user, ['route' => ['users.update', $user->id], 'method' => 'patch']) !!}

<div class="card-body">
<div class="row">
@include('users.fields')
</div>
</div>

<div class="card-footer">
{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
<a href="{{ route('users.index') }}" class="btn btn-default">Cancel</a>
</div>

{!! Form::close() !!}

</div>
</div>
</div>
@endsection
6 changes: 0 additions & 6 deletions templates/scaffold/users/fields.stub
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,3 @@
{!! Form::label('password', 'Password Confirmation') !!}
{!! Form::password('password_confirmation', ['class' => 'form-control']) !!}
</div>

<!-- Submit Field -->
<div class="form-group col-sm-12">
{!! Form::submit('Save', ['class' => 'btn btn-primary']) !!}
<a href="{!! route('users.index') !!}" class="btn btn-default">Cancel</a>
</div>
26 changes: 18 additions & 8 deletions templates/scaffold/users/show.stub
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,26 @@

@section('content')
<section class="content-header">
<h1>
User
</h1>
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>Users</h1>
</div>
<div class="col-sm-6">
<a class="btn btn-default float-right"
href="{{ route('users.index') }}">
Back
</a>
</div>
</div>
</div>
</section>
<div class="content">
<div class="box box-primary">
<div class="box-body">
<div class="row" style="padding-left: 20px">

<div class="content px-3">
<div class="card">
<div class="card-body">
<div class="row">
@include('users.show_fields')
<a href="{!! route('users.index') !!}" class="btn btn-default">Back</a>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/scaffold/users/show_fields.stub
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<!-- Name Field -->
<div class="form-group">
<div class="col-sm-12">
{!! Form::label('name', 'Name:') !!}
<p>{!! $user->name !!}</p>
</div>

<!-- Email Field -->
<div class="form-group">
<div class="col-sm-12">
{!! Form::label('email', 'Email:') !!}
<p>{!! $user->email !!}</p>
</div>

0 comments on commit 732e1c4

Please sign in to comment.