]> BookStack Code Mirror - bookstack/commitdiff
Merge branch 'feature/autoregistration_social_login' of git://github.com/ibrahimennaf...
authorDan Brown <redacted>
Fri, 21 Sep 2018 15:14:52 +0000 (16:14 +0100)
committerDan Brown <redacted>
Fri, 21 Sep 2018 15:14:52 +0000 (16:14 +0100)
1  2 
resources/lang/en/settings.php
resources/views/settings/index.blade.php

index 80ab77d19f700740e261538f19d2c69f7f296cc4,82430152253b48786ed81a7a09497133eb39ff0d..7e33c73dd3363d57b94b1f06cbea4cd55d147118
@@@ -32,8 -32,9 +32,8 @@@ return 
      'app_primary_color' => 'Application primary color',
      'app_primary_color_desc' => 'This should be a hex value. <br>Leave empty to reset to the default color.',
      'app_homepage' => 'Application Homepage',
 -    'app_homepage_desc' => 'Select a page to show on the homepage instead of the default view. Page permissions are ignored for selected pages.',
 -    'app_homepage_default' => 'Default homepage view chosen',
 -    'app_homepage_books' => 'Or select the books page as your homepage. This will override any page selected as your homepage.',
 +    'app_homepage_desc' => 'Select a view to show on the homepage instead of the default view. Page permissions are ignored for selected pages.',
 +    'app_homepage_select' => 'Select a page',
      'app_disable_comments' => 'Disable comments',
      'app_disable_comments_desc' => 'Disable comments across all pages in the application. Existing comments are not shown.',
  
@@@ -43,6 -44,8 +43,8 @@@
  
      'reg_settings' => 'Registration Settings',
      'reg_allow' => 'Allow registration?',
+     'reg_auto_social_allow'  => 'Allow auto social registration?',
+     'reg_auto_social_allow_desc' => 'If the social user doesn\'t exist, automatically sign him up. Domain restriction is respected if set. Email is also automatically validated for this kind of social registration.',
      'reg_default_role' => 'Default user role after registration',
      'reg_confirm_email' => 'Require email confirmation?',
      'reg_confirm_email_desc' => 'If domain restriction is used then email confirmation will be required and the below value will be ignored.',
@@@ -90,7 -93,6 +92,7 @@@
      'role_manage_settings' => 'Manage app settings',
      'role_asset' => 'Asset Permissions',
      'role_asset_desc' => 'These permissions control default access to the assets within the system. Permissions on Books, Chapters and Pages will override these permissions.',
 +    'role_asset_admins' => 'Admins are automatically given access to all content but these options may show or hide UI options.',
      'role_all' => 'All',
      'role_own' => 'Own',
      'role_controlled_by_asset' => 'Controlled by the asset they are uploaded to',
          'it' => 'Italian',
          'ru' => 'Русский',
          'zh_CN' => '简体中文',
-           'zh_TW' => '繁體中文'
+         'zh_TW' => '繁體中文'
      ]
      ///////////////////////////////////
  ];
index 3c563a61c975fba2169993658230de7153a001ec,bcaf2f4d793e9715456dcab2d9c7aa30d95bc8b8..8ad27c5f3e69310164d9ceda3cf436f5115eb659
                              <input type="text" value="{{ setting('app-color') }}" name="setting-app-color" id="setting-app-color" placeholder="#0288D1">
                              <input type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
                          </div>
 -                        <div class="form-group" id="homepage-control">
 +                        <div homepage-control class="form-group" id="homepage-control">
                              <label for="setting-app-homepage">{{ trans('settings.app_homepage') }}</label>
                              <p class="small">{{ trans('settings.app_homepage_desc') }}</p>
 -                            @include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_default'), 'value' => setting('app-homepage')])
 -                            <p class="small">{{ trans('settings.app_homepage_books') }}</p>
 -                            @include('components.toggle-switch', ['name' => 'setting-app-book-homepage', 'value' => setting('app-book-homepage')])
 +
 +                            <select name="setting-app-homepage-type" id="setting-app-homepage-type">
 +                                <option @if(setting('app-homepage-type') === 'default') selected @endif value="default">{{ trans('common.default') }}</option>
 +                                <option @if(setting('app-homepage-type') === 'books') selected @endif value="books">{{ trans('entities.books') }}</option>
 +                                <option @if(setting('app-homepage-type') === 'bookshelves') selected @endif value="bookshelves">{{ trans('entities.shelves') }}</option>
 +                                <option @if(setting('app-homepage-type') === 'page') selected @endif value="page">{{ trans('entities.pages_specific') }}</option>
 +                            </select>
 +
 +                            <br><br>
 +
 +                            <div page-picker-container style="display: none;">
 +                                @include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
 +                            </div>
                          </div>
                      </div>
  
                                  @endforeach
                              </select>
                          </div>
+                         <div class="form-group">
+                             <label for="setting-autosocialregistration-confirmation">{{ trans('settings.reg_auto_social_allow') }}</label>
+                             <p class="small">{{ trans('settings.reg_auto_social_allow_desc') }}</p>
+                             @include('components.toggle-switch', ['name' => 'setting-autosocialregistration-confirmation', 'value' => setting('autosocialregistration-confirmation')])
+                         </div>
                          <div class="form-group">
                              <label for="setting-registration-confirmation">{{ trans('settings.reg_confirm_email') }}</label>
                              <p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>