switch.blade.php 946 B

123456789101112131415161718192021
  1. @props(['code', 'check', 'url' => null, 'feature' => null])
  2. <div class="form-group col-lg-6">
  3. <div class="row">
  4. <label class="col-md-3 col-form-label" for="{{ $code }}">{{ trans("admin.system.$code") }}</label>
  5. <div class="col-md-9">
  6. <input id="{{ $code }}" data-plugin="switchery" type="checkbox" @if ($check) checked @endif
  7. @if ($feature) data-feature-toggle="{{ $feature }}" @endif
  8. onchange="updateFromOther('switch','{{ $code }}')" />
  9. @if (trans("admin.system.hint.$code") !== "admin.system.hint.$code")
  10. <span class="text-help">
  11. @if (isset($url))
  12. {!! trans("admin.system.hint.$code", ['url' => $url]) !!}
  13. @else
  14. {!! trans("admin.system.hint.$code") !!}
  15. @endif
  16. </span>
  17. @endif
  18. </div>
  19. </div>
  20. </div>