Skip to content

Commit

Permalink
feat: Care Plan Form UI Improvements (openemr#6709)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdown committed Aug 2, 2023
1 parent e856d65 commit 20704a1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 26 deletions.
20 changes: 10 additions & 10 deletions interface/forms/care_plan/new.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
?>
<div class="tb_row" id="tb_row_<?php echo attr($key) + 1; ?>">
<div class="form-row">
<div class="forms col-md-2">
<div class="forms col-md-4">
<label for="code_<?php echo attr($key) + 1; ?>" class="h5"><?php echo xlt('Code'); ?>:</label>
<input type="text" id="code_<?php echo attr($key) + 1; ?>" name="code[]" class="form-control code"
value="<?php echo attr($obj["code"]); ?>" onclick='sel_code(<?php echo attr_js($GLOBALS['webroot']) ?>,
Expand All @@ -108,11 +108,11 @@
<input type="hidden" id="codetext_<?php echo attr($key) + 1; ?>" name="codetext[]" class="codetext" value="<?php echo attr($obj["codetext"]); ?>" />
<input type="hidden" id="user_<?php echo attr($key) + 1; ?>" name="user[]" class="user" value="<?php echo attr($obj["user"]); ?>" />
</div>
<div class="forms col-md-2">
<div class="forms col-md-4">
<label for="code_date_<?php echo attr($key) + 1; ?>" class="h5"><?php echo xlt('Date'); ?>:</label>
<input type='text' id="code_date_<?php echo attr($key) + 1; ?>" name='code_date[]' class="form-control code_date datepicker" value='<?php echo attr($obj["date"]); ?>' title='<?php echo xla('yyyy-mm-dd HH:MM Date of service'); ?>' />
</div>
<div class="forms col-md-2">
<div class="forms col-md-4">
<label for="care_plan_type_<?php echo attr($key) + 1; ?>" class="h5"><?php echo xlt('Type'); ?>:</label>
<select name="care_plan_type[]" id="care_plan_type_<?php echo attr($key) + 1; ?>" class="form-control care_plan_type">
<option value=""></option>
Expand All @@ -126,18 +126,18 @@
<?php endforeach;?>
</select>
</div>
<div class="forms col-md-6">
<div class="forms col-md-12">
<label for="description_<?php echo attr($key) + 1; ?>" class="h5"><?php echo xlt('Description'); ?>:</label>
<textarea name="description[]" id="description_<?php echo attr($key) + 1; ?>" data-textcontext="<?php echo attr($context); ?>" class="form-control description" rows="6" ><?php echo text($obj["description"]); ?></textarea>
</div>
<div class="form-row w-100 mt-2 text-center">
<div class="forms col-md-12">
<?php include("templates/careplan_actions.php"); ?>
</div>
<input type="hidden" name="count[]" id="count_<?php echo attr($key) + 1; ?>" class="count" value="<?php echo attr($key) + 1;?>" />
</div>
<div class="form-row mt-2">
<div class="forms col-md-12 d-flex flex-row-reverse ">
<?php include("templates/careplan_actions.php"); ?>
</div>
<?php include "templates/careplan_reason_row.php"; ?>
<input type="hidden" name="count[]" id="count_<?php echo attr($key) + 1; ?>" class="count" value="<?php echo attr($key) + 1;?>" />
</div>
<?php include "templates/careplan_reason_row.php"; ?>
<hr />
</div>
<?php }
Expand Down
34 changes: 18 additions & 16 deletions interface/forms/care_plan/templates/careplan_actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@
*/

?>
<button type="button" class="btn btn-primary btn-add btn-sm"
onclick="duplicateRow(this.parentElement.parentElement.parentElement.parentElement);"
title='<?php echo xla('Click here to duplicate the row'); ?>'>
<?php echo xlt('Add'); ?>
</button>
<button class="btn btn-danger btn-sm" onclick="
el=this.parentElement.parentElement.parentElement.parentElement;
deleteRow(event, el.id, el.parentElement.getElementsByClassName('tb_row').length);"
title='<?php echo xla('Click here to delete the row'); ?>'>
<?php echo xlt('Delete'); ?>
</button>
<button class="btn btn-secondary reason-code-btn btn-sm"
title='<?php echo xla('Click here to provide an explanation for the observation value (or lack of value)'); ?>'
data-toggle-container="reason_code_<?php echo attr($key); ?>"><i class="fa fa-asterisk"></i>
<?php echo xlt("Add Reason"); ?>
</button>
<div class="btn-group" role="group">
<button type="button" class="btn btn-secondary btn-add btn-sm"
onclick="duplicateRow(this.parentElement.parentElement.parentElement.parentElement);"
title='<?php echo xla('Click here to duplicate the row'); ?>'>
<?php echo xlt('Add'); ?>
</button>
<button class="btn btn-secondary btn-delete btn-sm" onclick="
el=this.parentElement.parentElement.parentElement.parentElement;
deleteRow(event, el.id, el.parentElement.getElementsByClassName('tb_row').length);"
title='<?php echo xla('Click here to delete the row'); ?>'>
<?php echo xlt('Delete'); ?>
</button>
<button class="btn btn-secondary reason-code-btn btn-sm"
title='<?php echo xla('Click here to provide an explanation for the observation value (or lack of value)'); ?>'
data-toggle-container="reason_code_<?php echo attr($key); ?>"><i class="fa fa-asterisk"></i>
<?php echo xlt("Add Reason"); ?>
</button>
</div>

0 comments on commit 20704a1

Please sign in to comment.