No Description

forma.html 7.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <html>
  2. <head>
  3. <meta charset="utf-8">
  4. <link rel="stylesheet" href="{{ url_for('static', filename='estilo.css') }}" />
  5. <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  6. <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
  7. <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
  8. <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
  9. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
  10. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular-sanitize.js"></script>
  11. <script src="{{ url_for('static', filename='forma.js') }}"></script>
  12. <script>
  13. forma.value("accion", "{{accion}}").value("tipo", "{{tipo}}").value("id", "{{id}}").value("user_type", "{{user_type}}");
  14. </script>
  15. <script>
  16. </script>
  17. </head>
  18. <body ng-app="forma" ng-controller="FormController">
  19. <div class="container-fluid">
  20. <div class="header">
  21. <div class="row">
  22. <div class="col-1">
  23. <div class="boton logo">
  24. Logo
  25. </div>
  26. </div>
  27. <div class="col-2">
  28. </div>
  29. <div class="col-6">
  30. <p>{% raw %}{{accion}} {{titulo}} {% endraw %}
  31. </p>
  32. </div>
  33. <div class="col-2" style="visibility:visible">
  34. <a href="" class="boton usuario">Carlos J Corrada Bravo</a>
  35. </div>
  36. <div class="col-1">
  37. <a href="https://cdcc.uprrp.edu" class="boton logout">logout</a>
  38. </div>
  39. </div>
  40. </div>
  41. <div class="container" align="center">
  42. <!-- <form class="form" action="/procesaUser" method="POST"> -->
  43. <form class="form-inline" action="/{{user_type}}/procesaUser" method="POST">
  44. {% raw %}
  45. <div class="row">
  46. <div class="col-md-6">
  47. <span ng-repeat="entrada in entradas.col1">
  48. <div class="form-group">
  49. <label for="{{entrada.name}}" class="boton labelForma">
  50. {{entrada.label}}
  51. </label>
  52. <span ng-if="entrada.type=='select'">
  53. <select ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" name="{{entrada.name}}" id="{{entrada.name}}" class="form-control-inline" style="width: 250px;height: 48px;"
  54. ng-options="opcion.label for opcion in entrada.options track by opcion.id"
  55. ng-model="entrada.value"
  56. ng-required="true" required
  57. ></select>
  58. </span>
  59. <span ng-if="entrada.type=='checkbox'">
  60. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" class="form-control-inline" type="{{entrada.type}}" name="{{entrada.name}}" id="{{entrada.name}}" value="1" ng-checked="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  61. </span>
  62. <span ng-if="entrada.type=='tel'">
  63. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" class="form-control-inline" type="tel" placeholder="787-123-4567" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" ng-required="entrada.require" id="{{entrada.name}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  64. </span>
  65. <span ng-if="entrada.type=='date'">
  66. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" class="form-control-inline" type="date" placeholder="yyyy-MM-dd" pattern="\d{4}-\d{1,2}-\d{1,2}" ng-required="entrada.require" id="{{entrada.name}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  67. </span>
  68. <!-- 'datetime-local' añadido por Oniel -->
  69. <span ng-if="entrada.type=='datetime-local'">
  70. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" class="form-control-inline" type="datetime-local" placeholder="yyyy-MM-ddThh:mm:ss" ng-required="entrada.require" id="{{entrada.name}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  71. </span>
  72. <!-- 'list' añadido por Oniel -->
  73. <span ng-if="entrada.type=='list'">
  74. <select list='{{entrada.name}}list' ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" class="form-control-inline" type="list" placeholder="Buscar nombre..." ng-required="entrada.require" id="{{entrada.name}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  75. <!-- <select id = '{{entrada.name}}list'> -->
  76. <option ng-repeat='value in entrada.values' value='{{value.id}}'>{{value.name}}</option>
  77. </select>
  78. </span>
  79. <span ng-if="entrada.type!='select' && entrada.type!='checkbox' && entrada.type!='tel' && entrada.type!='date' && entrada.type!='datetime-local' && entrada.type!='list'">
  80. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" ng-required="entrada.require" class="form-control-inline" type="{{entrada.type}}" id="{{entrada.name}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  81. </span>
  82. </div>
  83. </span>
  84. </div>
  85. <div class="col-md-6">
  86. <span ng-repeat="entrada in entradas.col2">
  87. <div class="form-group">
  88. <label for="{{entrada.name}}" class="boton labelForma">
  89. {{entrada.label}}
  90. </label>
  91. <span ng-if="entrada.type=='select'">
  92. <select ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" name="{{entrada.name}}" id="{{entrada.name}}" class="form-control-inline" style="width: 250px;height: 48px;"
  93. ng-options="opcion.label for opcion in entrada.options track by opcion.id"
  94. ng-model="entrada.value"
  95. ng-required="true" required
  96. ></select>
  97. </span>
  98. <span ng-if="entrada.type=='checkbox'">
  99. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" class="form-control-inline" type="{{entrada.type}}" name="{{entrada.name}}" id="{{entrada.name}}" value="1" ng-checked="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  100. </span>
  101. <span ng-if="entrada.type=='tel'">
  102. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" class="form-control-inline" type="tel" placeholder="787-123-4567" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}" ng-required="entrada.require" id="{{entrada.name}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  103. </span>
  104. <span ng-if="entrada.type=='date'">
  105. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" class="form-control-inline" type="date" placeholder="yyyy-MM-dd" pattern="\d{4}-\d{1,2}-\d{1,2}" ng-required="entrada.require" id="{{entrada.name}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  106. </span>
  107. <span ng-if="entrada.type!='select' && entrada.type!='checkbox' && entrada.type!='tel' && entrada.type!='date'">
  108. <input ng-disabled="entrada.disabled" tabindex="{{entrada.tabindex}}" ng-required="entrada.require" class="form-control-inline" type="{{entrada.type}}" id="{{entrada.name}}" name="{{entrada.name}}" value="{{entrada.value}}" style="width: 250px;height: 48px;align:left;">
  109. </span>
  110. </div>
  111. </span>
  112. </div>
  113. </div>
  114. {% endraw %}
  115. <input type="hidden" name="id" value="{{id}}">
  116. <input type="hidden" name="accion" value="{{accion}}">
  117. <input type="hidden" name="tipo" value="{{tipo}}">
  118. {% raw %}
  119. <div class="modal-body row">
  120. <div class="col-md-12" align="center">
  121. <span ng-if="abled">
  122. <input class="boton labelForma" type="submit">
  123. </span>
  124. </div>
  125. </div>
  126. {% endraw %}
  127. </form>
  128. </div>
  129. </body>
  130. </html>