123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240 |
- <!-- Authors : Carlos C. Corrada-Bravo
- David J. Ortiz-Rivera
-
- Organization : Centro de Desarrollo y Consultoria Computacional
- Project : OPASO Material Registry
- File : manage-laboratories
- Description : Edit laboratory data -->
-
- <!-- verify session -->
- <?php require_once("header.php");
-
- /* start user session */
- if(!isset($_SESSION)){
- session_start();
- }
-
- if(!($_SESSION["access_level"] === "admin") and !($_SESSION["access_level"] === "investigator")){
- header("Location: /menu");
- die();
- }
- ?>
-
- <!doctype html>
- <html lang="en">
- <!-- encoding/imports/styling -->
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title class="title">Manage Laboratories</title>
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
- <link rel="stylesheet" href="./style/main.css">
- <link rel="stylesheet" href="/style/manage.css">
- <link rel="stylesheet" href="/style/add.css">
- </head>
-
- <!-- content -->
- <body>
- <!-- lab forms -->
- <div class="form-shader close-form">
- <!-- edit form -->
- <div class="main-form close-form">
- <div class="form-wrapper edit-lab">
- <div class="form-header-wrapper">
- <h5 class="form-header main-header">Edit Laboratory</h5>
- <div class="close-icon"><i class="close-form material-icons">close</i></div>
- </div>
- <div class="form">
- <div class="form-body edit-lab-body">
- <div class="li-wrapper large-field">
- <label for="lab_name">Lab Name</label>
- <input id="lab_name" class="main-required ap-field" type="text" placeholder="Lab Name" name="lab_name">
- <div class="invalid-feedback lab_name">Please provide a valid name</div>
- </div>
- <div class="li-append">
- <div class="li-wrapper small-field">
- <label for="lab_room">Room</label>
- <input id="lab_room" class="main-required ap-field" type="text" placeholder="Lab Room" name="lab_room">
- <div class="invalid-feedback lab_room">Please provide a valid lab room</div>
- </div>
- <div class="li-wrapper margin-left medium-field">
- <label for="department">Department</label>
- <input id="department" class="main-required ap-field" type="text" placeholder="Department" name="department">
- <div class="invalid-feedback department">Please provide a valid department</div>
- </div>
- </div>
- <div class="li-append">
- <div class="li-wrapper medium-field">
- <label for="building">Building</label>
- <input id="building" class="main-required ap-field" type="text" placeholder="Building" name="building">
- <div class="invalid-feedback building">Please provide a valid building</div>
- </div>
- <div class="li-wrapper margin-left small-field">
- <label for="extension">Extension</label>
- <input id="extension" class="ap-field" type="text" name="extension" placeholder="Extension" oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');">
- </div>
- </div>
- <div class="li-wrapper medium-field">
- <label for="number">Principal Investigator</label>
- <!-- Select form -->
- <div class="select-form">
- <select class="pi main-pi">
- </select>
- </div>
- </div>
- </div>
- <div class="form-actions">
- <button class="btn btn-primary action-btn submit" id="main-submit">Submit</button>
- </div>
- </div>
- </div>
- </div>
-
- <!-- add form -->
- <div class="add-form close-form">
- <div class="add-form-wrapper edit-lab">
- <div class="add-form-header-wrapper">
- <h5 class="form-header">Add Laboratory</h5>
- <div class="close-icon"><i class="close-form material-icons">close</i></div>
- </div>
- <div class="add-form-body-wrapper">
- <div class="add-form-body">
- <div class="li-wrapper large-field">
- <label for="lab_name">Lab Name</label>
- <input id="add_lab_name" class="required ap-field" type="text" placeholder="Lab name" name="lab_name">
- <div class="invalid-feedback add_lab_name">Please provide a valid name</div>
- </div>
- <div class="li-append">
- <div class="li-wrapper small-field">
- <label for="lab_room">Lab Room</label>
- <input id="add_lab_room" class="required ap-field" type="text" placeholder="Lab room" name="lab_room">
- <div class="invalid-feedback add_lab_room">Please provide a valid lab room</div>
- </div>
- <div class="li-wrapper margin-left medium-field">
- <label for="department">Department</label>
- <input id="add_department" class="required ap-field" type="text" placeholder="Department" name="department">
- <div class="invalid-feedback add_department">Please provide a valid department</div>
- </div>
- </div>
- <div class="li-append">
- <div class="li-wrapper medium-field">
- <label for="building">Building</label>
- <input id="add_building" class="required ap-field" type="text" placeholder="Building" name="building">
- <div class="invalid-feedback add_building">Please provide a valid building</div>
- </div>
- <div class="li-wrapper margin-left small-field">
- <label for="extension">Extension</label>
- <input id="add_extension" class="ap-field" type="text" name="extension" placeholder="Extension" oninput="this.value = this.value.replace(/[^0-9.]/g,'').replace(/(\..*)\./g, '$1');">
- </div>
- </div>
- <div class="li-wrapper medium-field">
- <label for="number">Principal Investigator</label>
- <!-- Select form -->
- <div class="select-form">
- <select class="pi add-pi">
- </select>
- </div>
- </div>
- <small class="add-lab-warning">*All PIs must already be in the system</small>
- </div>
- <div class="add-form-actions">
- <button class="btn btn-primary action-btn submit" id="add-submit">Submit</button>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <!-- alerts -->
- <div class="alerts">
- <div class="alert">
- <div class="message-icon-wrapper">
- <i class="message-icon success-icon material-icons">done</i>
- <i class="message-icon error-icon failed-icon warning-icon material-icons">close</i>
- </div>
- <p class="alert-status"></p>
- <p class="alert-message"></p>
- </div>
- </div>
-
- <div class="content">
- <!-- navbar -->
- <?php require_once("navbar.php")?>
- <div class="main">
- <div class="header-wrapper">
- <h5 class="header">Manage Laboratories</h5>
-
- <!-- processing -->
- <div class="processing">
- <p class="processing-text">Fetching laboratories...</p>
- <div class="loader"></div>
- </div>
- </div>
- <div class="main-wrapper">
-
- <!-- search form -->
- <div class="float-right">
-
- <?php
- /* start user session */
- if(!isset($_SESSION)){
- session_start();
- }
- if($_SESSION["access_level"] == "admin"){
- echo '<!-- Add Material -->
- <div class="transaction btn btn-light" id="add">
- <i class="fas fa-plus add-personnel-icon"></i>
- <p class="add-text">Add</p>
- </div>';
- }
-
- ?>
-
- <div class="search-form-wrapper">
- <input class="search-form" placeholder="Search for laboratories" type="text" name="search-form">
- <button class="clear-btn search-form-submit">
- <i class="material-icons clear-icon">close</i>
- </button>
- </div>
- </div>
-
- <!-- laboratories -->
- <h6 class="header sub-header">Full Laboratory List</h6>
- <div class="table-wrapper content-wrapper manage-labs">
- <table class="table">
- <thead class="table-header">
- <tr>
- <th class="sort" value="lab_room">Lab Room
- <i class="sort-primary fas fa-caret-down"></i>
- </th>
- <th value="lab_name">Lab Name</th>
- <th>Department</th>
- <th class="sort" value="building"> Building
- <i class="sort-alt fas fa-caret-down"></i>
- </th>
- <th >Extension</th>
- <th >PI</th>
- <th >Actions</th>
- </tr>
- </thead>
- <tbody></tbody>
- </table>
- </div>
- <h6 class="header table-total"></h6>
- </div>
- </div>
-
- <!-- footer -->
- <?php require_once("footer.php")?>
- </div>
-
- <!-- scripts -->
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
- <script type="text/javascript" src="/scripts/main.js"></script>
- <script type="text/javascript" src="/scripts/manage-laboratories.js"></script>
- </body>
- </html>
|