diff options
Diffstat (limited to 'public/app/views/templates/application.php')
| -rw-r--r-- | public/app/views/templates/application.php | 136 |
1 files changed, 27 insertions, 109 deletions
diff --git a/public/app/views/templates/application.php b/public/app/views/templates/application.php index 6e36d00..4611a2d 100644 --- a/public/app/views/templates/application.php +++ b/public/app/views/templates/application.php @@ -25,7 +25,18 @@ <?=$form['html']?> <br /> - <button type="submit" class="btn btn-primary btn-sm col-12">Καταχώριση</button> + <div class="row"> + <div class="col-4"> + <button class="btn btn-preview btn-sm col-12"> + Προεπισκόπηση + </button> + </div> + <div class="col-8"> + <button type="submit" class="btn btn-primary btn-sm col-12"> + Καταχώριση + </button> + </div> + </div> </div> </form> @@ -74,8 +85,12 @@ --> <script>// initialize needed global variables - var values = {}; - var empty = ''; + var ref = { + organization: '<?=DEFAULT_SCHOOL?>', + applier: '<?=$applier?>', + ticket: '<?=$ticket?>' + }; + </script> @@ -102,12 +117,18 @@ ?> +<?php // load application pdf-designer + //////////////////////////////////////////////////////////////////////////// + Render::view('js/pdf-designer/application'); +?> + + <?php // include attachments handling //////////////////////////////////////////////////////////////////////////// Render::view('js/attachments-handling'); ?> - +<!-- <script> var source = { first_name: 'George', @@ -120,113 +141,10 @@ var source = { } -function designer(data) { - return { - info: { - title: 'some-document', - author: 'name', - subject: 'theme', - keywords: 'petition type, year', - }, - content: [ - { - text: 'ΑΙΤΗΣΗ\n\n', - style: 'header' - }, - { - alignment: 'justify', - columns: [ - { - width: 210, - text: '' - }, - { - width: 'auto', - lineHeight: 1.35, - text:[ - 'ΠΡΟΣ\n', - { - style: 'bigger', - text: data.constants.organization - } - ] - } - ] - }, - { - alignment: 'justify', - columns: [ - { - width: 210, - lineHeight: 1.5, - text: [ - 'Όνομα: ', { style: 'bigger', text: data.first_name }, - '\nΕπίθετο: ', { style: 'bigger', text: data.last_name }, - '\nΌνομα πατρός: ',{ style: 'bigger', text: data.father_name }, - '\nEmail: ', { style: 'bigger', text: data.email }, - ] - }, - { - width: 'auto', - lineHeight: 1.33, - text: [ - '\n\n', - { - style: 'bigger', - text: data.message+'\n' - }, - '\n\ndate: ', - '\n\nze Is', - '\n\n\n', - { - style: 'bigger', - text: data.last_name +' '+data.first_name - } - ] - } - ] - }, - '\n\n\n\nWow, you\'ve read the whole document! Congratulations :D' - ], - footer: { - text: [ - 'the document has been registered with number A124-2501-4589-4568-7 / 2023-12-15', - '\ndocument signature: <?=sha1(rand(1,1111))?>' - - ], - style: 'signature' - }, - styles: { - header: { - fontSize: 24, - bold: true, - alignment: 'center', - color: '#000' - }, - bigger: { - fontSize: 13, - italics: false, - color: '#000' - }, - signature: { - fontSize: 11, - italics: false, - alignment: 'center' - - } - }, - defaultStyle: { - columnGap: 25, - fontSize: 12 - } - }; -} - - -pdfMake.createPdf(designer(source)).open(); +// pdfMake.createPdf(designer(source)).open(); // download (+title): .download('my-doc-title.pdf'); // open in same window: .open({}, window); // print: .print(); </script> - +--> </html> |
