authentify_recorder.html.twig 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. {% extends 'whispeakauth/view/record_audio.html.twig' %}
  2. {% block intro %}
  3. <form class="form-horizontal" action="#" method="post">
  4. <div class="form-group ">
  5. <label for="enter_username_username" class="col-sm-4 control-label">
  6. {{ 'Username'|get_lang }}
  7. </label>
  8. <div class="col-sm-8">
  9. <input class="form-control" name="username" type="text" id="username">
  10. </div>
  11. </div>
  12. </form>
  13. <hr>
  14. {{ parent() }}
  15. {% endblock %}
  16. {% block config_data %}
  17. $('#username').on('change', function () {
  18. $('#record-audio-recordrtc, #btn-start-record, #btn-stop-record, #btn-save-record').off('click', '');
  19. RecordAudio.init(
  20. {
  21. blockId: '#record-audio-recordrtc',
  22. btnStartId: '#btn-start-record',
  23. btnStopId: '#btn-stop-record',
  24. btnSaveId: '#btn-save-record',
  25. plyrPreviewId: '#record-preview',
  26. data: {
  27. action: 'authentify',
  28. username: $('#username').val()
  29. }
  30. }
  31. );
  32. });
  33. {% endblock %}