Fixed whitespaces in form action. The server had a problem with handling URIs

with whitespaces and trailing slashes ('/').
This commit is contained in:
Adrian
2019-02-07 11:30:58 +01:00
parent a8e1807a4d
commit bb93f0be00
3 changed files with 16 additions and 4 deletions
@@ -8,7 +8,11 @@
@section('content') @section('content')
<h1>@yield('title')</h1> <h1>@yield('title')</h1>
<form action="/people/@if (!is_null($person->id)) {{ $person->id }} @endif" method='post'> @if (is_null($person->id))
<form action='/people' method='post'>
@else
<form action='/people/{{ $person->id }}' method='post'>
@endif
@if (!is_null($person->id)) @if (!is_null($person->id))
{{ method_field('patch') }} {{ method_field('patch') }}
@endif @endif
@@ -8,7 +8,11 @@
@section('content') @section('content')
<h1>@yield('title')</h1> <h1>@yield('title')</h1>
<form action="/targets/@if (!is_null($personTarget->id)) {{ $personTarget->id }} @endif" method='post'> @if (is_null($personTarget->id))
<form action='/targets' method='post'>
@else
<form action='/targets/{{ $personTarget->id }}' method='post'>
@endif
@if (!is_null($personTarget->id)) @if (!is_null($personTarget->id))
{{ method_field('patch') }} {{ method_field('patch') }}
@endif @endif
@@ -1,12 +1,16 @@
@extends('layout.master') @extends('layout.master')
@section('subnav') @section('subnav')
<a href='{{ url()->previous() }}'>Zurück</a> <a href='{{ url()->previous() }}' class='btn btn-outline-primary'>Zurück</a>
@endsection @endsection
@section('content') @section('content')
<h3>@yield('title')</h3> <h3>@yield('title')</h3>
<form action="/projects/@if (!is_null($project->id)) {{ $project->id }} @endif" method='post'> @if (is_null($project->id))
<form action='/projects' method='post'>
@else
<form action='/projects/{{$project->id}}' method='post'>
@endif
@if (!is_null($project->id)) @if (!is_null($project->id))
{{ method_field('patch') }} {{ method_field('patch') }}
@endif @endif