telegram.blade.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <div class="container">
  2. @if(Session::has('status'))
  3. <div class="alert alert-info">
  4. <span>{{ Session::get('status') }}</span>
  5. </div>
  6. @endif
  7. <form action="{{ route('admin.setting.store') }}" method="post">
  8. {{--{{ scrf_field() }}--}}
  9. @csrf
  10. <div class="form-group">
  11. <h1>URL callback для Telegram</h1>
  12. <div class="input-group">
  13. <div class="input-group-btn">
  14. <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true"
  15. aria-expanded="false">Действие<span class="caret"></span></button>
  16. <ul class="dropdown-menu">
  17. <li>
  18. <a href="#" onclick="document.getElementById('url_callback_bot').value = '{{ url('/tbot') }}'">Вставить URL</a>
  19. </li>
  20. <li>
  21. <a href="#" onclick="event.preventDefault(); document.getElementById('setwebhook').submit()">Отправить URL</a>
  22. </li>
  23. <li>
  24. <a href="#" onclick="event.preventDefault(); document.getElementById('getwebhookinfo').submit()">Получить информацию</a>
  25. </li>
  26. </ul>
  27. </div>
  28. <input type="url" class="form-control" id="url_callback_bot" name="url_callback_bot" value="{{ isset($url_callback_bot) ?$url_callback_bot: '' }}">
  29. </div>
  30. </div>
  31. <button class="btn btn-primary" type="submit">Сохранить</button>
  32. </form>
  33. <form id="setwebhook" action="{{ route('admin.setting.setwebhook') }}" method="POST" style="display: none">
  34. @csrf
  35. <input type="hidden" name="url" value="{{ isset($url_callback_bot) ?$url_callback_bot: '' }}">
  36. </form>
  37. <form id="getwebhookinfo" action="{{ route('admin.setting.getwebhookinfo') }}" method="POST" style="display: none">
  38. @csrf
  39. </form>
  40. </div>