participant-action-edit.tpl 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <script type='text/javascript' src="../js/sepe.js"></script>
  2. <script type='text/javascript'>
  3. $(document).ready(function () {
  4. $("select[name='company_tutor_id']").change(function(){
  5. if ($(this).val() == "0") {
  6. $("#new-company-tutor-layer").show();
  7. } else {
  8. $("#new-company-tutor-layer").hide();
  9. }
  10. });
  11. $("select[name='training_tutor_id']").change(function(){
  12. if ($(this).val() == "0") {
  13. $("#new-training-tutor-layer").show();
  14. } else {
  15. $("#new-training-tutor-layer").hide();
  16. }
  17. });
  18. });
  19. </script>
  20. <link rel="stylesheet" type="text/css" href="../resources/plugin.css"/>
  21. <div class="row">
  22. <form class="form-horizontal" action="participant-action-edit.php" method="post" name="form_participant_action">
  23. <div class="col-md-3">
  24. <div id="course_category_well" class="well">
  25. <ul class="nav nav-list">
  26. <li class="nav-header"><h3>{{ 'Actions' | get_plugin_lang('SepePlugin') }}:</h3></li>
  27. <li>
  28. {% if new_participant == "1" %}
  29. <input type="hidden" name="action_id" value="{{ action_id }}" />
  30. <input type="hidden" name="new_participant" value="1" />
  31. {% else %}
  32. <input type="hidden" name="action_id" value="{{ action_id }}" />
  33. <input type="hidden" name="participant_id" value="{{ participant_id }}" />
  34. <input type="hidden" name="new_participant" value="0" />
  35. {% endif %}
  36. <input type="hidden" name="sec_token" value="{{ sec_token }}" />
  37. <input class="btn btn-primary sepe-btn-menu-side" type="submit" value="{{ 'SaveChanges' | get_plugin_lang('SepePlugin') }}" />
  38. </li>
  39. <li>
  40. <input class="btn btn-warning sepe-btn-menu-side" type="reset" value="{{ 'Reset' | get_plugin_lang('SepePlugin') }}" />
  41. </li>
  42. </ul>
  43. </div>
  44. </div>
  45. <div class="col-md-9">
  46. {% if message_info != "" %}
  47. <div class="alert alert-success">
  48. {{ message_info }}
  49. </div>
  50. {% endif %}
  51. {% if message_error != "" %}
  52. <div class="alert alert-danger">
  53. {{ message_error }}
  54. </div>
  55. {% endif %}
  56. <div class="well_border">
  57. <fieldset>
  58. <legend>{{ 'FormativeActionParticipant' | get_plugin_lang('SepePlugin') }}</legend>
  59. <div class="well sepe-subfield">
  60. <legend><h4>{{ 'UserPlatformList' | get_plugin_lang('SepePlugin') | upper }}: </h4></legend>
  61. <div class="form-group">
  62. <label class="control-label col-sm-3">{{ 'Student' | get_plugin_lang('SepePlugin') }}: </label>
  63. <div class="col-sm-9">
  64. <input type="hidden" id="alertSelectUser" value="{{ 'alertSelectUser'|get_plugin_lang('SepePlugin') }}" />
  65. <select name="platform_user_id" id="platform_user_id" class="form-control">
  66. {% if info_user_platform is empty %}
  67. <option value="" selected="selected"></option>
  68. {% else %}
  69. <option value=""></option>
  70. <option value="{{ info_user_platform.user_id }}" selected="selected">{{ info_user_platform.firstname }} {{ info_user_platform.lastname }}</option>
  71. {% endif %}
  72. {% for student in listStudent %}
  73. <option value="{{ student.user_id }}">{{ student.firstname }} {{ student.lastname }}</option>
  74. {% endfor %}
  75. </select>
  76. </div>
  77. </div>
  78. </div>
  79. <div class="well sepe-subfield">
  80. <legend><h4>{{ 'ParticipantIdentifier' | get_plugin_lang('SepePlugin') | upper }}: </h4></legend>
  81. <div class="form-group">
  82. <label class="control-label col-sm-3">{{ 'DocumentType' | get_plugin_lang('SepePlugin') }}: </label>
  83. <div class="col-sm-9">
  84. <select name="document_type" class="form-control">
  85. <option value=""></option>
  86. {% if info.document_type == "D" %}
  87. <option value="D" selected="selected">{{ 'DocumentTypeD' | get_plugin_lang('SepePlugin') }}</option>
  88. {% else %}
  89. <option value="D">{{ 'DocumentTypeD' | get_plugin_lang('SepePlugin') }}</option>
  90. {% endif %}
  91. {% if info.document_type == "E" %}
  92. <option value="E" selected="selected">{{ 'DocumentTypeE' | get_plugin_lang('SepePlugin') }}</option>
  93. {% else %}
  94. <option value="E">{{ 'DocumentTypeE' | get_plugin_lang('SepePlugin') }}</option>
  95. {% endif %}
  96. {% if info.document_type == "U" %}
  97. <option value="U" selected="selected">{{ 'DocumentTypeU' | get_plugin_lang('SepePlugin') }}</option>
  98. {% else %}
  99. <option value="U">{{ 'DocumentTypeU' | get_plugin_lang('SepePlugin') }}</option>
  100. {% endif %}
  101. {% if info.document_type == "G" %}
  102. <option value="G" selected="selected">{{ 'DocumentTypeG' | get_plugin_lang('SepePlugin') }}</option>
  103. {% else %}
  104. <option value="G">{{ 'DocumentTypeG' | get_plugin_lang('SepePlugin') }}</option>
  105. {% endif %}
  106. {% if info.document_type == "W" %}
  107. <option value="W" selected="selected">{{ 'DocumentTypeW' | get_plugin_lang('SepePlugin') }}</option>
  108. {% else %}
  109. <option value="W">{{ 'DocumentTypeW' | get_plugin_lang('SepePlugin') }}</option>
  110. {% endif %}
  111. {% if info.document_type == "H" %}
  112. <option value="H" selected="selected">{{ 'DocumentTypeH' | get_plugin_lang('SepePlugin') }}</option>
  113. {% else %}
  114. <option value="H">{{ 'DocumentTypeH' | get_plugin_lang('SepePlugin') }}</option>
  115. {% endif %}
  116. </select>
  117. </div>
  118. </div>
  119. <div class="form-group">
  120. <label class="control-label col-sm-3">{{ 'DocumentNumber' | get_plugin_lang('SepePlugin') }}: </label>
  121. <div class="col-sm-3">
  122. <input class="form-control" type="text" name="document_number" value="{{ info.document_number }}" />
  123. </div>
  124. </div>
  125. <div class="form-group">
  126. <label class="control-label col-sm-3">{{ 'DocumentLetter' | get_plugin_lang('SepePlugin') }}: </label>
  127. <div class="col-sm-2">
  128. <input class="form-control" type="text" name="document_letter" value="{{ info.document_letter }}" />
  129. </div>
  130. </div>
  131. <div class="alert alert-warning">
  132. {{ 'DocumentFormatMessage' | get_plugin_lang('SepePlugin') }}
  133. </div>
  134. </div>
  135. <div class="form-group">
  136. <label class="control-label col-sm-3">{{ 'CompetenceKey' | get_plugin_lang('SepePlugin') }}: </label>
  137. <div class="col-sm-9">
  138. <input class="form-control" type="text" name="key_competence" value="{{ info.key_competence }}" />
  139. </div>
  140. </div>
  141. <div class="well sepe-subfield">
  142. <legend class="sepe-subfield">{{ 'TrainingAgreement' | get_plugin_lang('SepePlugin') | upper }}: </legend>
  143. <div class="form-group">
  144. <label class="control-label col-sm-3">{{ 'ContractId' | get_plugin_lang('SepePlugin') }}: </label>
  145. <div class="col-sm-9">
  146. <input class="form-control" type="text" name="contract_id" value="{{ info.contract_id }}" />
  147. {{ 'ContractIdMessage' | get_plugin_lang('SepePlugin') }}
  148. </div>
  149. </div>
  150. <div class="form-group">
  151. <label class="control-label col-sm-3">{{ 'CompanyFiscalNumber' | get_plugin_lang('SepePlugin') }}: </label>
  152. <div class="col-sm-9">
  153. <input class="form-control" type="text" name="company_fiscal_number" value="{{ info.company_fiscal_number }}" />
  154. </div>
  155. </div>
  156. <div class="well">
  157. <legend class="sepe-subfield2">{{ 'TutorIdCompany' | get_plugin_lang('SepePlugin') | upper }}: </legend>
  158. <div class="form-group">
  159. <label class="control-label col-sm-3">{{ 'CompanyTutorsList' | get_plugin_lang('SepePlugin') }}</label>
  160. <div class="col-sm-9">
  161. <select name="company_tutor_id" class="form-control">
  162. <option value="" selected="selected">{{ 'NoTutor' | get_plugin_lang('SepePlugin') }}</option>
  163. <option value="0">{{ 'CreateNewTutorCompany' | get_plugin_lang('SepePlugin') }}</option>
  164. {% for tutor in list_tutor_company %}
  165. {% if tutor.id == info.company_tutor_id or ( info|length == 0 and tutor.id == "1" ) %}
  166. <option value="{{ tutor.id }}" selected="selected">{{ tutor.alias }}</option>
  167. {% else %}
  168. <option value="{{ tutor.id }}">{{ tutor.alias }}</option>
  169. {% endif %}
  170. {% endfor %}
  171. </select>
  172. </div>
  173. </div>
  174. <div id="new-company-tutor-layer" style="display:none">
  175. <div class="form-group">
  176. <label class="control-label col-sm-3">{{ 'Name' | get_plugin_lang('SepePlugin') }}</label>
  177. <div class="col-sm-9">
  178. <input class="form-control" type="text" name="tutor_company_alias" value="" />
  179. </div>
  180. </div>
  181. <div class="form-group">
  182. <label class="control-label col-sm-3">{{ 'DocumentType' | get_plugin_lang('SepePlugin') }}: </label>
  183. <div class="col-sm-9">
  184. <select name="tutor_company_document_type" class="form-control">
  185. <option value="" selected="selected"></option>
  186. <option value="D">{{ 'DocumentTypeD' | get_plugin_lang('SepePlugin') }}</option>
  187. <option value="E">{{ 'DocumentTypeE' | get_plugin_lang('SepePlugin') }}</option>
  188. <option value="U">{{ 'DocumentTypeU' | get_plugin_lang('SepePlugin') }}</option>
  189. <option value="G">{{ 'DocumentTypeG' | get_plugin_lang('SepePlugin') }}</option>
  190. <option value="W">{{ 'DocumentTypeW' | get_plugin_lang('SepePlugin') }}</option>
  191. <option value="H">{{ 'DocumentTypeH' | get_plugin_lang('SepePlugin') }}</option>
  192. </select>
  193. </div>
  194. </div>
  195. <div class="form-group">
  196. <label class="control-label col-sm-3">{{ 'DocumentNumber' | get_plugin_lang('SepePlugin') }}: </label>
  197. <div class="col-sm-3">
  198. <input class="form-control" type="text" name="tutor_company_document_number" value="" />
  199. </div>
  200. </div>
  201. <div class="form-group">
  202. <label class="control-label col-sm-3">{{ 'DocumentLetter' | get_plugin_lang('SepePlugin') }}: </label>
  203. <div class="col-sm-2">
  204. <input class="form-control" type="text" name="tutor_company_document_letter" value="" />
  205. </div>
  206. </div>
  207. <div class="alert alert-warning mensaje_info">
  208. {{ 'DocumentFormatMessage' | get_plugin_lang('SepePlugin') }}
  209. </div>
  210. </div>
  211. </div>
  212. <div class="well">
  213. <legend class="sepe-subfield2">{{ 'TutorIdTraining' | get_plugin_lang('SepePlugin') | upper }}: </legend>
  214. <div class="form-group">
  215. <label class="control-label col-sm-3">{{ 'TrainingTutorsList' | get_plugin_lang('SepePlugin') }}</label>
  216. <div class="col-sm-9">
  217. <select name="training_tutor_id" class="form-control">
  218. <option value="" selected="selected">{{ 'NoTutor' | get_plugin_lang('SepePlugin') }}</option>
  219. <option value="0">{{ 'CreateNewTutorTraining' | get_plugin_lang('SepePlugin') }}</option>
  220. {% for tutor in list_tutor_training %}
  221. {% if tutor.id == info.training_tutor_id or ( info|length == 0 and tutor.id == "1" ) %}
  222. <option value="{{ tutor.id }}" selected="selected">{{ tutor.alias }}</option>
  223. {% else %}
  224. <option value="{{ tutor.id }}">{{ tutor.alias }}</option>
  225. {% endif %}
  226. {% endfor %}
  227. </select>
  228. </div>
  229. </div>
  230. <div id="new-training-tutor-layer" style="display:none">
  231. <div class="form-group">
  232. <label class="control-label col-sm-3">{{ 'Name' | get_plugin_lang('SepePlugin') }}</label>
  233. <div class="col-sm-9">
  234. <input class="form-control" type="text" name="tutor_training_alias" value="" />
  235. </div>
  236. </div>
  237. <div class="form-group">
  238. <label class="control-label col-sm-3">{{ 'DocumentType' | get_plugin_lang('SepePlugin') }}: </label>
  239. <div class="col-sm-9">
  240. <select name="tutor_training_document_type" class="form-control">
  241. <option value="" selected="selected"></option>
  242. <option value="D">{{ 'DocumentTypeD' | get_plugin_lang('SepePlugin') }}</option>
  243. <option value="E">{{ 'DocumentTypeE' | get_plugin_lang('SepePlugin') }}</option>
  244. <option value="U">{{ 'DocumentTypeU' | get_plugin_lang('SepePlugin') }}</option>
  245. <option value="G">{{ 'DocumentTypeG' | get_plugin_lang('SepePlugin') }}</option>
  246. <option value="W">{{ 'DocumentTypeW' | get_plugin_lang('SepePlugin') }}</option>
  247. <option value="H">{{ 'DocumentTypeH' | get_plugin_lang('SepePlugin') }}</option>
  248. </select>
  249. </div>
  250. </div>
  251. <div class="form-group">
  252. <label class="control-label col-sm-3">{{ 'DocumentNumber' | get_plugin_lang('SepePlugin') }}: </label>
  253. <div class="col-sm-3">
  254. <input class="form-control" type="text" name="tutor_training_document_number" value="" />
  255. </div>
  256. </div>
  257. <div class="form-group">
  258. <label class="control-label col-sm-3">{{ 'DocumentLetter' | get_plugin_lang('SepePlugin') }}: </label>
  259. <div class="col-sm-2">
  260. <input class="form-control" type="text" name="tutor_training_document_letter" value="" />
  261. </div>
  262. </div>
  263. <div class="alert alert-warning">
  264. {{ 'DocumentFormatMessage' | get_plugin_lang('SepePlugin') }}
  265. </div>
  266. </div>
  267. </div>
  268. </div>
  269. <div class="well sepe-subfield">
  270. {% if new_participant == "1" %}
  271. <legend>{{ 'SpecialtiesParcipant' | get_plugin_lang('SepePlugin') | upper }}: </legend>
  272. <div class="alert alert-warning">{{ 'SpecialtiesParcipantMessage' | get_plugin_lang('SepePlugin') }}</div>
  273. {% else %}
  274. <legend>{{ 'SpecialtiesParcipant' | get_plugin_lang('SepePlugin') | upper }}:
  275. <a href="participant-specialty-edit.php?new_specialty=1&participant_id={{ info.id }}&action_id={{ action_id }}" class="btn btn-sm btn-info pull-right">{{ 'CreateSpecialty' | get_plugin_lang('SepePlugin') }}</a>
  276. </legend>
  277. <input type="hidden" id="confirmDeleteParticipantSpecialty" value="{{ 'confirmDeleteParticipantSpecialty'|get_plugin_lang('SepePlugin') }}" />
  278. {% for specialty in listParticipantSpecialty %}
  279. <div class="form-group">
  280. <label class="control-label col-sm-3">{{ 'Specialty' | get_plugin_lang('SepePlugin') }}: </label>
  281. <div class="col-sm-9">
  282. <label class="sepe-input-text">{{ specialty.specialty_origin }} {{ specialty.professional_area }} {{ specialty.specialty_code }}
  283. <a href="#" class="btn btn-danger btn-sm pull-right sepe-margin-side delete-specialty-participant" id="specialty{{ specialty.id }}">{{ 'Delete' | get_plugin_lang('SepePlugin') }}</a>
  284. <a href="participant-specialty-edit.php?new_specialty=0&participant_id={{ info.id }}&specialty_id={{ specialty.id }}&action_id={{ action_id }}" class="btn btn-warning btn-sm pull-right sepe-margin-side">{{ 'Edit' | get_plugin_lang('SepePlugin') }}</a>
  285. </label>
  286. </div>
  287. </div>
  288. {% endfor %}
  289. {% endif %}
  290. </div>
  291. </fieldset>
  292. </div>
  293. </div>
  294. </form>
  295. </div>