feat: added real world testing 2025 report (#7910)
[openemr.git] / interface / forms / note / new.php
blob860fddc67a225d6c64b3db002ea31450cf2204d6
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 * sherwingaddis@gmail.com added bootstrap 2023
14 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
18 require_once dirname(__FILE__, 3) . "/globals.php";
19 require_once("$srcdir/api.inc.php");
21 use OpenEMR\Common\Csrf\CsrfUtils;
22 use OpenEMR\Core\Header;
24 formHeader("Form: note");
25 $returnurl = 'encounter_top.php';
26 $provider_results = sqlQuery("select fname, lname from users where username=?", array($_SESSION["authUser"]));
27 /* name of this form */
28 $form_name = "note";
30 <html>
31 <head>
32 <?php Header::setupHeader('datetime-picker'); ?>
33 <script>
34 // required for textbox date verification
35 const mypcc = <?php echo js_escape($GLOBALS['phone_country_code']); ?>;
37 $(function () {
38 $('.datepicker').datetimepicker({
39 <?php $datetimepicker_timepicker = false; ?>
40 <?php $datetimepicker_showseconds = false; ?>
41 <?php $datetimepicker_formatInput = true; ?>
42 <?php require($GLOBALS['srcdir'] . '/js/xl/jquery-datetimepicker-2-5-4.js.php'); ?>
43 <?php // can add any additional javascript settings to datetimepicker here; need to prepend first setting with a comma ?>
44 });
45 });
46 </script>
47 </head>
48 <body>
49 <div class="container">
50 <div class="row">
51 <div class="col-sm-12 mt-5">
52 <h1><?php echo xlt('Work/School Note'); ?></h1>
53 <?php echo text(date("F d, Y", time())); ?>
54 </div>
55 <div class="row">
56 <div class="col-sm-12">
57 <form class="form" method=post action="<?php echo $rootdir . "/forms/" . $form_name . "/save.php?mode=new";?>" name="my_form" id="my_form">
58 <input type="hidden" name="csrf_token_form" value="<?php echo attr(CsrfUtils::collectCsrfToken()); ?>" />
60 <div style="margin: 10px;">
61 <input type="button" class="btn btn-primary save" value=" <?php echo xla('Save'); ?> "> &nbsp;
62 <input type="button" class="btn btn-warning dontsave" value="<?php echo xla('Don\'t Save'); ?>"> &nbsp;
63 </div>
65 <select class="form-control" name="note_type">
66 <option value="WORK NOTE"><?php echo xlt('WORK NOTE'); ?></option>
67 <option value="SCHOOL NOTE"><?php echo xlt('SCHOOL NOTE'); ?></option>
68 </select>
69 <br />
70 <b><?php echo xlt('MESSAGE:'); ?></b>
71 <br />
72 <textarea class="form-control" name="message" id="message" rows="7" cols="47"></textarea>
73 <br />
75 <br />
76 <b><?php echo xlt('Signature:'); ?></b>
77 <br />
78 <table class="table">
79 <tr><td>
80 <?php echo xlt('Doctor:'); ?>
81 <input class="form-control" type="text" name="doctor" id="doctor" value="<?php echo attr($provider_results["fname"]) . ' ' . attr($provider_results["lname"]); ?>">
82 </td>
84 <td>
85 <span class="text"><?php echo xlt('Date'); ?></span>
86 <input class='datepicker form-control' type='text' size='16' name='date_of_signature' id='date_of_signature' autocomplete='off'
87 value='<?php echo attr(oeFormatShortDate(date('Y-m-d'))); ?>'
88 title='<?php echo xla('Date of Signature'); ?>' />
89 </td>
90 </tr>
91 </table>
92 <div style="margin: 10px;">
93 <input type="button" class="btn btn-primary save" value=" <?php echo xla('Save'); ?> "> &nbsp;
94 <input type="button" class="btn btn-warning dontsave" value="<?php echo xla('Don\'t Save'); ?>"> &nbsp;
95 </div>
96 </form>
97 </div>
98 </div>
99 </div>
100 </body>
101 <script>
102 // jQuery stuff to make the page a little easier to use
103 $(function () {
104 $(".save").click(function() { top.restoreSession(); $('#my_form').submit(); });
105 $(".dontsave").click(function() { parent.closeTab(window.name, false); });
107 </script>
108 </html>