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
Allow section copy & global copy from another encounter for the same … #7279
base: master
Are you sure you want to change the base?
Conversation
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.
noted some escaping stuff @gauravsontakke , thanks for the PR, looks like a neat feature
…an alert box when errors occur.
interface/forms/LBF/new.php
Outdated
// This invokes the find lbf forms popup. | ||
function handleLBFFormsPopup(formname = '', encounter = '', pid = '') { | ||
let url = '<?php echo $GLOBALS['webroot']; ?>/interface/forms/LBF/php/find_encounter_form_popup.php?pid=' + encodeURIComponent(pid) + '&formname=' + encodeURIComponent(formname) + '&encounter=' + encodeURIComponent(encounter); | ||
let title = "<?php echo xlt('Select Encounter'); ?>"; |
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.
xlj (note dropped the outside quotes):
let title = <?php echo xlj('Select Encounter'); ?>;
interface/forms/LBF/new.php
Outdated
return false; | ||
} | ||
|
||
if (confirm(<?php echo xlj('Load data from selected encounter form into this form?') . '' ?> + '\n' + <?php echo xlj('Current data in this form will be overwritten.'); ?>)) { |
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.
what is the . ''
supposed to do?
|
||
<html> | ||
<head> | ||
<title><?php echo xl('Select Encounter'); ?></title> |
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.
xlt instead of xl
<html> | ||
<head> | ||
<title><?php echo xl('Select Encounter'); ?></title> | ||
<link rel="stylesheet" href='<?php echo $css_header ?>' type='text/css'> |
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.
shouldn't need line above (below line does that and note that the below line does not need dialog
, jquery
, fontawesome
, or main-theme
in the parameters since these are always included when call below function)
|
||
function selEncounterForm(encounter_id, form_id, pid) { | ||
if (opener.closed || ! opener.setEncounterForm) | ||
alert("<?php echo xl('The destination form was closed; I cannot act on your selection.'); ?>"); |
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.
xlj instead of xl and need to then remove the outside quotes
$pName = ' - ' . $pName; | ||
} | ||
|
||
$signed = $item['signed'] === true ? 'Signed' : 'Unsigned'; |
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.
support translate via xl:
$signed = $item['signed'] === true ? xl('Signed') : xl('Unsigned');
|
||
$signed = $item['signed'] === true ? 'Signed' : 'Unsigned'; | ||
if (!empty($signed)) { | ||
$signed = ' - <i>' . $signed . '</i>'; |
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.
htmlescape via text()
$signed = ' - <i>' . text($signed) . '</i>';
$signed = ' - <i>' . $signed . '</i>'; | ||
} | ||
|
||
$titleLink = trim($edate . ' ' . $cCat . $pName . $signed); |
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.
htmlescape via text()
$titleLink = trim(text($edate) . ' ' . text($cCat) . text($pName) . $signed);
sql/7_0_2-to-7_0_3_upgrade.sql
Outdated
@@ -113,3 +113,7 @@ | |||
ALTER TABLE `form_encounter` ADD `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; | |||
#EndIf | |||
|
|||
|
|||
#IfMissingColumn layout_group_properties grpsec_copy_allow | |||
ALTER TABLE `layout_group_properties` ADD `grpsec_copy_allow` tinyint(1) DEFAULT 0 AFTER `grp_last_update`; |
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 the AFTER grp_last_update
(just potential for breaking in upgrade in future if for some reason that column is removed)
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.
also would make it identical to the type you have in database.sql to ensure no differences in upgraded versions. ie. not null default 0
@gauravsontakke This PR has a conflict that needs to be addressed. Also, if you've resolved your PR issues please comment in each area where an admin has flagged an issue that you've resolved it so it can be re-reviewed. |
…LBF Form
#7278
Fixes #
Short description of what this resolves:
Allow section copy & global copy from another encounter.
Changes proposed in this pull request:
Allowing user to either use global copy or section copy in the layout based forms. This is an improvement to the usage adds flexibility while using the layout based forms.