Skip to content

Commit

Permalink
Merge pull request #1127 from SpeedyD/merge/17Nov2024
Browse files Browse the repository at this point in the history
Release to Develop merge November 17th 2024
  • Loading branch information
itinerare authored Nov 17, 2024
2 parents d4d47ca + eea25dd commit 3e200bc
Show file tree
Hide file tree
Showing 22 changed files with 140 additions and 52 deletions.
7 changes: 7 additions & 0 deletions public/js/bs-custom-file-input.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions resources/views/account/settings.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,9 @@
</div>
@endif
{!! Form::open(['url' => 'account/avatar', 'files' => true]) !!}
<div class="form-group row">
{!! Form::label('avatar', 'Update Profile Image', ['class' => 'col-md-2 col-form-label']) !!}
<div class="col-md-10">
{!! Form::file('avatar', ['class' => 'form-control']) !!}
</div>
<div class="custom-file mb-1">
{!! Form::label('avatar', 'Update Profile Image', ['class' => 'custom-file-label']) !!}
{!! Form::file('avatar', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-right">
{!! Form::submit('Edit', ['class' => 'btn btn-primary']) !!}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($category->has_image)
<div class="form-check">
Expand Down
46 changes: 28 additions & 18 deletions resources/views/admin/currencies/create_edit_currency.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,37 @@
</div>

<div class="row">
<div class="col-md-6 form-group">
{!! Form::label('Icon Image (Optional)') !!} {!! add_help('This will be used to denote the currency. If not provided, the abbreviation will be used.') !!}
{!! Form::file('icon') !!}
<div class="text-muted">Recommended height: 16px</div>
@if ($currency->has_icon)
<div class="form-check">
{!! Form::checkbox('remove_icon', 1, false, ['class' => 'form-check-input']) !!}
{!! Form::label('remove_icon', 'Remove current image', ['class' => 'form-check-label']) !!}
<div class="col-md-6">
<div class="form-group">
{!! Form::label('Icon Image (Optional)') !!} {!! add_help('This will be used to denote the currency. If not provided, the abbreviation will be used.') !!}
<div class="custom-file">
{!! Form::label('icon', 'Choose icon file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('icon', ['class' => 'custom-file-input']) !!}
</div>
@endif
<div class="text-muted">Recommended height: 16px</div>
@if ($currency->has_icon)
<div class="form-check">
{!! Form::checkbox('remove_icon', 1, false, ['class' => 'form-check-input']) !!}
{!! Form::label('remove_icon', 'Remove current image', ['class' => 'form-check-label']) !!}
</div>
@endif
</div>
</div>
<div class="col-md-6 form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
{!! Form::file('image') !!}
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($currency->has_image)
<div class="form-check">
{!! Form::checkbox('remove_image', 1, false, ['class' => 'form-check-input']) !!}
{!! Form::label('remove_image', 'Remove current image', ['class' => 'form-check-label']) !!}
<div class="col-md-6">
<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
@endif
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($currency->has_image)
<div class="form-check">
{!! Form::checkbox('remove_image', 1, false, ['class' => 'form-check-input']) !!}
{!! Form::label('remove_image', 'Remove current image', ['class' => 'form-check-label']) !!}
</div>
@endif
</div>
</div>
</div>

Expand Down
5 changes: 4 additions & 1 deletion resources/views/admin/features/create_edit_feature.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($feature->has_image)
<div class="form-check">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($category->has_image)
<div class="form-check">
Expand Down
16 changes: 11 additions & 5 deletions resources/views/admin/files/images.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
@foreach ($images as $key => $image)
<div class="card mb-3">
<div class="card-body">
<div class="d-flex">
<div class="d-flex flex-column flex-sm-row">
<div class="mr-2" style="width: 200px;"><img src="{{ asset('images/' . $image['filename']) }}" class="mw-100" alt="Site image: {{ $image['name'] }}" /></div>
<div style="width: 100%;">
<h3 class="card-heading">{{ $image['name'] }} <a href="{{ asset('images/' . $image['filename']) }}" class="btn btn-info btn-sm float-right">View Current</a></h3>
<p>{{ $image['description'] }}</p>
{!! Form::open(['url' => 'admin/images/upload', 'files' => true]) !!}
<div class="d-flex">
{!! Form::file('file', ['class' => 'form-control mr-2']) !!}
{!! Form::submit('Upload', ['class' => 'btn btn-primary']) !!}
<div class="custom-file">
{!! Form::label('file', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('file', ['class' => 'custom-file-input']) !!}
</div>
{!! Form::submit('Upload', ['class' => 'ml-1 btn btn-primary']) !!}
</div>
{!! Form::hidden('key', $key) !!}
{!! Form::close() !!}
Expand All @@ -42,8 +45,11 @@
<h3 class="card-heading">CSS <a href="{{ asset('css/custom.css') }}" class="btn btn-info btn-sm float-right">View Current</a></h3>
{!! Form::open(['url' => 'admin/images/upload/css', 'files' => true]) !!}
<div class="d-flex">
{!! Form::file('file', ['class' => 'form-control mr-2']) !!}
{!! Form::submit('Upload', ['class' => 'btn btn-primary']) !!}
<div class="custom-file">
{!! Form::label('file', 'Choose CSS...', ['class' => 'custom-file-label']) !!}
{!! Form::file('file', ['class' => 'custom-file-input']) !!}
</div>
{!! Form::submit('Upload', ['class' => 'ml-1 btn btn-primary']) !!}
</div>
{!! Form::close() !!}
</div>
Expand Down
11 changes: 8 additions & 3 deletions resources/views/admin/files/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,10 @@
<p>Select a file to upload. (Maximum size {{ min(ini_get('upload_max_filesize'), ini_get('post_max_size')) }}B.)</p>
<div id="fileList">
<div class="d-flex mb-2">
{!! Form::file('files[]', ['class' => 'form-control']) !!}
<div class="custom-file">
{!! Form::label('files[]', 'No file selected.', ['class' => 'custom-file-label']) !!}
{!! Form::file('files[]', ['class' => 'custom-file-input']) !!}
</div>
</div>
</div>
<div class="text-right">
Expand All @@ -189,8 +192,9 @@
Add File
</div>
{!! Form::close() !!}
<div class="file-row hide mb-2">
{!! Form::file('files[]', ['class' => 'form-control']) !!}
<div class="file-row custom-file hide mb-2">
{!! Form::label('files[]', 'No file selected.', ['class' => 'custom-file-label']) !!}
{!! Form::file('files[]', ['class' => 'custom-file-input']) !!}
</div>
</div>
</div>
Expand All @@ -213,6 +217,7 @@ function addFileRow() {
$('#fileList').append($clone);
$clone.removeClass('hide file-row');
$clone.addClass('d-flex');
bsCustomFileInput.init();
}
/////////
Expand Down
5 changes: 4 additions & 1 deletion resources/views/admin/items/create_edit_item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 100px x 100px</div>
@if ($item->has_image)
<div class="form-check">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($category->has_image)
<div class="form-check">
Expand Down
10 changes: 8 additions & 2 deletions resources/views/admin/masterlist/create_character.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@
@else
{!! add_help('This is the full masterlist image. Note that the image is not protected in any way, so take precautions to avoid art/design theft.') !!}
@endif
<div>{!! Form::file('image', ['id' => 'mainImage']) !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input', 'id' => 'mainImage']) !!}
</div>
</div>
@if (config('lorekeeper.settings.masterlist_image_automation') === 1)
<div class="form-group">
Expand Down Expand Up @@ -172,7 +175,10 @@
<div class="card mb-3" id="thumbnailUpload">
<div class="card-body">
{!! Form::label('Thumbnail Image') !!} {!! add_help('This image is shown on the masterlist page.') !!}
<div>{!! Form::file('thumbnail') !!}</div>
<div class="custom-file">
{!! Form::label('thumbnail', 'Choose thumbnail...', ['class' => 'custom-file-label']) !!}
{!! Form::file('thumbnail', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: {{ config('lorekeeper.settings.masterlist_thumbnails.width') }}px x {{ config('lorekeeper.settings.masterlist_thumbnails.height') }}px</div>
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion resources/views/admin/prompts/create_edit_prompt.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 100px x 100px</div>
@if ($prompt->has_image)
<div class="form-check">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($category->has_image)
<div class="form-check">
Expand Down
5 changes: 4 additions & 1 deletion resources/views/admin/rarities/create_edit_rarity.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($rarity->has_image)
<div class="form-check">
Expand Down
5 changes: 4 additions & 1 deletion resources/views/admin/shops/create_edit_shop.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@

<div class="form-group">
{!! Form::label('Shop Image (Optional)') !!} {!! add_help('This image is used on the shop index and on the shop page as a header.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: None (Choose a standard size for all shop images)</div>
@if ($shop->has_image)
<div class="form-check">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($species->has_image)
<div class="form-check">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@

<div class="form-group">
{!! Form::label('World Page Image (Optional)') !!} {!! add_help('This image is used only on the world information pages.') !!}
<div>{!! Form::file('image') !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: 200px x 200px</div>
@if ($subtype->has_image)
<div class="form-check">
Expand Down
12 changes: 9 additions & 3 deletions resources/views/character/admin/_reupload_image_modal.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{!! Form::open(['url' => 'admin/character/image/' . $image->id . '/reupload', 'files' => true]) !!}
<div class="form-group">
{!! Form::label('Character Image') !!} {!! add_help('This is the full masterlist image. Note that the image is not protected in any way, so take precautions to avoid art/design theft.') !!}
<div>{!! Form::file('image', ['id' => 'mainImage']) !!}</div>
<div class="custom-file">
{!! Form::label('image', 'Choose file...', ['class' => 'custom-file-label']) !!}
{!! Form::file('image', ['class' => 'custom-file-input', 'id' => 'mainImage']) !!}
</div>
</div>
@if (config('lorekeeper.settings.masterlist_image_automation') === 1)
<div class="form-group">
Expand Down Expand Up @@ -36,7 +39,10 @@
<div class="card mb-3" id="thumbnailUpload">
<div class="card-body">
{!! Form::label('Thumbnail Image') !!} {!! add_help('This image is shown on the masterlist page.') !!}
<div>{!! Form::file('thumbnail') !!}</div>
<div class="custom-file">
{!! Form::label('thumbnail', 'Choose thumbnail...', ['class' => 'custom-file-label']) !!}
{!! Form::file('thumbnail', ['class' => 'custom-file-input']) !!}
</div>
<div class="text-muted">Recommended size: {{ config('lorekeeper.settings.masterlist_thumbnails.width') }}px x {{ config('lorekeeper.settings.masterlist_thumbnails.height') }}px</div>
</div>
</div>
Expand All @@ -49,7 +55,7 @@
<script>
$(document).ready(function() {
//$('#useCropper').bootstrapToggle();
bsCustomFileInput.init();
// Cropper ////////////////////////////////////////////////////////////////////////////////////
var $useCropper = $('#useCropper');
Expand Down
Loading

0 comments on commit 3e200bc

Please sign in to comment.