Current Path : /data/web/virtuals/51568/virtual/www/subdom/srps/src/runtime/latte/ |
Current File : /data/web/virtuals/51568/virtual/www/subdom/srps/src/runtime/latte/src-views-vypisySparovatDlg.latte--54b6dd6a88.php |
<?php use Latte\Runtime as LR; /** source: /data/web/virtuals/51568/virtual/www/subdom/srps/src/views/vypisySparovatDlg.latte */ final class Template54b6dd6a88 extends Latte\Runtime\Template { protected const BLOCKS = [ ['modal-body' => 'blockModal_body'], ]; public function main(): array { extract($this->params); echo "\n"; if ($this->getParentName()) { return get_defined_vars(); } $this->renderBlock('modal-body', get_defined_vars()) /* line 3 */; return get_defined_vars(); } public function prepare(): void { extract($this->params); if (!$this->getReferringTemplate() || $this->getReferenceType() === "extends") { foreach (array_intersect_key(['trida' => '18'], $this->params) as $ʟ_v => $ʟ_l) { trigger_error("Variable \$$ʟ_v overwritten in foreach on line $ʟ_l"); } } $this->parentName = '_layout_modal.latte'; } /** {block modal-body} on line 3 */ public function blockModal_body(array $ʟ_args): void { extract($this->params); extract($ʟ_args); unset($ʟ_args); echo '<div id="sparovat" data-idpolozky="'; echo LR\Filters::escapeHtmlAttr($idpolozky) /* line 4 */; echo '" data-akce="'; echo LR\Filters::escapeHtmlAttr($akce) /* line 4 */; echo '" data-idakce="'; echo LR\Filters::escapeHtmlAttr($idakce) /* line 4 */; echo '" data-idzakabyl="'; echo LR\Filters::escapeHtmlAttr($idzakabyl) /* line 4 */; echo '"> <div class="d-flex mb-3"> <div class="me-4"><strong>VS:</strong> '; echo LR\Filters::escapeHtmlText($vypis->VS) /* line 7 */; echo '</div> <div class="me-4"><strong>zpráva:</strong> '; echo LR\Filters::escapeHtmlText($vypis->zprava) /* line 8 */; echo '</div> <div class="me-4"><strong>název účtu:</strong> '; echo LR\Filters::escapeHtmlText($vypis->jmenoplatce) /* line 9 */; echo '</div> </div> <div class="h5 text-primary border-bottom border-top border-primary py-2">Vyber třídu a následně žáka, kterého chceš přiřadit k položce výpisu:</div> <div class="row"> <div class="col-2"> <div class="row"> <div id="tridy-table" class="col-6"> <table class="table table-sm table-striped table-bordered"> '; $i = 0 /* line 17 */; $iterations = 0; foreach ($tridy as $trida) /* line 18 */ { $i++ /* line 19 */; if ($i == 12) /* line 20 */ { echo ' </table> </div> <div id="tridy-table" class="col-6"> <table class="table table-sm table-striped table-bordered"> '; } echo ' <tr> <td> <div class="form-check ms-2"> <input class="form-check-input" type="radio" name="trida" id="trida-'; echo LR\Filters::escapeHtmlAttr($trida->nazev) /* line 29 */; echo '" '; if ($tridabyla == $trida->nazev) /* line 29 */ { echo ' checked'; } echo '> <label class="form-check-label ms-3" for="trida-'; echo LR\Filters::escapeHtmlAttr($trida->nazev) /* line 30 */; echo '"> '; echo LR\Filters::escapeHtmlText($trida->nazev) /* line 31 */; echo ' </label> </div> </td> </td> '; $iterations++; } echo ' </table> </div> </div> </div> <div id="seznamzaku-table" class="col-10"> '; if ($zaci) /* line 42 */ { $this->createTemplate('vypisySparovatDlgZaci.latte', ['zaci' => $zaci, 'idzaka' => $idzaka] + $this->params, 'include')->renderToContentType('html') /* line 43 */; } echo ' </div> </div> <script> $("[id^=trida]").on(\'click\', function() { let trida = $(this).attr(\'id\').split(\'-\')[1], data = { trida: trida }; $.ajax({ url: "/vypisy-sparovat-dlg-zaci", type: \'get\', data: { \'data\': JSON.stringify(data) }, success: function(result) { $("#seznamzaku-table").html(result); }, }); } ) $("[id^=trida-]").on(\'click\', function() { $(\'#btn-submit-dlg\').attr(\'disabled\', true); } ) $("#btn-submit-dlg").on("click", function(event) { const data = { akce: $("#sparovat").data(\'akce\'), idakce: $("#sparovat").data(\'idakce\'), idpolozky: $("#sparovat").data(\'idpolozky\'), idzakabyl: $("#sparovat").data(\'idzakabyl\'), idzaka: $("[id^=zaci-]:checked").attr(\'id\').split(\'-\')[1], idvypis: $("#table-polozkyvypisu").data("idvypis"), } //console.table(data); $.ajax({ url: "/vypisy-sparovat", type: \'post\', data: {\'data\': JSON.stringify(data)}, success: function(result) { //alert(result); const dataResult = JSON.parse(result); $("#vypisy-sparovat-dlg").modal(\'hide\'); if (dataResult.result) { $("#vypisy-detail").html(dataResult.vypisy) } }, }) } ) </script> '; } }