Use relative URLs for rebuild forms

Avoid mixed-content form submissions behind Coolify by rendering internal links and form actions as relative paths.
This commit is contained in:
Power BI Dev
2026-05-03 22:06:46 +07:00
parent b95d7fed02
commit 030bb7c174
17 changed files with 35 additions and 35 deletions

View File

@@ -25,8 +25,8 @@
<div class="rounded-xl bg-white p-5 shadow-[0_8px_12px_rgba(13,10,44,0.04)] sm:p-7.5 xl:p-9">
<div class="mb-6 grid grid-cols-2 rounded-[14px] bg-[#F9FAFB] p-1.5 text-sm font-medium text-[#15171A]">
<a href="{{ route('legacy.login', 'mahasiswa') }}" class="rounded-[10px] px-4 py-3 text-center {{ $role === 'mahasiswa' ? 'bg-white shadow-[0_4px_10px_rgba(13,10,44,0.05)]' : 'text-[#5C6A78]' }}">Mahasiswa</a>
<a href="{{ route('legacy.login', 'dosen') }}" class="rounded-[10px] px-4 py-3 text-center {{ $role === 'dosen' ? 'bg-white shadow-[0_4px_10px_rgba(13,10,44,0.05)]' : 'text-[#5C6A78]' }}">Dosen</a>
<a href="{{ route('legacy.login', 'mahasiswa', false) }}" class="rounded-[10px] px-4 py-3 text-center {{ $role === 'mahasiswa' ? 'bg-white shadow-[0_4px_10px_rgba(13,10,44,0.05)]' : 'text-[#5C6A78]' }}">Mahasiswa</a>
<a href="{{ route('legacy.login', 'dosen', false) }}" class="rounded-[10px] px-4 py-3 text-center {{ $role === 'dosen' ? 'bg-white shadow-[0_4px_10px_rgba(13,10,44,0.05)]' : 'text-[#5C6A78]' }}">Dosen</a>
</div>
<div class="mb-6 inline-flex rounded-full border border-[#E5E7EB] bg-[#F9FAFB] px-3 py-1.5 text-sm font-medium text-[#15171A]">
@@ -43,7 +43,7 @@
</div>
@endif
<form method="POST" action="{{ route('legacy.authenticate', $role) }}">
<form method="POST" action="{{ route('legacy.authenticate', $role, false) }}">
@csrf
<div class="mb-4">
<label for="identifier" class="mb-3 block text-[14px] font-medium leading-[22px] text-[#15171A]">{{ $meta['input'] }}</label>
@@ -61,7 +61,7 @@
</div>
<div class="mb-7 flex items-center justify-between text-sm text-[#374151]">
<span>{{ $role === 'mahasiswa' ? 'Gunakan akun mahasiswa aktif' : ($role === 'dosen' ? 'Gunakan akun dosen aktif' : 'Akses admin belum tersedia') }}</span>
<a href="{{ route('role-login') }}" class="text-[#15171A]">Kembali</a>
<a href="{{ route('role-login', [], false) }}" class="text-[#15171A]">Kembali</a>
</div>
<button type="submit" class="flex w-full justify-center rounded-md bg-[#15171A] px-5 py-3.5 font-medium text-white hover:opacity-90 {{ $role === 'admin' ? 'opacity-75' : '' }}">{{ $role === 'mahasiswa' ? 'Masuk ke Portal Mahasiswa' : ($role === 'dosen' ? 'Masuk ke Dashboard Dosen' : 'Coba Masuk') }}</button>
</form>

View File

@@ -25,7 +25,7 @@
<div class="mt-6 space-y-4">
@foreach ($roles as $role)
<a href="{{ route('legacy.login', $role['slug']) }}" class="block rounded-xl border border-[#E5E7EB] bg-[#F9FAFB] px-5 py-4 transition hover:border-[#15171A] hover:bg-white">
<a href="{{ route('legacy.login', $role['slug'], false) }}" class="block rounded-xl border border-[#E5E7EB] bg-[#F9FAFB] px-5 py-4 transition hover:border-[#15171A] hover:bg-white">
<p class="text-base font-semibold text-[#15171A]">{{ $role['name'] }}</p>
<p class="mt-2 text-sm leading-7 text-[#5C6A78]">{{ $role['summary'] }}</p>
</a>