|
30 | 30 | // Include the SimpleRisk language file |
31 | 31 | require_once(language_file()); |
32 | 32 |
|
| 33 | +// Check if we should add a pending risk |
| 34 | +if (isset($_POST['add'])) |
| 35 | +{ |
| 36 | + // Push the pending risk to a real risk |
| 37 | + push_pending_risk(); |
| 38 | +} |
| 39 | + |
| 40 | +// Check if we should delete a pending risk |
| 41 | +if (isset($_POST['delete'])) |
| 42 | +{ |
| 43 | + // Get the risk id to delete |
| 44 | + $pending_risk_id = (int)$_POST['pending_risk_id']; |
| 45 | + |
| 46 | + // Delete the pending risk |
| 47 | + delete_pending_risk($pending_risk_id); |
| 48 | + |
| 49 | + // Set the alert message |
| 50 | + set_alert(true, "good", "The pending risk was deleted successfully."); |
| 51 | +} |
| 52 | + |
33 | 53 | // If an assessment was posted |
34 | 54 | if (isset($_POST['action']) && $_POST['action'] == "submit") |
35 | 55 | { |
|
69 | 89 | // If the action is view |
70 | 90 | else if ($_GET['action'] == "view") |
71 | 91 | { |
72 | | - // Use the Available Assessments menu |
73 | | - $menu = "AvailableAssessments"; |
| 92 | + // Use the Self Assessments menu |
| 93 | + $menu = "SelfAssessments"; |
74 | 94 | } |
75 | 95 | // If the action is send |
76 | 96 | else if ($_GET['action'] == "send") |
|
82 | 102 | // Otherwise |
83 | 103 | else |
84 | 104 | { |
85 | | - // Use the Available Assessments menu |
86 | | - $menu = "AvailableAssessments"; |
| 105 | + // Use the Self Assessments menu |
| 106 | + $menu = "SelfAssessments"; |
87 | 107 | } |
88 | 108 |
|
89 | 109 | ?> |
|
109 | 129 | // Include the jquery-ui javascript source |
110 | 130 | display_jquery_ui_javascript($scripts); |
111 | 131 |
|
112 | | - display_bootstrap_javascript(); |
| 132 | + display_bootstrap_javascript(); |
113 | 133 | ?> |
114 | 134 | <script src="../js/pages/assessment.js?<?php echo current_version("app"); ?>"></script> |
115 | 135 | <script src="../js/common.js?<?php echo current_version("app"); ?>"></script> |
116 | 136 | <script src="../js/cve_lookup.js?<?php echo current_version("app"); ?>"></script> |
117 | 137 | <script src="../js/jquery.blockUI.min.js?<?php echo current_version("app"); ?>"></script> |
| 138 | + <script src="../js/selectize.min.js?<?php echo current_version("app"); ?>"></script> |
| 139 | + <script src="../js/jquery.datetimepicker.full.min.js?<?php echo current_version("app"); ?>"></script> |
118 | 140 |
|
119 | 141 | <title>SimpleRisk: Enterprise Risk Management Simplified</title> |
120 | 142 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
|
130 | 152 | <link rel="stylesheet" href="../vendor/components/font-awesome/css/fontawesome.min.css?<?php echo current_version("app"); ?>"> |
131 | 153 | <link rel="stylesheet" href="../css/theme.css?<?php echo current_version("app"); ?>"> |
132 | 154 | <link rel="stylesheet" href="../css/side-navigation.css?<?php echo current_version("app"); ?>"> |
| 155 | + <link rel="stylesheet" href="../css/settings_tabs.css?<?php echo current_version("app"); ?>"> |
133 | 156 |
|
134 | 157 | <link rel="stylesheet" href="../css/selectize.bootstrap3.css?<?php echo current_version("app"); ?>"> |
135 | 158 | <script src="../js/selectize.min.js?<?php echo current_version("app"); ?>"></script> |
| 159 | + <link rel="stylesheet" href="../css/jquery.datetimepicker.min.css?<?php echo current_version("app"); ?>"> |
136 | 160 |
|
137 | 161 | <?php |
138 | 162 | setup_favicon(".."); |
|
204 | 228 | } |
205 | 229 | else |
206 | 230 | { |
207 | | - // Display the available assessments |
208 | | - display_assessment_links(); |
| 231 | + // Display the self assessments |
| 232 | + display_self_assessments(); |
209 | 233 | } |
210 | 234 | ?> |
211 | 235 | </div> |
212 | 236 | </div> |
213 | 237 | </div> |
214 | | - <?php display_set_default_date_format_script(); ?> |
| 238 | + <script> |
| 239 | + (function($) { |
| 240 | + |
| 241 | + var tabs = $(".tabs li a"); |
| 242 | + |
| 243 | + tabs.click(function() { |
| 244 | + var content = this.hash.replace('/',''); |
| 245 | + tabs.removeClass("active"); |
| 246 | + $(this).addClass("active"); |
| 247 | + $("#content").find('.settings_tab').hide(); |
| 248 | + $(content).fadeIn(200); |
| 249 | + }); |
| 250 | + })(jQuery); |
| 251 | + </script> |
| 252 | + <?php display_set_default_date_format_script(); ?> |
215 | 253 | </body> |
216 | 254 |
|
217 | 255 | </html> |
0 commit comments