Added help text and more info in the modal

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-11-10 01:44:11 -08:00
parent 457c6080cc
commit 230a568145

View file

@ -1,4 +1,6 @@
@extends('layouts/default')
@extends('layouts/default', [
'helpText' => 'Backup files are located in: <code>'.$path.'</code>',
])
{{-- Page title --}}
@section('title')
@ -72,8 +74,8 @@
<span class="sr-only">{{ trans('general.delete') }}</span>
</a>
<a data-html="false"
href="{{ route('settings.backups.restore', $file['filename']) }}" class="btn btn-warning btn-sm restore-asset {{ (config('app.lock_passwords')) ? ' disabled': '' }}" data-toggle="modal" data-content="Yes, restore it. I acknowledge that this will overwrite any existing data currently in the database. This method does not currently support installations that use S3 for file storage." data-title="Are you sure you wish to restore your database from {{ $file['filename']}}?" onClick="return false;">
<a data-html="true"
href="{{ route('settings.backups.restore', $file['filename']) }}" class="btn btn-warning btn-sm restore-asset {{ (config('app.lock_passwords')) ? ' disabled': '' }}" data-toggle="modal" data-content="Yes, restore it. I acknowledge that this will overwrite any existing data currently in the database. This method does not currently support installations that use S3 for file storage. This will also log out all of your existing users (including you)." data-title="Are you sure you wish to restore your database from {{ $file['filename']}}?" onClick="return false;">
<i class="fas fa-retweet" aria-hidden="true"></i>
<span class="sr-only">Restore</span>
</a>
@ -91,36 +93,47 @@
<!-- side address column -->
<div class="col-md-3">
<h2 style="margin-top: 0px">Upload Backup</h2>
{{ Form::open([
'method' => 'POST',
'route' => 'settings.backups.upload',
'files' => true,
'class' => 'form-horizontal' ]) }}
@csrf
<p>Backup files are located in: <code>{{ $path }}</code></p>
<h2>Upload Backup</h2>
<div class="form-group{{ $errors->has('file') ? ' has-error' : '' }}">
<div class="col-md-12">
{{ Form::open([
'method' => 'POST',
'route' => 'settings.backups.upload',
'files' => true,
'class' => 'form-horizontal' ]) }}
@csrf
<div class="form-group {{ $errors->has((isset($fieldname) ? $fieldname : 'image')) ? 'has-error' : '' }}">
<div class="col-md-8 col-xs-8">
<!-- screen reader only -->
<input type="file" id="file" name="file" aria-label="file" class="sr-only">
<label class="btn btn-default" aria-hidden="true">
<!-- displayed on screen -->
<label class="btn btn-default col-md-12 col-xs-12" aria-hidden="true">
{{ trans('button.select_file') }}
<input type="file" name="file" class="js-uploadFile" data-maxsize="{{ Helper::file_upload_max_size() }}" accept="application/zip" style="display:none; max-width: 90%" aria-label="file" aria-hidden="true">
<input type="file" name="file" class="js-uploadFile" id="uploadFile" data-maxsize="{{ Helper::file_upload_max_size() }}" accept="application/zip" style="display:none;" aria-label="file" aria-hidden="true">
</label>
<p class="help-block" id="uploadFile-status">{{ trans_choice('general.filetypes_accepted_help', 3, ['size' => Helper::file_upload_max_size_readable(), 'types' => '.zip']) }}</p>
{!! $errors->first('file', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
<div class="col-md-4 col-xs-4">
<button class="btn btn-primary col-md-12 col-xs-12">Upload</button>
</div>
<div class="col-md-12">
<p class="label label-default col-md-12" style="font-size: 120%!important; margin-top: 10px; margin-bottom: 10px;" id="uploadFile-info"></p>
<p class="help-block" style="margin-top: 10px; margin-bottom: 10px;" id="uploadFile-status">{{ trans_choice('general.filetypes_accepted_help', 3, ['size' => Helper::file_upload_max_size_readable(), 'types' => '.zip']) }}</p>
{!! $errors->first('image', '<span class="alert-msg" aria-hidden="true">:message</span>') !!}
</div>
</div>
{{ Form::close() }}
<button>Submit</button>
{{ Form::close() }}
</div> <!-- end col-md-12 form div -->
</div> <!-- end form group div -->