demographics_dashboard_part_2 (#1903)
[openemr.git] / .docs / buttons / README.md
blob6c2bac61d70cdf8aef7a61b2372cef121b6fe9ea
1 Buttons at bottom of form
2 -----
3 Sample code for buttons at the bottom of form:
5 ```php
6 <div class="form-group clearfix">
7     <div class="col-sm-12 col-sm-offset-1 position-override">
8         <div class="btn-group oe-opt-btn-group-pinch" role="group">
9             <button type='submit' onclick='top.restoreSession()' class="btn btn-default btn-save"><?php echo xlt('Save'); ?></button>
10             <button type="button" class="btn btn-link btn-cancel oe-opt-btn-separate-left" onclick="top.restoreSession(); location.href='<?php echo "$rootdir/patient_file/encounter/$returnurl";?>';"><?php echo xlt('Cancel');?></button>
11         </div>
12     </div>
13 </div>
14 ```
15 #### Classes
16 When adding buttons to the bottom of forms, will be important to incorporate following classes.
18 `position-override` gives a hook for style to change placement of buttons. In light/manila style this is ignored and buttons go to left positioned under data entry field. Whereas in the other styles this is used to center the buttons.
20 `oe-opt-btn-group-pinch` gives a hook for style to pinch the buttons (i think make them more rounded). Not used in light/manila, but used in other styles.
22 `oe-opt-btn-separate-left` gives a hook to place a space between the buttons. Not used in light/manila, but used in other styles.
24 #### Miscellaneous
26 (note there is also flexibility in how the Cancel links are shown. For example, in light, it's simple a link (not a button). And in Manila and other styles , some neat work was done to make it a button, but less accented than the Save buttons.)