Skip to content

Commit

Permalink
fix: validations, format errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshadhin committed Sep 4, 2020
1 parent 34dbb65 commit ded3888
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.1 # 2020-09-02
- Update libs
- Fixed minor bugs

## 3.0.0 # 2020-07-16
- Upgrade support to PHP 7.2 from 7.1
- Upgraded to Laravel 6(LTS) from 5.8
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Backend/ClassProfileController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function store(Request $request)

ClassProfile::create($data);

return redirect()->back()->with('success', 'New class profile created.');
return redirect()->route('class_profile.create')->with('success', 'New class profile created.');
}

public function edit($id)
Expand Down
5 changes: 4 additions & 1 deletion app/Http/Controllers/Backend/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,9 @@ public function contactUs(Request $request)
['meta_key' => 'contact_latlong'],
[ 'meta_value' => $request->get('latlong')]
);

Cache::forget('site_metas');

return redirect()->route('site.contact_us')->with('success', 'Information saved!');
}

Expand Down Expand Up @@ -517,7 +520,7 @@ public function settings(Request $request)
];
$this->validate($request, [
'name' => 'required|min:5|max:255',
'short_name' => 'required|min:5|max:255',
'short_name' => 'required|min:3|max:255',
'logo' => 'nullable|mimes:jpeg,jpg,png|max:1024|dimensions:min_width=82,min_height=72,max_width=82,max_height=72',
'logo2x' => 'nullable|mimes:jpeg,jpg,png|max:1024|dimensions:min_width=162,min_height=142,max_width=162,max_height=142',
'favicon' => 'nullable|mimes:png|max:512|dimensions:min_width=32,min_height=32,max_width=32,max_height=32',
Expand Down
7 changes: 3 additions & 4 deletions resources/assets/backend/js/Site.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,10 +321,9 @@ export default class Site {
});

$(".event_time").datetimepicker({
format: "dd/mm/yyyy HH:ii P",
showMeridian: true,
autoclose: true,
todayBtn: true
format: "DD/MM/YYYY LT",
viewMode: 'days',
ignoreReadonly: true
});

}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/backend/partial/leftsidebar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
<span class="pull-right-container"><i class="fa fa-angle-left pull-right"></i></span>
</a>
<ul class="treeview-menu">
@can('site.index')
@can('slider.index')
<li><a href="{{URL::route('slider.index')}}"><i class="fa fa-picture-o text-aqua"></i> Sliders</a></li>
@endcan
@can('site.about_content')
Expand Down
3 changes: 0 additions & 3 deletions resources/views/backend/site/event/add.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@
<script type="text/javascript">
$(document).ready(function () {
Site.EventInit();
});
</script>
@endsection
Expand Down
4 changes: 2 additions & 2 deletions resources/views/backend/site/home/about/content.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@
</div>
<div class="form-group has-feedback">
<label for="key_point_1_title">Key point 1 title<span class="text-danger">*</span></label>
<input type="text" class="form-control" name="key_point_1_title" required placeholder="title" value="@if($content) {{ $content->key_point_1_title }} @endif" required minlength="5" maxlength="100">
<input type="text" class="form-control" name="key_point_1_title" required placeholder="title" value="@if($content){{ trim($content->key_point_1_title) }}@endif" required minlength="5" maxlength="100">
<span class="glyphicon glyphicon-info form-control-feedback"></span>
<span class="text-danger">{{ $errors->first('key_point_1_title') }}</span>
</div>
<div class="form-group has-feedback">
<label for="key_point_1_content">Key point 1 Content<span class="text-danger">*</span></label>
<textarea name="key_point_1_content" class="form-control textarea" required >@if($content) {{ $content->key_point_1_content }} @endif</textarea>
<textarea name="key_point_1_content" class="form-control textarea" required >@if($content){{ trim($content->key_point_1_content) }}@endif</textarea>
<span class="glyphicon glyphicon-info form-control-feedback"></span>
<span class="text-danger">{{ $errors->first('key_point_1_content') }}</span>
</div>
Expand Down
10 changes: 4 additions & 6 deletions resources/views/backend/site/timeline.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,10 @@
Site.timeLineInit();
initDeleteDialog();
$(".year").datetimepicker({
format: "yyyy",
autoclose: true,
startView: 'decade',
minView:'decade',
maxView:'decade',
viewSelect:'decade'
format: "YYYY",
viewMode: 'years',
ignoreReadonly: true,
useCurrent: false
});
});
</script>
Expand Down

0 comments on commit ded3888

Please sign in to comment.