Fixing XSS vulnerability by using the proper output tags
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{!! Form::open(['route' => 'admin.fares.store']) !!}
|
||||
{{ Form::open(['route' => 'admin.fares.store']) }}
|
||||
@include('admin.fares.fields')
|
||||
{!! Form::close() !!}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{!! Form::model($fare, ['route' => ['admin.fares.update', $fare->id], 'method' => 'patch']) !!}
|
||||
{{ Form::model($fare, ['route' => ['admin.fares.update', $fare->id], 'method' => 'patch']) }}
|
||||
@include('admin.fares.fields')
|
||||
{!! Form::close() !!}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -10,70 +10,70 @@
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('code', 'Code:') !!} <span class="required">*</span>
|
||||
{{ Form::label('code', 'Code:') }} <span class="required">*</span>
|
||||
@component('admin.components.info')
|
||||
How this fare class will show up on a ticket
|
||||
@endcomponent
|
||||
{!! Form::text('code', null, ['class' => 'form-control']) !!}
|
||||
{{ Form::text('code', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('code') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('name', 'Name:') !!} <span class="required">*</span>
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
@component('admin.components.info')
|
||||
The fare class name, E.g, "Economy" or "First"
|
||||
@endcomponent
|
||||
{!! Form::text('name', null, ['class' => 'form-control']) !!}
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('price', 'Price:') !!}
|
||||
{{ Form::label('price', 'Price:') }}
|
||||
@component('admin.components.info')
|
||||
This is the price of a ticket for a passenger
|
||||
@endcomponent
|
||||
{!! Form::text('price', null, ['class' => 'form-control', 'placeholder' => 0]) !!}
|
||||
{{ Form::text('price', null, ['class' => 'form-control', 'placeholder' => 0]) }}
|
||||
<p class="text-danger">{{ $errors->first('price') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('cost', 'Cost:') !!}
|
||||
{{ Form::label('cost', 'Cost:') }}
|
||||
@component('admin.components.info')
|
||||
The operating cost
|
||||
@endcomponent
|
||||
{!! Form::text('cost', null, ['class' => 'form-control', 'placeholder' => 0]) !!}
|
||||
{{ Form::text('cost', null, ['class' => 'form-control', 'placeholder' => 0]) }}
|
||||
<p class="text-danger">{{ $errors->first('cost') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('capacity', 'Capacity:') !!}
|
||||
{{ Form::label('capacity', 'Capacity:') }}
|
||||
@component('admin.components.info')
|
||||
The number of seats available in this class.
|
||||
@endcomponent
|
||||
{!! Form::text('capacity', null, ['class' => 'form-control', 'placeholder' => 0]) !!}
|
||||
{{ Form::text('capacity', null, ['class' => 'form-control', 'placeholder' => 0]) }}
|
||||
<p class="text-danger">{{ $errors->first('capacity') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('notes', 'Notes:') !!}
|
||||
{!! Form::text('notes', null, ['class' => 'form-control']) !!}
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
{{ Form::text('notes', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{!! Form::label('active', 'Active:') !!}
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<label class="checkbox-inline">
|
||||
{!! Form::hidden('active', 0, false) !!}
|
||||
{!! Form::checkbox('active', 1, null) !!}
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active', 1, null) }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
|
||||
<a href="{!! route('admin.fares.index') !!}" class="btn btn-warn">Cancel</a>
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.fares.index') }}" class="btn btn-warn">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@section('title', 'Fares')
|
||||
@section('actions')
|
||||
<li>
|
||||
<a href="{!! route('admin.fares.create') !!}">
|
||||
<a href="{{ route('admin.fares.create') }}">
|
||||
<i class="ti-plus"></i>
|
||||
Add New
|
||||
</a>
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<!-- Code Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('code', 'Code:') !!}
|
||||
<p>{!! $fare->code !!}</p>
|
||||
{{ Form::label('code', 'Code:') }}
|
||||
<p>{{ $fare->code }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('name', 'Name:') !!}
|
||||
<p>{!! $fare->name !!}</p>
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
<p>{{ $fare->name }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Price Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('price', 'Price:') !!}
|
||||
<p>{!! $fare->price !!}</p>
|
||||
{{ Form::label('price', 'Price:') }}
|
||||
<p>{{ $fare->price }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Cost Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('cost', 'Cost:') !!}
|
||||
<p>{!! $fare->cost !!}</p>
|
||||
{{ Form::label('cost', 'Cost:') }}
|
||||
<p>{{ $fare->cost }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Notes Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('notes', 'Notes:') !!}
|
||||
<p>{!! $fare->notes !!}</p>
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
<p>{{ $fare->notes }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group">
|
||||
{!! Form::label('active', 'Active:') !!}
|
||||
<p>{!! $fare->active !!}</p>
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<p>{{ $fare->active }}</p>
|
||||
</div>
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
<tbody>
|
||||
@foreach($fares as $fare)
|
||||
<tr>
|
||||
<td><a href="{!! route('admin.fares.edit', [$fare->id]) !!}">{!! $fare->code !!}</a></td>
|
||||
<td>{!! $fare->name !!}</td>
|
||||
<td>{!! $fare->price !!}</td>
|
||||
<td>{!! $fare->cost !!}</td>
|
||||
<td>{!! $fare->notes !!}</td>
|
||||
<td><a href="{{ route('admin.fares.edit', [$fare->id]) }}">{{ $fare->code }}</a></td>
|
||||
<td>{{ $fare->name }}</td>
|
||||
<td>{{ $fare->price }}</td>
|
||||
<td>{{ $fare->cost }}</td>
|
||||
<td>{{ $fare->notes }}</td>
|
||||
<td class="text-center">
|
||||
@if($fare->active == 1)
|
||||
<span class="label label-success">Active</span>
|
||||
@@ -24,11 +24,11 @@
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{!! Form::open(['route' => ['admin.fares.destroy', $fare->id], 'method' => 'delete']) !!}
|
||||
<a href="{!! route('admin.fares.edit', [$fare->id]) !!}" class='btn btn-sm btn-success btn-icon'>
|
||||
{{ Form::open(['route' => ['admin.fares.destroy', $fare->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.fares.edit', [$fare->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
{!! Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) !!}
|
||||
{!! Form::close() !!}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
Reference in New Issue
Block a user