Skip to content

Commit

Permalink
Register fix and remove alerts on guest layout
Browse files Browse the repository at this point in the history
  • Loading branch information
Raccoon254 committed Jun 14, 2024
1 parent 49890d8 commit 76eea15
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
17 changes: 10 additions & 7 deletions resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<x-guest-layout>
<form wire:submit.prevent="register">
<form method="POST" action="{{ route('register') }}" class="mt-8">
@csrf
<!-- Name -->
<div>
<x-input-label for="name" :value="__('Name')"/>
<x-text-input id="name" class="block mt-1 w-full" type="text" wire:model="name" required autofocus
<x-text-input id="name" class="block mt-1 w-full" type="text" name="name" required autofocus
autocomplete="name"/>
@error('name')
<x-input-error :messages="$message" class="mt-2"/> @enderror
Expand All @@ -15,14 +15,14 @@
<!-- Phone Number -->
<div data-tip="Make sure we can contact you" class="mt-4 flex flex-col justify-start tooltip w-1/2 mr-2">
<x-input-label class="text-start mb-1" for="phone" :value="__('Phone Number')"></x-input-label>
<x-text-input id="phone" class="block tooltip mt-1 w-full" type="tel" wire:model="phone" required
<x-text-input id="phone" class="block tooltip mt-1 w-full" type="tel" name="phone" required
autocomplete="phone"/>
</div>

<!-- Location -->
<div class="mt-4 ml-2">
<x-input-label for="location" :value="__('Location')"></x-input-label>
<x-text-input id="location" disabled class="block opacity-30 mt-1 w-full" type="text" wire:model="location" required
<x-text-input id="location" disabled class="block opacity-30 mt-1 w-full" type="text" name="location" required
autocomplete="location"/>
</div>
</div>
Expand All @@ -33,7 +33,7 @@
<!-- Email Address -->
<div class="mt-4">
<x-input-label for="email" :value="__('Email')"/>
<x-text-input id="email" class="block mt-1 w-full" type="email" wire:model="email" required
<x-text-input id="email" class="block mt-1 w-full" type="email" name="email" required
autocomplete="username"/>
@error('email')
<x-input-error :messages="$message" class="mt-2"/> @enderror
Expand All @@ -42,7 +42,7 @@
<!-- Password -->
<div class="mt-4">
<x-input-label for="password" :value="__('Password')"/>
<x-text-input id="password" class="block mt-1 w-full" type="password" wire:model="password" required
<x-text-input id="password" class="block mt-1 w-full" type="password" name="password" required
autocomplete="new-password"/>
@error('password')
<x-input-error :messages="$message" class="mt-2"/> @enderror
Expand All @@ -52,7 +52,7 @@
<div class="mt-4">
<x-input-label for="password_confirmation" :value="__('Confirm Password')"/>
<x-text-input id="password_confirmation" class="block mt-1 w-full" type="password"
wire:model="password_confirmation" required autocomplete="new-password"/>
name="password_confirmation" required autocomplete="new-password"/>
@error('password_confirmation')
<x-input-error :messages="$message" class="mt-2"/> @enderror
</div>
Expand All @@ -76,6 +76,8 @@
let phoneInput = window.intlTelInput(phoneInputField, {
utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js",
initialCountry: "auto",
//add favourite countries
preferredCountries: ["us", "gb", "ca", "au", "nz"],
geoIpLookup: function (success, failure) {
try {
fetch("https://ipinfo.io/json?token=cbcffb988673b9", {
Expand Down Expand Up @@ -108,6 +110,7 @@
if (!update_location_success) {
// Default to US if we can't get the location
phoneInput.setCountry("us");
document.querySelector("#location").value = "United States";
}
// When we select a country, update the location field
Expand Down
1 change: 0 additions & 1 deletion resources/views/layouts/guest.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
</div>

<div class="w-full flex flex-col sm:max-w-md mt-6 px-6 py-4 overflow-hidden sm:rounded-lg">
@include('session.alerts')
{{ $slot }}
</div>

Expand Down

0 comments on commit 76eea15

Please sign in to comment.