Highway to PSR2
[openemr.git] / portal / patient / templates / SecureApp.tpl.php
blobc7054c011281c3aa747adc3439ac55a068b373fb
1 <?php
2 /**
4 * Copyright (C) 2016-2017 Jerry Padgett <sjpadgett@gmail.com>
6 * LICENSE: This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU Affero General Public License as
8 * published by the Free Software Foundation, either version 3 of the
9 * License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Affero General Public License for more details.
16 * You should have received a copy of the GNU Affero General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 * @package OpenEMR
20 * @author Jerry Padgett <sjpadgett@gmail.com>
21 * @link http://www.open-emr.org
24 $this->assign('title', xlt("Patient Portal Secure"));
25 $this->assign('nav', 'secureapp');
27 $this->display('_Header.tpl.php');
30 <div class="container">
32 <?php if ($this->feedback) { ?>
33 <div class="alert alert-error">
34 <button type="button" class="close" data-dismiss="alert">×</button>
35 <?php $this->eprint($this->feedback); ?>
36 </div>
37 <?php } ?>
39 <!-- #### this view/tempalate is used for multiple pages. the controller sets the 'page' variable to display differnet content #### -->
41 <?php if ($this->page == 'login') { ?>
43 <div class="hero-unit">
44 <h1><?php echo xlt('Login'); ?></h1>
45 <p><?php echo xlt('This portals authentication.'); ?> <strong><?php echo xlt('Your credentials are provided by your provider'); ?></strong>.</p>
46 <p>
47 <a href="secureuser" class="btn btn-primary btn-large"><?php echo xlt('Patient Access'); ?></a>
48 <a href="secureadmin" class="btn btn-primary btn-large"><?php echo xlt('Provider Access'); ?></a>
49 <?php if (isset($this->currentUser)) { ?>
50 <a href="logout" class="btn btn-primary btn-large"><?php echo xlt('Logout'); ?></a>
51 <?php } ?>
52 </p>
53 </div>
55 <form class="well" method="post" action="login">
56 <fieldset>
57 <legend><?php echo xlt('Enter your credentials'); ?></legend>
58 <div class="control-group">
59 <input id="username" name="username" type="text" placeholder="<?php echo xlt('Username'); ?>..." />
60 </div>
61 <div class="control-group">
62 <input id="password" name="password" type="password" placeholder="<?php echo xlt('Password'); ?>..." />
63 </div>
64 <div class="control-group">
65 <button type="submit" class="btn btn-primary"><?php echo xlt('Login'); ?></button>
66 </div>
67 </fieldset>
68 </form>
70 <?php } else { ?>
72 <div class="hero-unit">
73 <h1>Secure <?php $this->eprint($this->page == 'userpage' ? 'Patient' : 'Provider'); ?> Page</h1>
74 <p>This page is accessible only to <?php $this->eprint($this->page == 'userpage' ? 'authenticated patients' : 'administrators'); ?>.
75 <?php echo xlt('You are currently logged in as'); ?> '<strong><?php $this->eprint($this->currentUser->Username); ?></strong>'</p>
76 <p>
77 <a href="secureuser" class="btn btn-primary btn-large"><?php echo xlt('Visit Patient Home Page'); ?></a>
78 <a href="secureadmin" class="btn btn-primary btn-large"><?php echo xlt('Visit Provider Home Page'); ?></a>
79 <a href="logout" class="btn btn-primary btn-large"><?php echo xlt('Logout'); ?></a>
80 </p>
81 </div>
82 <?php } ?>
84 </div> <!-- /container -->
86 <?php
87 $this->display('_Footer.tpl.php');