Skip to content
This repository was archived by the owner on Sep 28, 2019. It is now read-only.

Commit 0d460ea

Browse files
authored
Merge pull request #15 from avored/dev
merging dev to master
2 parents 669a723 + 9b21107 commit 0d460ea

File tree

20 files changed

+414
-107
lines changed

20 files changed

+414
-107
lines changed

resources/lang/en/lang.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php
22

33
return [
4-
54
/*
65
|--------------------------------------------------------------------------
76
| AvoRed E commerce Languages
@@ -25,7 +24,9 @@
2524
'admin-login-card-title' => 'AvoRed Admin Login',
2625
'admin-login-forget-password-link' => 'Forgot your Password?',
2726
'admin-login-button-title' => 'Login',
27+
'admin-reset-button-title' => 'Send Password Reset Link',
2828
'admin-password-label' => 'Password',
29+
'admin-confirm-password-label' => 'Confirm Password',
2930
'admin-email-label' => 'Email Address',
3031

3132
'admin-dashboard-total-user-title' => 'Total User',
@@ -40,5 +41,4 @@
4041
'address.configuration.title' => 'Address Configuration List',
4142

4243
'cancel' => 'Cancel',
43-
4444
];

resources/views/attribute/_fields.blade.php

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
1-
@include('avored-ecommerce::forms.text',['name' => 'name','label' => __('avored-ecommerce::attribute.name')])
2-
@include('avored-ecommerce::forms.text',['name' => 'identifier','label' => __('avored-ecommerce::attribute.identifier')])
1+
2+
<avored-form-input
3+
field-name="name"
4+
label="{{ __('avored-ecommerce::attribute.name') }}"
5+
field-value="{!! $model->name ?? "" !!}"
6+
error-text="{!! $errors->first('name') !!}"
7+
v-on:change="changeModelValue"
8+
autofocus="autofocus"
9+
>
10+
</avored-form-input>
11+
12+
<avored-form-input
13+
field-name="identifier"
14+
label="{{ __('avored-ecommerce::attribute.identifier') }}"
15+
field-value="{!! $model->identifier ?? "" !!}"
16+
error-text="{!! $errors->first('identifier') !!}"
17+
v-on:change="changeModelValue"
18+
>
19+
</avored-form-input>
320

421

522
<?php
@@ -8,13 +25,12 @@
825
926
$randomString = substr(str_shuffle(str_repeat($pool, 6)), 0, 6);
1027
11-
$hiddenClass = "";
28+
$hiddenClass = '';
1229
$editMode = false;
1330
14-
1531
if (isset($model) && $model->attributeDropdownOptions->count() > 0) {
1632
$editMode = true;
17-
$hiddenClass = "";
33+
$hiddenClass = '';
1834
}
1935
?>
2036

resources/views/attribute/create.blade.php

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@section('content')
44

5-
<div class="row">
5+
<div id="admin-attribute-page" class="row">
66
<div class="col-12">
77
<div class="card">
88
<div class="card-header">{{ __('avored-ecommerce::attribute.create') }}</div>
@@ -25,4 +25,28 @@
2525

2626
</div>
2727
</div>
28-
@endsection
28+
@endsection
29+
30+
@push('scripts')
31+
32+
<script>
33+
34+
var app = new Vue({
35+
el: '#admin-attribute-page',
36+
data : {
37+
model: {},
38+
autofocus:true,
39+
disabled: false
40+
41+
},
42+
methods: {
43+
changeModelValue: function(val,fieldName) {
44+
this.model[fieldName] = val;
45+
}
46+
}
47+
});
48+
49+
</script>
50+
51+
52+
@endpush

resources/views/attribute/edit.blade.php

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
@section('content')
44

5-
<div class="row">
5+
<div id="admin-attribute-page" class="row">
66
<div class="col-12">
77
<div class="card">
88
<div class="card-header">{{ __('avored-ecommerce::attribute.edit') }}</div>
@@ -27,4 +27,28 @@
2727
</div>
2828
</div>
2929

30-
@endsection
30+
@endsection
31+
32+
@push('scripts')
33+
34+
<script>
35+
36+
var app = new Vue({
37+
el: '#admin-attribute-page',
38+
data : {
39+
model: {},
40+
autofocus:true,
41+
disabled: false
42+
43+
},
44+
methods: {
45+
changeModelValue: function(val,fieldName) {
46+
this.model[fieldName] = val;
47+
}
48+
}
49+
});
50+
51+
</script>
52+
53+
54+
@endpush

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

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,22 @@
4141
action="{{ route('admin.password.reset.token') }}">
4242
@csrf
4343

44-
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
45-
<label for="email" >E-Mail Address</label>
46-
<input v-model="email" id="email" type="email" class="form-control" name="email"
47-
value="{{ old('email') }}" required>
48-
49-
@if ($errors->has('email'))
50-
<span class="help-block">
51-
<strong>{{ $errors->first('email') }}</strong>
52-
</span>
53-
@endif
54-
55-
</div>
44+
<avored-form-input
45+
field-name="email"
46+
label="{{ __('avored-ecommerce::lang.admin-email-label') }}"
47+
error-text="{!! $errors->first('email') !!}"
48+
v-on:change="changeModelValue"
49+
autofocus="autofocus"
50+
>
51+
</avored-form-input>
5652

5753
<div class="form-group">
58-
59-
<button type="submit" :disabled="isLoginDisbled" class="btn btn-primary">
60-
Send Password Reset Link
54+
55+
<button
56+
type="submit"
57+
:disabled='isSendPasswordSubmitDisbled'
58+
class="btn btn-primary">
59+
{{ __('avored-ecommerce::lang.admin-reset-button-title') }}
6160
</button>
6261

6362
</div>
@@ -80,17 +79,23 @@
8079
var app = new Vue({
8180
el: '#reset-password-page',
8281
data : {
83-
email: ''
82+
email: '',
83+
autofocus:true
8484
},
8585
computed: {
86-
isLoginDisbled: function() {
87-
86+
isSendPasswordSubmitDisbled: function() {
8887
if(this.email != "") {
8988
return false;
9089
}
91-
9290
return true;
93-
91+
}
92+
},
93+
methods: {
94+
changeModelValue: function(val,fieldName) {
95+
96+
if(fieldName == "email") {
97+
this.email = val;
98+
}
9499
}
95100
}
96101
});

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

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -36,44 +36,36 @@
3636
action="{{ route('admin.password.email.post') }}">
3737
@csrf
3838

39-
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
40-
<label for="email">E-Mail Address</label>
41-
<input v-model="email" id="email" type="email" class="form-control" name="email"
42-
value="{{ $email or old('email') }}" required autofocus>
39+
<avored-form-input
40+
field-name="email"
41+
label="{{ __('avored-ecommerce::lang.admin-email-label') }}"
42+
error-text="{!! $errors->first('email') !!}"
43+
v-on:change="changeModelValue"
44+
autofocus="autofocus"
45+
>
46+
</avored-form-input>
47+
48+
<avored-form-input
49+
field-name="password"
50+
field-type="password"
51+
label="{{ __('avored-ecommerce::lang.admin-password-label') }}"
52+
error-text="{!! $errors->first('password') !!}"
53+
v-on:change="changeModelValue"
54+
55+
>
56+
</avored-form-input>
57+
58+
<avored-form-input
59+
field-name="password_confirmation"
60+
field-type="password"
61+
label="{{ __('avored-ecommerce::lang.admin-confirm-password-label') }}"
62+
error-text="{!! $errors->first('password_confirmation') !!}"
63+
v-on:change="changeModelValue"
64+
65+
>
66+
</avored-form-input>
4367

44-
@if ($errors->has('email'))
45-
<span class="help-block">
46-
<strong>{{ $errors->first('email') }}</strong>
47-
</span>
48-
@endif
4968

50-
</div>
51-
52-
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
53-
<label for="password">Password</label>
54-
<input v-model="password" id="password" type="password" class="form-control" name="password" required>
55-
56-
@if ($errors->has('password'))
57-
<span class="help-block">
58-
<strong>{{ $errors->first('password') }}</strong>
59-
</span>
60-
@endif
61-
62-
</div>
63-
64-
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
65-
<label for="password-confirm">Confirm Password</label>
66-
<input v-model="password_confirmation" id="password-confirm"
67-
type="password" class="form-control"
68-
name="password_confirmation" required>
69-
70-
@if ($errors->has('password_confirmation'))
71-
<span class="help-block">
72-
<strong>{{ $errors->first('password_confirmation') }}</strong>
73-
</span>
74-
@endif
75-
76-
</div>
7769

7870
<div class="form-group">
7971
<button :disabled='isLoginDisbled' type="submit" class="btn btn-primary">
@@ -105,11 +97,20 @@
10597
computed: {
10698
isLoginDisbled: function() {
10799
108-
if(this.email != "" && this.password != "" && this.password_confirmation != "" && this.password == this.password_confirmation) {
100+
if(this.email != "" &&
101+
this.password != "" &&
102+
this.password_confirmation != "" &&
103+
this.password == this.password_confirmation) {
109104
return false;
110105
}
111106
return true;
112107
108+
}
109+
},
110+
methods: {
111+
changeModelValue: function(val,fieldName) {
112+
this[fieldName] = val;
113+
113114
}
114115
}
115116
});

resources/views/category/_fields.blade.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
2-
3-
41
<avored-form-input
52
field-name="name"
63
label="Category Name"

resources/views/layouts/app.blade.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@
4848

4949
</div>
5050
@endif
51+
@if(session()->has('errorNotificationText'))
52+
<div class="alert alert-danger alert-dismissible" role="alert">
53+
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
54+
aria-hidden="true">&times;</span></button>
55+
56+
<strong>Opps!</strong> {{ session()->get('errorNotificationText') }}
57+
58+
</div>
59+
@endif
5160
</div>
5261
</div>
5362
{!! Breadcrumb::render(Route::getCurrentRoute()->getName() ) !!}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
@extends('avored-ecommerce::layouts.app')
2+
3+
@section('content')
4+
5+
<div class="row">
6+
<div class="col-md-12">
7+
<div class="card">
8+
<div class="card-header">
9+
{{ __('avored-ecommerce::module.module-upload') }}
10+
</div>
11+
<div class="card-body">
12+
<form method="post"
13+
action="{{ route('admin.module.store') }}"
14+
enctype="multipart/form-data">
15+
16+
@csrf()
17+
18+
<div class="form-group">
19+
<label for="module_zip_file">
20+
{{ __('avored-ecommerce::module.module-upload-file') }}
21+
</label>
22+
<input type="file"
23+
class="form-control"
24+
name="module_zip_file"
25+
id="module_zip_file"/>
26+
</div>
27+
28+
<div class="form-group">
29+
<button type="submit" class="btn btn-primary">
30+
{{ __('avored-ecommerce::module.module-upload') }}
31+
</button>
32+
33+
<a href="{{ route('admin.module.index') }}" class="btn">Cancel</a>
34+
</div>
35+
36+
</form>
37+
38+
</div>
39+
</div>
40+
</div>
41+
</div>
42+
@endsection

0 commit comments

Comments
 (0)