Skip to content

Commit 39c5c0d

Browse files
committed
fixed the language and some design issue
1 parent 6a17f8e commit 39c5c0d

File tree

13 files changed

+269
-144
lines changed

13 files changed

+269
-144
lines changed

app/Http/Controllers/Auth/ForgotPasswordController.php

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Http\Controllers\Controller;
66
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
7+
use Illuminate\Http\Request;
78
use Illuminate\Support\Facades\Auth;
89
use Illuminate\Support\Facades\Password;
910

@@ -19,9 +20,7 @@ class ForgotPasswordController extends Controller
1920
| your application to your users. Feel free to explore this trait.
2021
|
2122
*/
22-
23-
use SendsPasswordResetEmails;
24-
23+
2524
/**
2625
* Create a new controller instance.
2726
*
@@ -50,4 +49,72 @@ public function broker()
5049
{
5150
return Password::broker('customers');
5251
}
52+
53+
54+
/**
55+
* Display the form to request a password reset link.
56+
*
57+
* @return \Illuminate\Http\Response
58+
*/
59+
public function showLinkRequestForm()
60+
{
61+
return view('auth.passwords.email');
62+
}
63+
64+
/**
65+
* Get the response for a successful password reset link.
66+
*
67+
* @param \Illuminate\Http\Request $request
68+
* @param string $response
69+
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
70+
*/
71+
protected function sendResetLinkResponse(Request $request, $response)
72+
{
73+
return back()->with('status', trans($response));
74+
}
75+
76+
77+
/**
78+
* Get the needed authentication credentials from the request.
79+
*
80+
* @param \Illuminate\Http\Request $request
81+
* @return array
82+
*/
83+
protected function credentials(Request $request)
84+
{
85+
return $request->only('email');
86+
}
87+
/**
88+
* Validate the email for the given request.
89+
*
90+
* @param \Illuminate\Http\Request $request
91+
* @return void
92+
*/
93+
protected function validateEmail(Request $request)
94+
{
95+
$request->validate(['email' => 'required|email']);
96+
}
97+
98+
/**
99+
* Send a reset link to the given user.
100+
*
101+
* @param \Illuminate\Http\Request $request
102+
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
103+
*/
104+
public function sendResetLinkEmail(Request $request)
105+
{
106+
107+
$this->validateEmail($request);
108+
109+
// We will send the password reset link to this user. Once we have attempted
110+
// to send the link, we will examine the response then see the message we
111+
// need to show to the user. Finally, we'll send out a proper response.
112+
$response = $this->broker()->sendResetLink(
113+
$this->credentials($request)
114+
);
115+
116+
return $response == Password::RESET_LINK_SENT
117+
? $this->sendResetLinkResponse($request, $response)
118+
: $this->sendResetLinkFailedResponse($request, $response);
119+
}
53120
}

resources/js/avored.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11

2-
window.Vue = require('vue')
2+
import Vue from 'vue'
3+
4+
window.Vue = Vue
35

46
window.AvoRed = (function() {
57
return {

resources/lang/en/avored.php

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,24 @@
5252
'create_address' => 'Create Address',
5353
'create' => 'Create',
5454
'show_order' => 'Show Order',
55-
'add_to_cart' => 'Add to cart'
55+
'add_to_cart' => 'Add to cart',
56+
'reset_password' => 'Reset Password',
57+
'password_update' => 'Update your password',
58+
'cart_page' => 'Cart Page',
59+
'product' => 'Product',
60+
'qty' => 'Qty',
61+
'unit_price' => 'Unit Price',
62+
'total_price' => 'Total Price',
63+
'subtotal' => 'Sub Total',
64+
'discount_coupon' => 'Discount Coupon',
65+
'apply' => 'Apply',
66+
'discount' => 'Discount',
67+
'total' => 'Total',
68+
'checkout' => 'Checkout',
69+
'checkout_page' => 'Checkout Page',
70+
'user_shipping_address' => 'User shipping address',
71+
'place_order' => 'Place Order',
72+
'payment_options' => 'Payment Options',
73+
'cart_information' => 'Cart Information'
5674

5775
];

resources/views/auth/passwords/email.blade.php

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
@extends('layouts.app')
22

33
@section('breadcrumb')
4-
<div class="bg-gray-200 p-3 rounded text-sm mb-5">
5-
<ol class="list-reset flex text-gray-700">
6-
<li>
7-
<a class="text-gray-700" href="{{ route('home') }}" title="home">
8-
{{ __('avored.home') }} >>
9-
</a>
10-
</li>
11-
<li> <span class="">{{ __('avored.reset_password') }}</span></li>
12-
</ol>
13-
</div>
4+
<nav class="text-black bg-gray-400 rounded mb-5 py-2 px-5" aria-label="Breadcrumb">
5+
<ol class="list-none p-0 inline-flex">
6+
<li class="flex items-center">
7+
<a href="{{ route('home') }}" class="text-gray-700" title="home">
8+
{{ __('avored.home') }}
9+
</a>
10+
<svg class="fill-current w-3 h-3 mx-3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg>
11+
</li>
12+
13+
<li class="flex items-center">
14+
<a href="#" class="text-gray-700" title="home">
15+
{{ __('avored.reset_password') }}
16+
</a>
17+
</li>
18+
19+
</ol>
20+
</nav>
1421
@endsection
1522

1623
@section('content')

resources/views/auth/passwords/reset.blade.php

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
@extends('layouts.app')
22

33
@section('breadcrumb')
4-
<div class="bg-gray-200 p-3 rounded text-sm mb-5">
5-
<ol class="list-reset flex text-gray-700">
6-
<li>
7-
<a class="text-gray-700" href="{{ route('home') }}" title="home">
8-
{{ __('avored.home') }} >>
9-
</a>
10-
</li>
11-
<li> <span class="">{{ __('avored.password_update') }}</span></li>
12-
</ol>
13-
</div>
4+
<nav class="text-black bg-gray-400 rounded mb-5 py-2 px-5" aria-label="Breadcrumb">
5+
<ol class="list-none p-0 inline-flex">
6+
<li class="flex items-center">
7+
<a href="{{ route('home') }}" class="text-gray-700" title="home">
8+
{{ __('avored.home') }}
9+
</a>
10+
<svg class="fill-current w-3 h-3 mx-3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg>
11+
</li>
12+
13+
<li class="flex items-center">
14+
<a href="#" class="text-gray-700" title="home">
15+
{{ __('avored.password_update') }}
16+
</a>
17+
</li>
18+
19+
</ol>
20+
</nav>
1421
@endsection
1522

1623
@section('content')

resources/views/cart/show.blade.php

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
@extends('layouts.app')
22

33
@section('breadcrumb')
4-
5-
<div class="bg-gray-200 p-3 rounded text-sm mb-5">
6-
<ol class="list-reset flex text-gray-700">
7-
<li>
8-
<a class="text-gray-700" href="{{ route('home') }}" title="home">
9-
{{ __('avored.home') }} >>
10-
</a>
11-
</li>
12-
<li> <span class="">{{ __('avored.cart') }}</span></li>
13-
</ol>
14-
</div>
4+
<nav class="text-black bg-gray-400 rounded mb-5 py-2 px-5" aria-label="Breadcrumb">
5+
<ol class="list-none p-0 inline-flex">
6+
<li class="flex items-center">
7+
<a href="{{ route('home') }}" class="text-gray-700" title="home">
8+
{{ __('avored.home') }}
9+
</a>
10+
<svg class="fill-current w-3 h-3 mx-3" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"/></svg>
11+
</li>
12+
13+
<li class="flex items-center">
14+
<a href="#" class="text-gray-700" title="home">
15+
{{ __('avored.cart_page') }}
16+
</a>
17+
</li>
18+
19+
</ol>
20+
</nav>
1521
@endsection
1622

1723
@section('content')
@@ -28,7 +34,7 @@
2834

2935
<div class="my-6">
3036
<h1 class="mb-6 text-red-800 font-semibold text-2xl">
31-
{{ __('avored.cart') }} {{ __('avored.page') }}
37+
{{ __('avored.cart_page') }}
3238
</h1>
3339
<div class="w-full p-8 text-gray-800 bg-white shadow-lg">
3440

@@ -159,22 +165,24 @@ class="lg:px-4 lg:py-2 m-2 lg:text-lg font-bold text-center text-gray-900"
159165
@click="applyPromotionCodeClicked"
160166
type="button"
161167
class="ml-3 bg-red-500 text-white text-xs px-2 py-3 leading-6 rounded">
162-
{{ __('avored.btn.apply') }}
168+
{{ __('avored.apply') }}
163169
</button>
164170
</div>
165171
</div>
166172
</div>
167-
<div class="flex justify-between pt-4 border-b">
168-
<div
169-
class="lg:px-4 lg:py-2 m-2 text-lg lg:text-xl font-bold text-center text-gray-800"
170-
>
171-
{{ __('avored.discount') }}
172-
</div>
173-
<div class="lg:px-4 lg:py-2 m-2 lg:text-lg font-bold text-center text-gray-900">
174-
<span v-if="parseFloat(discountTotal)>0">-</span>
175-
@{{ defaultCurrency.symbol }}@{{ discountTotal }}
173+
@if (Cart::discount() > 0)
174+
<div class="flex justify-between pt-4 border-b">
175+
<div
176+
class="lg:px-4 lg:py-2 m-2 text-lg lg:text-xl font-bold text-center text-gray-800"
177+
>
178+
{{ __('avored.discount') }}
179+
</div>
180+
<div class="lg:px-4 lg:py-2 m-2 lg:text-lg font-bold text-center text-gray-900">
181+
<span v-if="parseFloat(discountTotal)>0">-</span>
182+
@{{ defaultCurrency.symbol }}@{{ discountTotal }}
183+
</div>
176184
</div>
177-
</div>
185+
@endif
178186
<div class="flex justify-between pt-4 border-b">
179187
<div
180188
class="lg:px-4 lg:py-2 m-2 text-lg lg:text-xl font-bold text-center text-gray-800"

resources/views/category/card/filters.blade.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
12
@foreach ($categoryFilters as $categoryFilter)
2-
<div class="rounded border">
3-
<div class="border-b p-5">{{ $categoryFilter->filter->name }}</div>
3+
<div class="mb-5 rounded border">
4+
<div class="border-b p-5">
5+
{{ $categoryFilter->filter->name }}
6+
</div>
7+
48
<div class="p-5">
59
@if($categoryFilter->type == 'PROPERTY' && $categoryFilter->filter->use_for_category_filter)
610
@if (
@@ -38,8 +42,9 @@
3842
@foreach ($categoryFilter->filter->dropdown as $dropdownOption)
3943
<p>
4044

41-
<input type="checked"
42-
@if(request()->get('a___' . $categoryFilter->filter->slug) !== null &&
45+
<input type="checkbox"
46+
@if(
47+
request()->get('a___' . $categoryFilter->filter->slug) !== null &&
4348
in_array($dropdownOption->id, request()->get('a___' . $categoryFilter->filter->slug))
4449
)
4550
checked
@@ -49,13 +54,14 @@
4954
'{{ $categoryFilter->filter->slug }}',
5055
'{{ $dropdownOption->id }}',
5156
'ATTRIBUTE')"
52-
/>
57+
>
5358
{{ $dropdownOption->display_text }}
5459

5560
</p>
5661
@endforeach
5762
@endif
5863
@endif
5964
</div>
65+
6066
</div>
6167
@endforeach

0 commit comments

Comments
 (0)