New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New dictation modernazation #818
Changes from 8 commits
5b8a752
6540378
551ab56
55576d3
dfc7adf
0981412
75f79de
6818c37
7d103bd
3e2d009
e2ab3e1
5084ea8
92f63ec
3b93b49
777a2b1
87357b3
d08959b
af662e0
1a70cf6
c064b8e
fc2d761
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
/** | ||
* Drag and Drop file uploader. | ||
* | ||
* Copyright (C) 2017 Sherwin Gaddis sherwingaddis@gmail.com | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are trying to standardize our docblocks. Examples here http://www.open-emr.org/wiki/index.php/How_to_Document_Your_Code_Properly#Examples_for_OpenEMR |
||
* | ||
* LICENSE: This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>. | ||
* | ||
* @package OpenEMR | ||
* @author Sherwin Gaddis sherwingaddis@gmail.com | ||
*/ | ||
|
||
$patient_id = filter_input(INPUT_GET, 'patient_id'); | ||
$category_id = filter_input(INPUT_GET, 'parent_id'); | ||
|
||
|
||
$sanitize_all_escapes=true; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This functionality has been removed, remove 25, 26 |
||
$fake_register_globals=false; | ||
|
||
require_once("../globals.php"); | ||
require_once(dirname(__FILE__) . "/../../library/documents.php"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think '$GLOBALS["srcdir"]' would point to the library folder There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually $scrdir will do the job. |
||
|
||
if (!empty($_FILES)) { | ||
|
||
$name = $_FILES['file']['name']; | ||
$type = $_FILES['file']['type']; | ||
$tmp_name = $_FILES['file']['tmp_name']; | ||
$size = $_FILES['file']['size']; | ||
$owner = $GLOBALS['userauthorized']; | ||
|
||
|
||
addNewDocument($name,$type,$tmp_name,$error,$size,$owner,$patient_id_or_simple_directory=$patient_id,$category_id, | ||
$higher_level_path='',$path_depth='1'); | ||
|
||
} | ||
|
||
?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No need for closing tag here |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,56 @@ | ||
<!-- Form generated from formsWiz --> | ||
<?php | ||
/** Copyright (C) 2016 Sherwin Gaddis <sherwingaddis@gmail.com> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above comment about docblocks |
||
* | ||
* LICENSE: This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version 2 | ||
* of the License, or (at your option) any later version. | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;. | ||
* | ||
* @package OpenEMR | ||
* @author Sherwin Gaddis <sherwingaddis@gmail.com> | ||
* @link http://www.open-emr.org | ||
*/ | ||
|
||
|
||
|
||
use OpenEMR\Core\Header; | ||
|
||
include_once("../../globals.php"); | ||
include_once("$srcdir/api.inc"); | ||
formHeader("Form: dictation"); | ||
$returnurl = 'encounter_top.php'; | ||
?> | ||
<html><head> | ||
<?php html_header_show();?> | ||
<link rel="stylesheet" href="<?php echo $css_header;?>" type="text/css"> | ||
<html> | ||
<head> | ||
<?php Header::setupHeader(); ?> | ||
<script type="text/javascript" src="<?php echo $webroot."/library/custom_template/ckeditor/ckeditor.js" ?>"</script> | ||
<script src="<?php echo $webroot."/library/custom_template/ckeditor/_samples/sample.js" ?>" type="text/javascript"></script> | ||
<link href="<?php echo $webroot."/library/custom_template/ckeditor/_samples.css"; ?>" rel="stylesheet" type="text/css" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do these things drastically change form? And also, will the form still be backward compatible? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To my limited knowledge, the ckeditor wraps around the text area like styling. I will test to make sure but it does not change the property of the text area. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which two unrelated files There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 2 unrelated files are: |
||
</head> | ||
<body class="body_top"> | ||
<h1><?php echo xlt('Speech Dictation'); ?></h1><br><br> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wrap this in a div with the class page-header |
||
|
||
<div class="container"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Container should be up by the body, we want most everything contained |
||
<form method=post action="<?php echo $rootdir;?>/forms/dictation/save.php?mode=new" name="my_form"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Take a look at the examples on http://getbootstrap.com/css/#forms for how to layout a form. |
||
<span class="title"><?php echo xlt('Speech Dictation'); ?></span><br><br> | ||
<span class=text><?php echo xlt('Dictation: '); ?></span><br><textarea cols=80 rows=24 wrap=virtual name="dictation" ></textarea><br> | ||
<span class=text><?php echo xlt('Additional Notes:'); ?> </span><br><textarea cols=80 rows=8 wrap=virtual name="additional_notes" ></textarea><br> | ||
<br> | ||
<a href="javascript:top.restoreSession();document.my_form.submit();" class="link_submit">[<?php echo xlt('Save'); ?>]</a> | ||
<br> | ||
<div class="form-group"> | ||
|
||
<label class="text"><?php echo xlt('Dictation: '); ?></label><br><textarea class="form-control ckeditor" cols=80 rows=24 wrap="virtual" name="dictation" ></textarea> | ||
</div> | ||
<div class="form-group"> | ||
<label class="text"><?php echo xlt('Additional Notes:'); ?> </label><br><textarea class="form-control ckeditor" cols=80 rows=8 wrap="virtual" name="additional_notes" ></textarea> | ||
</div> | ||
|
||
<a href="javascript:top.restoreSession();document.my_form.submit();" class="link_submit"><button><?php echo xlt('Save'); ?></button></a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the a tag, setup the button with a type=submit and the following classes: btn btn-default btn-save |
||
|
||
<a href="<?php echo "$rootdir/patient_file/encounter/$returnurl";?>" class="link" | ||
onclick="top.restoreSession()">[<?php echo xlt('Don\'t Save'); ?>]</a> | ||
onclick="top.restoreSession()"><button><?php echo xlt('Don\'t Save'); ?></button></a> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will seem odd, but there's reasons. This element will take the user away from the page so it should be an tag, but there is no need for a button inside. Add the btn btn-cancel and btn-link classes to the anchor. This will make it look like a button while maintaining the proper functionality. Also, I'd stick with "Cancel" as the text, that seems to be the paradigm throughout the rest of the program |
||
</form> | ||
</div> | ||
<?php | ||
formFooter(); | ||
?> |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this file