Guest User

Untitled

a guest
Oct 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. <style type="text/css">
  2. #BoxCheck{
  3. display: none;
  4. }
  5. #TextCanchas{
  6. display: none;
  7. }
  8. </style>
  9.  
  10. <div>
  11. <form name="horario" action="{{route('horarios.store')}}" method="POST">
  12. <label>Seleccione un complejo</label>
  13. <br>
  14.  
  15. <select id="complejos" name="SelectComplejos">
  16. <option value="">Seleccione...</option>
  17. @foreach($complejo as $complejo)
  18. <option value="{{$complejo->id}}">{{$complejo->nombre}}</option>
  19. @endforeach
  20. </select>
  21.  
  22.  
  23. @if($canchas->complejo_id == $complejo->id)
  24. <label>Selecciona tu cancha favorita</label
  25. <br>
  26. <input type="checkbox" name="check" id="BoxCheck">&nbsp;
  27. <label id="TextCanchas">{{$canchas->nombre}}</label>
  28. @endif
  29.  
  30. <br><br>
  31. </form>
  32. </div>
  33.  
  34. <script type="text/javascript">
  35.  
  36. function MuestraCanchas(){
  37.  
  38. var Canchas = document.getElementById('TextCanchas');
  39. var CajaCheck = document.getElementById('BoxCheck');
  40.  
  41. if (document.horario.SelectComplejos.value == "" ) {
  42.  
  43. Canchas.style.display = 'inline-block';
  44. CajaCheck.style.display = 'inline-block';
  45.  
  46. }
  47. return true;
  48. }
  49. </script>
  50.  
  51. id|nombre
  52. ------------
  53. 1|complejo1
  54. 2|complejo2
  55. 3|complejo3
  56. 4|complejo4
  57.  
  58. id|nombre |complejo_id
  59. ---------------------------------------------
  60. 1|Cancha Tennis | 1
  61. 2|Cancha Football | 1
  62. 3|Cancha Basquetball | 1
  63. 4|Multicanchas | 2
  64. 5|Cancha Volleyball | 3
  65. 6|Cancha Hockey | 3
  66. 7|Cancha Golf | 4
  67. 8|Piscina Olimpica | 4
  68.  
  69. opcion: Complejo1
  70.  
  71. 'Selecciona tu cancha preferida';
  72.  
  73. [] Cancha Tenis
  74. [] Cancha Football
  75. [] Cancha Basquetball
Add Comment
Please, Sign In to add comment