.inc files migration to .inc.php (#5897)
[openemr.git] / interface / forms / note / new.php
blob77298deec2e90c2bfea0bb5fa8f3b33f21fe4fc6
1 <?php
3 /*
4 * Work/School Note Form new.php
6 * @package OpenEMR
7 * @link http://www.open-emr.org
8 * @author Nikolai Vitsyn
9 * @author Brady Miller <brady.g.miller@gmail.com>
10 * @copyright Copyright (c) 2004-2005 Nikolai Vitsyn
11 * @copyright Copyright (c) Open Source Medical Software
12 * @copyright Copyright (c) 2019 Brady Miller <brady.g.miller@gmail.com>
13 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
17 require_once(__DIR__ . "/../../globals.php");
18 require_once("$srcdir/api.inc.php");
20 use OpenEMR\Common\Csrf\CsrfUtils;
21 use OpenEMR\Core\Header;
23 formHeader("Form: note");
24 $returnurl = 'encounter_top.php';
25 $provider_results = sqlQuery("select fname, lname from users where username=?", array($_SESSION["authUser"]));
26 /* name of this form */
27 $form_name = "note";
30 <html><head>
32 <?php Header::setupHeader('datetime-picker'); ?>
34 <script>
35 // required for textbox date verification
36 var mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;
37 </script>
39 </head>
41 <body class="body_top">
42 <?php echo text(date("F d, Y", time())); ?>
44 <form method=post action="<?php echo $rootdir . "/forms/" . $form_name . "/save.php?mode=new";?>" name="my_form" id="my_form">
45 <input type="hidden" name="csrf_token_form" value="<?php echo attr(CsrfUtils::collectCsrfToken()); ?>" />
47 <span class="title"><?php echo xlt('Work/School Note'); ?></span><br /><br />
49 <div style="margin: 10px;">
50 <input type="button" class="save" value=" <?php echo xla('Save'); ?> "> &nbsp;
51 <input type="button" class="dontsave" value="<?php echo xla('Don\'t Save'); ?>"> &nbsp;
52 </div>
54 <select name="note_type">
55 <option value="WORK NOTE"><?php echo xlt('WORK NOTE'); ?></option>
56 <option value="SCHOOL NOTE"><?php echo xlt('SCHOOL NOTE'); ?></option>
57 </select>
58 <br />
59 <b><?php echo xlt('MESSAGE:'); ?></b>
60 <br />
61 <textarea name="message" id="message" rows="7" cols="47"></textarea>
62 <br />
64 <?php
65 // commented out below private field, because no field in database, and causes error.
67 <!--
68 <input type="checkbox" name="private" id="private"><label for="private">This note is private</label>
69 <br />
70 -->
72 <br />
73 <b><?php echo xlt('Signature:'); ?></b>
74 <br />
76 <table>
77 <tr><td>
78 <?php echo xlt('Doctor:'); ?>
79 <input type="text" name="doctor" id="doctor" value="<?php echo attr($provider_results["fname"]) . ' ' . attr($provider_results["lname"]); ?>">
80 </td>
82 <td>
83 <span class="text"><?php echo xlt('Date'); ?></span>
84 <input type='text' size='10' class='datepicker' name='date_of_signature' id='date_of_signature'
85 value='<?php echo attr(date('Y-m-d', time())); ?>'
86 title='<?php echo xla('yyyy-mm-dd'); ?>' />
87 </td>
88 </tr>
89 </table>
91 <div style="margin: 10px;">
92 <input type="button" class="save" value=" <?php echo xla('Save'); ?> "> &nbsp;
93 <input type="button" class="dontsave" value="<?php echo xla('Don\'t Save'); ?>"> &nbsp;
94 </div>
96 </form>
98 </body>
100 <script>
102 // jQuery stuff to make the page a little easier to use
104 $(function () {
105 $(".save").click(function() { top.restoreSession(); $('#my_form').submit(); });
106 $(".dontsave").click(function() { parent.closeTab(window.name, false); });
107 //$("#printform").click(function() { PrintForm(); });
109 $('.datepicker').datetimepicker({
110 <?php $datetimepicker_timepicker = false; ?>
111 <?php $datetimepicker_showseconds = false; ?>
112 <?php $datetimepicker_formatInput = false; ?>
113 <?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
114 <?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
118 </script>
120 </html>