浏览代码

Small Fixes

Development
Dennis 2 年之前
父节点
当前提交
974ef9f77e

+ 1 - 1
app/Classes/Settings/System.php

@@ -55,7 +55,7 @@ class System
             'show-tos' => 'string',
             'show-tos' => 'string',
             'alert-enabled' => 'string',
             'alert-enabled' => 'string',
             'alter-type' => 'string',
             'alter-type' => 'string',
-            'alert-message' => 'string',
+            'alert-message' => 'string|nullable',
         ]);
         ]);
 
 
         $validator->after(function ($validator) use ($request) {
         $validator->after(function ($validator) use ($request) {

+ 1 - 0
app/Models/User.php

@@ -302,4 +302,5 @@ class User extends Authenticatable implements MustVerifyEmail
             -> logOnlyDirty()
             -> logOnlyDirty()
             -> dontSubmitEmptyLogs();
             -> dontSubmitEmptyLogs();
     }
     }
+
 }
 }

+ 1 - 1
app/Providers/AppServiceProvider.php

@@ -66,7 +66,7 @@ class AppServiceProvider extends ServiceProvider
             }
             }
 
 
             if(config('theme.active') == null){
             if(config('theme.active') == null){
-                Theme::set(config("SETTINGS::SYSTEM:THEME"), "default");
+                Theme::set(config("SETTINGS::SYSTEM:THEME","default"), "default");
             }
             }
 
 
             // Set Mail Config
             // Set Mail Config

+ 3 - 3
public/install/functions.php

@@ -3,15 +3,15 @@
 $required_extentions = ['openssl', 'gd', 'mysql', 'PDO', 'mbstring', 'tokenizer', 'bcmath', 'xml', 'curl', 'zip', 'intl'];
 $required_extentions = ['openssl', 'gd', 'mysql', 'PDO', 'mbstring', 'tokenizer', 'bcmath', 'xml', 'curl', 'zip', 'intl'];
 
 
 $requirements = [
 $requirements = [
-    'minPhp' => '7.4',
-    'maxPhp' => '8.1', // This version is not supported
+    'minPhp' => '8.1',
+    'maxPhp' => '8.1.9', // This version is not supported
     'mysql' => '5.7.22',
     'mysql' => '5.7.22',
 ];
 ];
 
 
 function checkPhpVersion()
 function checkPhpVersion()
 {
 {
     global $requirements;
     global $requirements;
-    if (version_compare(phpversion(), $requirements['minPhp'], '>=') && version_compare(phpversion(), $requirements['maxPhp'], '<')) {
+    if (version_compare(phpversion(), $requirements['minPhp'], '>=') && version_compare(phpversion(), $requirements['maxPhp'], '<=')) {
         return 'OK';
         return 'OK';
     }
     }
 
 

+ 1 - 0
public/install/index.php

@@ -65,6 +65,7 @@ if (! isset($_GET['step'])) {
 
 
     <p class="<?php echo checkPhpVersion() === 'OK' ? 'ok' : 'notok'; ?>"> php
     <p class="<?php echo checkPhpVersion() === 'OK' ? 'ok' : 'notok'; ?>"> php
         version: <?php echo phpversion(); ?> (minimum required <?php echo $requirements['minPhp']; ?>)</p>
         version: <?php echo phpversion(); ?> (minimum required <?php echo $requirements['minPhp']; ?>)</p>
+
     <p class="<?php echo getMySQLVersion() === 'OK' ? 'ok' : 'notok'; ?>"> mysql
     <p class="<?php echo getMySQLVersion() === 'OK' ? 'ok' : 'notok'; ?>"> mysql
         version: <?php echo getMySQLVersion(); ?> (minimum required <?php echo $requirements['mysql']; ?>)</p>
         version: <?php echo getMySQLVersion(); ?> (minimum required <?php echo $requirements['mysql']; ?>)</p>
 
 

+ 8 - 3
themes/default/views/admin/settings/tabs/system.blade.php

@@ -22,7 +22,7 @@
                                 <label for="show-tos">{{ __('Show Terms of Service') }} </label>
                                 <label for="show-tos">{{ __('Show Terms of Service') }} </label>
                             </div>
                             </div>
                             <i data-toggle="popover" data-trigger="hover" data-html="true"
                             <i data-toggle="popover" data-trigger="hover" data-html="true"
-                               data-content="{{ __('Show the TOS link in the footer of every page. <br> Edit the content in "resources/views/information/tos-content.blade.php"') }}"
+                               data-content="{{ __('Show the TOS link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/information/tos-content.blade.php</b>') }}"
                                class="fas fa-info-circle"></i>
                                class="fas fa-info-circle"></i>
                         </div>
                         </div>
                     </div>
                     </div>
@@ -35,7 +35,7 @@
                                 <label for="show-imprint">{{ __('Show imprint') }} </label>
                                 <label for="show-imprint">{{ __('Show imprint') }} </label>
                             </div>
                             </div>
                             <i data-toggle="popover" data-trigger="hover" data-html="true"
                             <i data-toggle="popover" data-trigger="hover" data-html="true"
-                                data-content="{{ __('Show the imprint link in the footer of every page. <br> Edit the content in "resources/views/information/imprint-content.blade.php"') }}"
+                                data-content="{{ __('Show the imprint link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/resources/views/information/imprint-content.blade.php</b>') }}"
                                 class="fas fa-info-circle"></i>
                                 class="fas fa-info-circle"></i>
                         </div>
                         </div>
                     </div>
                     </div>
@@ -48,7 +48,7 @@
                                 <label for="show-privacy">{{ __('Show Privacy Policy') }} </label>
                                 <label for="show-privacy">{{ __('Show Privacy Policy') }} </label>
                             </div>
                             </div>
                             <i data-toggle="popover" data-trigger="hover" data-html="true"
                             <i data-toggle="popover" data-trigger="hover" data-html="true"
-                                data-content="{{ __('Show the privacy policy link in the footer of every page. <br> Edit the content in "resources/views/information/privacy-content.blade.php"') }}"
+                                data-content="{{ __('Show the privacy policy link in the footer of every page. <br> Edit the content in <b>'.Qirolab\Theme\Theme::path($path = "views").'/resources/views/information/privacy-content.blade.php</b>') }}"
                                 class="fas fa-info-circle"></i>
                                 class="fas fa-info-circle"></i>
                         </div>
                         </div>
                     </div>
                     </div>
@@ -336,6 +336,11 @@
                            class="form-control @error('alert-message') is-invalid @enderror">
                            class="form-control @error('alert-message') is-invalid @enderror">
                         {{ config('SETTINGS::SYSTEM:ALERT_MESSAGE', '') }}
                         {{ config('SETTINGS::SYSTEM:ALERT_MESSAGE', '') }}
                         </textarea>
                         </textarea>
+                    @error('alert-message')
+                    <div class="text-danger">
+                        {{ $message }}
+                    </div>
+                    @enderror
                 </div>
                 </div>
 
 
             </div>
             </div>

+ 4 - 4
themes/default/views/auth/login.blade.php

@@ -125,14 +125,14 @@
         {{-- imprint and privacy policy --}}
         {{-- imprint and privacy policy --}}
         <div class="fixed-bottom ">
         <div class="fixed-bottom ">
             <div class="container text-center">
             <div class="container text-center">
-                @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT'))
+                @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true")
                     <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                     <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                 @endif
                 @endif
-                @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY'))
+                @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true")
                     <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                     <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                 @endif
                 @endif
-                @if (config('SETTINGS::SYSTEM:SHOW_TOS'))
-                    | <a href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
+                @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true")
+                    | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
                 @endif
                 @endif
             </div>
             </div>
         </div>
         </div>

+ 5 - 2
themes/default/views/auth/passwords/email.blade.php

@@ -70,12 +70,15 @@
         {{-- imprint and privacy policy --}}
         {{-- imprint and privacy policy --}}
         <div class="fixed-bottom ">
         <div class="fixed-bottom ">
             <div class="container text-center">
             <div class="container text-center">
-                @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT'))
+                @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true")
                     <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                     <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                 @endif
                 @endif
-                @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY'))
+                @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true")
                     <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                     <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                 @endif
                 @endif
+                @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true")
+                    | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
+                @endif
             </div>
             </div>
         </div>
         </div>
     </body>
     </body>

+ 6 - 3
themes/default/views/auth/passwords/reset.blade.php

@@ -79,14 +79,17 @@
         <!-- /.login-box -->
         <!-- /.login-box -->
 
 
         {{-- imprint and privacy policy --}}
         {{-- imprint and privacy policy --}}
-        <div class="fixed-bottom">
+        <div class="fixed-bottom ">
             <div class="container text-center">
             <div class="container text-center">
-                @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT'))
+                @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true")
                     <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                     <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                 @endif
                 @endif
-                @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY'))
+                @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true")
                     <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                     <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                 @endif
                 @endif
+                @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true")
+                    | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
+                @endif
             </div>
             </div>
         </div>
         </div>
     </body>
     </body>

+ 5 - 5
themes/default/views/auth/register.blade.php

@@ -179,13 +179,13 @@
     {{-- imprint and privacy policy --}}
     {{-- imprint and privacy policy --}}
     <div class="fixed-bottom ">
     <div class="fixed-bottom ">
         <div class="container text-center">
         <div class="container text-center">
-            @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT'))
-                <a target="_blank" href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
+            @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true")
+                <a href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
             @endif
             @endif
-            @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY'))
-                <a target="_blank" href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
+            @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true")
+                <a href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
             @endif
             @endif
-            @if (config('SETTINGS::SYSTEM:SHOW_TOS'))
+            @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true")
                 | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
                 | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
             @endif
             @endif
         </div>
         </div>

+ 5 - 5
themes/default/views/layouts/main.blade.php

@@ -428,15 +428,15 @@
 
 
             {{-- Show imprint and privacy link --}}
             {{-- Show imprint and privacy link --}}
             <div class="float-right d-none d-sm-inline-block">
             <div class="float-right d-none d-sm-inline-block">
-                @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT'))
+                @if (config('SETTINGS::SYSTEM:SHOW_IMPRINT') == "true")
                     <a target="_blank" href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                     <a target="_blank" href="{{ route('imprint') }}"><strong>{{ __('Imprint') }}</strong></a> |
                 @endif
                 @endif
-                @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY'))
+                @if (config('SETTINGS::SYSTEM:SHOW_PRIVACY') == "true")
                     <a target="_blank" href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                     <a target="_blank" href="{{ route('privacy') }}"><strong>{{ __('Privacy') }}</strong></a>
                 @endif
                 @endif
-                    @if (config('SETTINGS::SYSTEM:SHOW_TOS'))
-                       | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
-                    @endif
+                @if (config('SETTINGS::SYSTEM:SHOW_TOS') == "true")
+                    | <a target="_blank" href="{{ route('tos') }}"><strong>{{ __('Terms of Service') }}</strong></a>
+                @endif
             </div>
             </div>
         </footer>
         </footer>