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 * 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 */
32 <?php Header
::setupHeader('datetime-picker'); ?
>
34 // required for textbox date verification
35 const mypcc
= <?php
echo js_escape($GLOBALS['phone_country_code']); ?
>;
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 ?>
49 <div
class="container">
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())); ?
>
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'); ?> ">  
;
62 <input type
="button" class="btn btn-warning dontsave" value
="<?php echo xla('Don\'t Save'); ?>">  
;
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
>
70 <b
><?php
echo xlt('MESSAGE:'); ?
></b
>
72 <textarea
class="form-control" name
="message" id
="message" rows
="7" cols
="47"></textarea
>
76 <b
><?php
echo xlt('Signature:'); ?
></b
>
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
"]); ?>">
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
'); ?>' />
92 <div style
="margin: 10px;">
93 <input type
="button" class="btn btn-primary save" value
=" <?php echo xla('Save'); ?> ">  
;
94 <input type
="button" class="btn btn-warning dontsave" value
="<?php echo xla('Don\'t Save'); ?>">  
;
102 // jQuery stuff to make the page a little easier to use
104 $
(".save").click(function() { top
.restoreSession(); $
('#my_form').submit(); });
105 $
(".dontsave").click(function() { parent
.closeTab(window
.name
, false); });