chartManD commited on
Commit
f490494
·
1 Parent(s): 934cca5

Finalizacion de sesion sensorial con nappgin sin modalidad

Browse files
tecnicas/static/js/actions-form.js CHANGED
@@ -3,4 +3,12 @@ function exit_sesion(styleClass) {
3
  const action = form.querySelector(".action-input");
4
  action.value = "exit_session";
5
  form.submit();
6
- }
 
 
 
 
 
 
 
 
 
3
  const action = form.querySelector(".action-input");
4
  action.value = "exit_session";
5
  form.submit();
6
+ }
7
+
8
+ function finishSession(styleClass) {
9
+ const form = document.querySelector(`.${styleClass}`);
10
+ form.action = ""
11
+ const action = form.querySelector(".action-input");
12
+ action.value = "finish_session";
13
+ form.submit();
14
+ }
tecnicas/templates/tecnicas/forms_tester/test_napping.html CHANGED
@@ -127,7 +127,8 @@
127
  <button id="question-save" class="cts-btn-general cts-btn-secondary btn-push flex-1">
128
  ¿Finalizar sesión?
129
  </button>
130
- <button id="finish-session" class="cts-btn-general cts-btn-tertiary btn-push hidden flex-1">
 
131
  Finalizar
132
  </button>
133
  <button id="cancel-save" class="cts-btn-general cts-btn-error btn-push hidden flex-1">
@@ -146,31 +147,4 @@
146
  {% block extra_js %}
147
  <script src="{% static 'js/actions-form.js' %}"></script>
148
  <script src="{% static 'js/test-napping.js' %}"></script>
149
- {% endblock %}
150
-
151
- <div id="point-JOW"
152
- class="absolute w-4 h-4 bg-red-600 rounded-full transform -translate-x-1/2 -translate-y-1/2 cursor-pointer border-2 border-white shadow-md group"
153
- style="left: 59px; top: 39px;">
154
- <div
155
- class="absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-800 text-white text-xs rounded whitespace-nowrap z-10 hidden group-hover:block">
156
- <strong>JOW</strong><br>
157
- X: 4.4<br>
158
- Y: 37.1
159
- </div><span
160
- class="absolute top-4 left-1/2 transform -translate-x-1/2 text-xs font-bold text-gray-700 pointer-events-none">JOW</span>
161
- </div>
162
-
163
- <div id="point-JOW"
164
- class="absolute w-4 h-4 bg-red-600 rounded-full transform -translate-x-1/2 -translate-y-1/2 cursor-pointer border-2 border-white shadow-md group"
165
- style="left: 58.93px; top: 685.07px;">
166
- <div
167
- class="absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-2 py-1 bg-gray-800 text-white text-xs rounded whitespace-nowrap z-10 hidden group-hover:block">
168
- <strong>JOW</strong><br>
169
- X: 4.4<br>
170
- Y: 37.1
171
- </div>
172
- <span
173
- class="absolute top-4 left-1/2 transform -translate-x-1/2 text-xs font-bold text-gray-700 pointer-events-none">
174
- JOW
175
- </span>
176
- </div>
 
127
  <button id="question-save" class="cts-btn-general cts-btn-secondary btn-push flex-1">
128
  ¿Finalizar sesión?
129
  </button>
130
+ <button id="finish-session" class="cts-btn-general cts-btn-tertiary btn-push hidden flex-1"
131
+ onclick="finishSession('form-actions')">
132
  Finalizar
133
  </button>
134
  <button id="cancel-save" class="cts-btn-general cts-btn-error btn-push hidden flex-1">
 
147
  {% block extra_js %}
148
  <script src="{% static 'js/actions-form.js' %}"></script>
149
  <script src="{% static 'js/test-napping.js' %}"></script>
150
+ {% endblock %}