Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #57 from herpaderpaldent/1.5.2
Browse files Browse the repository at this point in the history
Version 1.5.2
  • Loading branch information
herpaderpaldent authored Nov 29, 2018
2 parents 826953c + aa2039e commit dbc8ef2
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 11 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# Version 1.5.2
This is a minor usability update. All of the found improvements are based from @Eingang's Feedback. Whenever you find any issues please don't hesitate to open an issue.
* Empty corporation affiliation request caused an error. This update adds validation to form request
* Added front end validation to corporation title affiliation
* Corrected an error preventing to add multiple user groups to hidden seatgroup.

Thank you again for your feedback.

# Version 1.5.1
This is a security update including some smaller improvements:
* MissingRefreshToken Exception removed, however potentially gained roles by missing character are seized until refresh token is provided. Thank you @fundaris for report this issue.
Expand Down
8 changes: 4 additions & 4 deletions src/Http/Controllers/SeatGroupUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,16 +169,16 @@ public function update(Request $request, $id)

//Handle hidden group
if ($seatgroup->type == 'hidden') {
if(auth()->user()->hasRole('seatgroups.create')) {
if (auth()->user()->hasRole('seatgroups.create')) {
$this->validate(request(), [
'groups'=>'required',
'groups' => 'required|array',
]);
$groups = $request->get('groups');
foreach ($groups as $group) {
$seatgroup->group()->attach($group);

return redirect()->back()->with('success', 'Updated');
}

return redirect()->back()->with('success', 'Updated');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public function rules()
{

return [
//'corporation_ids.*'=>'required',
'seatgroup_id'=>'required',
'corporation_ids' => 'required|array',
'seatgroup_id' => 'required',
];
}
}
2 changes: 1 addition & 1 deletion src/config/seatgroups.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Time: 10:24.
*/
return [
'version' => '1.5.1',
'version' => '1.5.2',
];

//TODO: Update Version
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<input type="hidden" name="seatgroup_id" value="{{ $seatgroup->id }}">
<div class="form-group">
<label for="corporations">{{ trans('web::seat.available_corporations') }}</label>
<select name="corporation_ids[]" id="seat-group-corporation-id" style="width: 100%" multiple>
<select name="corporation_ids[]" id="seat-group-corporation-id" style="width: 100%" multiple required>

@if(!$seatgroup->all_corporations)
<option value="-1">All Corporation</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="form-group">
<label for="corporations">{{ trans('web::seat.available_corporations') }}</label>
<select name="seatgroup-corporation-id" id="seatgroup-corporation-id" style="width: 100%" >
<select name="seatgroup-corporation-id" id="seatgroup-corporation-id" style="width: 100%" required>
<option></option>
@if(!$seatgroup->all_corporations)
@foreach($all_corporations_for_title as $corporation)
Expand All @@ -17,7 +17,7 @@

<div class="form-group">
<label for="corporation-title">{{ trans_choice('web::seat.corporation_titles', 2)}}</label>
<select name="seatgroup-title-id" id="seatgroup-title-id" style="width: 100%">
<select name="seatgroup-title-id" id="seatgroup-title-id" style="width: 100%" required>
<option></option>
</select>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/resources/views/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
<input name="_method3" type="hidden" value="PATCH">
<div class="form-group">
<label for="groups">{{ trans_choice('web::seat.available_groups',2) }}</label>
<select name="groups[]" id="available_users" style="width: 100%" multiple>
<select name="groups[]" id="available_users" style="width: 100%" multiple required>

@foreach($all_groups as $group)
@if(!in_array($group->id,$seatgroup->member->pluck('id')->toArray())))
Expand Down

0 comments on commit dbc8ef2

Please sign in to comment.