Skip to content

Commit effc7fc

Browse files
authored
Fix Blade binding: use colon syntax for props with translations (#27)
* Fix Blade binding: use colon syntax for props with translations * Update profile.blade.php * Update password.blade.php * Update delete-user-form.blade.php * Update reset-password.blade.php * Update register.blade.php * Update login.blade.php * Update forgot-password.blade.php * Update confirm-password.blade.php
1 parent 9f852af commit effc7fc

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

resources/views/livewire/auth/confirm-password.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function confirmPassword(): void
4646
<flux:input
4747
wire:model="password"
4848
id="password"
49-
label="{{ __('Password') }}"
49+
:label="__('Password')"
5050
type="password"
5151
name="password"
5252
required

resources/views/livewire/auth/forgot-password.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function sendPasswordResetLink(): void
3232
<!-- Email Address -->
3333
<flux:input
3434
wire:model="email"
35-
label="{{ __('Email Address') }}"
35+
:label="__('Email Address')"
3636
type="email"
3737
name="email"
3838
required

resources/views/livewire/auth/login.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected function throttleKey(): string
8383
<!-- Email Address -->
8484
<flux:input
8585
wire:model="email"
86-
label="{{ __('Email address') }}"
86+
:label="__('Email address')"
8787
type="email"
8888
name="email"
8989
required
@@ -96,7 +96,7 @@ protected function throttleKey(): string
9696
<div class="relative">
9797
<flux:input
9898
wire:model="password"
99-
label="{{ __('Password') }}"
99+
:label="__('Password')"
100100
type="password"
101101
name="password"
102102
required
@@ -112,7 +112,7 @@ protected function throttleKey(): string
112112
</div>
113113

114114
<!-- Remember Me -->
115-
<flux:checkbox wire:model="remember" label="{{ __('Remember me') }}" />
115+
<flux:checkbox wire:model="remember" :label="__('Remember me')" />
116116

117117
<div class="flex items-center justify-end">
118118
<flux:button variant="primary" type="submit" class="w-full">{{ __('Log in') }}</flux:button>

resources/views/livewire/auth/register.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function register(): void
4646
<flux:input
4747
wire:model="name"
4848
id="name"
49-
label="{{ __('Name') }}"
49+
:label="__('Name')"
5050
type="text"
5151
name="name"
5252
required
@@ -59,7 +59,7 @@ public function register(): void
5959
<flux:input
6060
wire:model="email"
6161
id="email"
62-
label="{{ __('Email address') }}"
62+
:label="__('Email address')"
6363
type="email"
6464
name="email"
6565
required
@@ -71,7 +71,7 @@ public function register(): void
7171
<flux:input
7272
wire:model="password"
7373
id="password"
74-
label="{{ __('Password') }}"
74+
:label="__('Password')"
7575
type="password"
7676
name="password"
7777
required
@@ -83,7 +83,7 @@ public function register(): void
8383
<flux:input
8484
wire:model="password_confirmation"
8585
id="password_confirmation"
86-
label="{{ __('Confirm password') }}"
86+
:label="__('Confirm password')"
8787
type="password"
8888
name="password_confirmation"
8989
required

resources/views/livewire/auth/reset-password.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ function ($user) {
7979
<flux:input
8080
wire:model="email"
8181
id="email"
82-
label="{{ __('Email') }}"
82+
:label="__('Email')"
8383
type="email"
8484
name="email"
8585
required
@@ -90,7 +90,7 @@ function ($user) {
9090
<flux:input
9191
wire:model="password"
9292
id="password"
93-
label="{{ __('Password') }}"
93+
:label="__('Password')"
9494
type="password"
9595
name="password"
9696
required
@@ -102,7 +102,7 @@ function ($user) {
102102
<flux:input
103103
wire:model="password_confirmation"
104104
id="password_confirmation"
105-
label="{{ __('Confirm password') }}"
105+
:label="__('Confirm password')"
106106
type="password"
107107
name="password_confirmation"
108108
required

resources/views/livewire/settings/appearance.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<div class="flex flex-col items-start">
1010
@include('partials.settings-heading')
1111

12-
<x-settings.layout heading="{{ __('Appearance') }}" subheading="{{ __('Update the appearance settings for your account') }}">
12+
<x-settings.layout :heading="__('Appearance')" :subheading=" __('Update the appearance settings for your account')">
1313
<flux:radio.group x-data variant="segmented" x-model="$flux.appearance">
1414
<flux:radio value="light" icon="sun">{{ __('Light') }}</flux:radio>
1515
<flux:radio value="dark" icon="moon">{{ __('Dark') }}</flux:radio>

resources/views/livewire/settings/delete-user-form.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function deleteUser(Logout $logout): void
4444
</flux:subheading>
4545
</div>
4646

47-
<flux:input wire:model="password" id="password" label="{{ __('Password') }}" type="password" name="password" />
47+
<flux:input wire:model="password" id="password" :label="__('Password')" type="password" name="password" />
4848

4949
<div class="flex justify-end space-x-2">
5050
<flux:modal.close>

resources/views/livewire/settings/password.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ public function updatePassword(): void
4040
<section class="w-full">
4141
@include('partials.settings-heading')
4242

43-
<x-settings.layout heading="{{ __('Update password') }}" subheading="{{ __('Ensure your account is using a long, random password to stay secure') }}">
43+
<x-settings.layout :heading="__('Update password')" :subheading="__('Ensure your account is using a long, random password to stay secure')">
4444
<form wire:submit="updatePassword" class="mt-6 space-y-6">
4545
<flux:input
4646
wire:model="current_password"
4747
id="update_password_current_passwordpassword"
48-
label="{{ __('Current password') }}"
48+
:label="__('Current password')"
4949
type="password"
5050
name="current_password"
5151
required
@@ -54,7 +54,7 @@ public function updatePassword(): void
5454
<flux:input
5555
wire:model="password"
5656
id="update_password_password"
57-
label="{{ __('New password') }}"
57+
:label="__('New password')"
5858
type="password"
5959
name="password"
6060
required
@@ -63,7 +63,7 @@ public function updatePassword(): void
6363
<flux:input
6464
wire:model="password_confirmation"
6565
id="update_password_password_confirmation"
66-
label="{{ __('Confirm Password') }}"
66+
:label="__('Confirm Password')"
6767
type="password"
6868
name="password_confirmation"
6969
required

resources/views/livewire/settings/profile.blade.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,12 @@ public function resendVerificationNotification(): void
7272
<section class="w-full">
7373
@include('partials.settings-heading')
7474

75-
<x-settings.layout heading="{{ __('Profile') }}" subheading="{{ __('Update your name and email address') }}">
75+
<x-settings.layout :heading="__('Profile')" :subheading="__('Update your name and email address')">
7676
<form wire:submit="updateProfileInformation" class="my-6 w-full space-y-6">
77-
<flux:input wire:model="name" label="{{ __('Name') }}" type="text" name="name" required autofocus autocomplete="name" />
77+
<flux:input wire:model="name" :label="__('Name')" type="text" name="name" required autofocus autocomplete="name" />
7878

7979
<div>
80-
<flux:input wire:model="email" label="{{ __('Email') }}" type="email" name="email" required autocomplete="email" />
80+
<flux:input wire:model="email" :label="__('Email')" type="email" name="email" required autocomplete="email" />
8181

8282
@if (auth()->user() instanceof \Illuminate\Contracts\Auth\MustVerifyEmail &&! auth()->user()->hasVerifiedEmail())
8383
<div>

0 commit comments

Comments
 (0)