Commit eef62e57914bc720cf181915bc69cd9d8d693dae
Merge branch 'master' of gitlab.artweb.com.ua:steska/clinica
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
backend/views/visit/_form.php
@@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
31 | ] | 31 | ] |
32 | ) ?> | 32 | ) ?> |
33 | <?php | 33 | <?php |
34 | - if ($model->entity !== null){ | 34 | + if (!empty($model->entity)){ |
35 | $entity = call_user_func(array($model->entity, 'find'))->where(['id' => $model->entity_id])->one(); | 35 | $entity = call_user_func(array($model->entity, 'find'))->where(['id' => $model->entity_id])->one(); |
36 | echo ("<p>".$entity->title."</p>"); | 36 | echo ("<p>".$entity->title."</p>"); |
37 | } | 37 | } |
frontend/web/js/script.js
@@ -463,7 +463,7 @@ $(document).ready(function() { | @@ -463,7 +463,7 @@ $(document).ready(function() { | ||
463 | $.post( | 463 | $.post( |
464 | $(this).attr("action"), $(this).serialize(), function(data) { | 464 | $(this).attr("action"), $(this).serialize(), function(data) { |
465 | document.getElementById(id).reset(); | 465 | document.getElementById(id).reset(); |
466 | - form.find('.submit-close-c-a').click(); | 466 | + form.find('.submit-close-c-a span').click(); |
467 | $(".add-answer-forms").after("<p class='success-message'>"+data.message+"</p>"); | 467 | $(".add-answer-forms").after("<p class='success-message'>"+data.message+"</p>"); |
468 | var dat = form.data('yiiActiveForm'); | 468 | var dat = form.data('yiiActiveForm'); |
469 | dat.validate = false; | 469 | dat.validate = false; |