Просмотр файла resources/views/admin/settings/_protects.blade.php

Размер файла: 4.65Kb
  1. @section('header')
  2. <h1>{{ __('settings.protects') }}</h1>
  3. @stop
  4.  
  5. <form method="post">
  6. @csrf
  7. <?php $inputCaptcha = getInput('sets.captcha_type', $settings['captcha_type']); ?>
  8.  
  9. <div class="mb-3{{ hasError('sets[captcha_type]') }}">
  10. <label for="captcha_type" class="form-label">{{ __('main.type') }}:</label>
  11. <select class="form-select" id="captcha_type" name="sets[captcha_type]">
  12.  
  13. @foreach ($protects as $key => $captcha)
  14. <?php $selected = ($key === $inputCaptcha) ? ' selected' : ''; ?>
  15. <option value="{{ $key }}"{{ $selected }}>{{ $captcha }}</option>
  16. @endforeach
  17.  
  18. </select>
  19. <div class="invalid-feedback">{{ textError('sets[captcha_type]') }}</div>
  20. </div>
  21.  
  22. <div class="mb-3{{ hasError('sets[captcha_symbols]') }}">
  23. <label for="captcha_symbols" class="form-label">{{ __('settings.captcha_valid_symbols') }} [a-z0-9]:</label>
  24. <input pattern="[a-z0-9]+" type="text" class="form-control" id="captcha_symbols" name="sets[captcha_symbols]" maxlength="36" value="{{ getInput('sets.captcha_symbols', $settings['captcha_symbols']) }}" required>
  25. <div class="invalid-feedback">{{ textError('sets[captcha_symbols]') }}</div>
  26. </div>
  27.  
  28. <div class="mb-3{{ hasError('sets[captcha_maxlength]') }}">
  29. <label for="captcha_maxlength" class="form-label">{{ __('settings.captcha_symbols') }} [4-8]:</label>
  30. <input type="number" min="4" max="8" class="form-control" id="captcha_maxlength" name="sets[captcha_maxlength]" maxlength="1" value="{{ getInput('sets.captcha_maxlength', $settings['captcha_maxlength']) }}" required>
  31. <div class="invalid-feedback">{{ textError('sets[captcha_maxlength]') }}</div>
  32. </div>
  33.  
  34. <div class="mb-3{{ hasError('sets[captcha_angle]') }}">
  35. <label for="captcha_angle" class="form-label">{{ __('settings.captcha_rotate') }} [0-50]:</label>
  36. <input type="number" min="0" max="50" class="form-control" id="captcha_angle" name="sets[captcha_angle]" maxlength="2" value="{{ getInput('sets.captcha_angle', $settings['captcha_angle']) }}" required>
  37. <div class="invalid-feedback">{{ textError('sets[captcha_angle]') }}</div>
  38. </div>
  39.  
  40. <div class="mb-3{{ hasError('sets[captcha_offset]') }}">
  41. <label for="captcha_offset" class="form-label">{{ __('settings.captcha_amplitude') }} [0-10]:</label>
  42. <input type="number" min="0" max="10" class="form-control" id="captcha_offset" name="sets[captcha_offset]" maxlength="2" value="{{ getInput('sets.captcha_offset', $settings['captcha_offset']) }}" required>
  43. <div class="invalid-feedback">{{ textError('sets[captcha_offset]') }}</div>
  44. </div>
  45.  
  46. <div class="form-check mb-3">
  47. <input type="hidden" value="0" name="sets[captcha_distortion]">
  48. <input type="checkbox" class="form-check-input" value="1" name="sets[captcha_distortion]" id="captcha_distortion"{{ getInput('sets.captcha_distortion', $settings['captcha_distortion']) ? ' checked' : '' }}>
  49. <label for="captcha_distortion" class="form-check-label">{{ __('settings.captcha_distortion') }}</label>
  50. </div>
  51.  
  52. <div class="form-check mb-3">
  53. <input type="hidden" value="0" name="sets[captcha_interpolation]">
  54. <input type="checkbox" class="form-check-input" value="1" name="sets[captcha_interpolation]" id="captcha_interpolation"{{ getInput('sets.captcha_interpolation', $settings['captcha_interpolation']) ? ' checked' : '' }}>
  55. <label for="captcha_interpolation" class="form-check-label">{{ __('settings.captcha_blur') }}</label>
  56. </div>
  57.  
  58. <h3 class="mt-3">reCaptcha</h3>
  59.  
  60. <div class="mb-3{{ hasError('sets[recaptcha_public]') }}">
  61. <label for="recaptcha_public" class="form-label">{{ __('settings.captcha_public') }}:</label>
  62. <input type="hidden" name="opt[recaptcha_public]" value="1">
  63. <input type="text" class="form-control" id="recaptcha_public" name="sets[recaptcha_public]" value="{{ getInput('sets.recaptcha_public', $settings['recaptcha_public']) }}">
  64. <div class="invalid-feedback">{{ textError('sets[recaptcha_public]') }}</div>
  65. </div>
  66.  
  67. <div class="mb-3{{ hasError('sets[recaptcha_private]') }}">
  68. <label for="recaptcha_private" class="form-label">{{ __('settings.captcha_private') }}:</label>
  69. <input type="hidden" name="opt[recaptcha_private]" value="1">
  70. <input type="text" class="form-control" id="recaptcha_private" name="sets[recaptcha_private]" value="{{ getInput('sets.recaptcha_private', $settings['recaptcha_private']) }}">
  71. <div class="invalid-feedback">{{ textError('sets[recaptcha_private]') }}</div>
  72. </div>
  73.  
  74. <button class="btn btn-primary">{{ __('main.save') }}</button>
  75. </form>