4 * Work/School Note Form new.php
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 */
32 <?php Header
::setupHeader('datetime-picker'); ?
>
35 // required for textbox date verification
36 var mypcc
= <?php
echo js_escape($GLOBALS['phone_country_code']); ?
>;
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'); ?> ">  
;
51 <input type
="button" class="dontsave" value
="<?php echo xla('Don\'t Save'); ?>">  
;
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
>
59 <b
><?php
echo xlt('MESSAGE:'); ?
></b
>
61 <textarea name
="message" id
="message" rows
="7" cols
="47"></textarea
>
65 // commented out below private field, because no field in database, and causes error.
68 <input type
="checkbox" name
="private" id
="private"><label
for="private">This note is
private</label
>
73 <b
><?php
echo xlt('Signature:'); ?
></b
>
78 <?php
echo xlt('Doctor:'); ?
>
79 <input type
="text" name
="doctor" id
="doctor" value
="<?php echo attr($provider_results["fname
"]) . ' ' . attr($provider_results["lname
"]); ?>">
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
'); ?>' />
91 <div style
="margin: 10px;">
92 <input type
="button" class="save" value
=" <?php echo xla('Save'); ?> ">  
;
93 <input type
="button" class="dontsave" value
="<?php echo xla('Don\'t Save'); ?>">  
;
102 // jQuery stuff to make the page a little easier to use
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 ?>