Skip to content

Commit 33e7263

Browse files
committed
Closes #10
1 parent 33dd8eb commit 33e7263

File tree

7 files changed

+326
-323
lines changed

7 files changed

+326
-323
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.svn*
22
.DS_Store
3+
.idea

code/Module.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ class Module extends FormToolsModule
2222
protected $author = "Ben Keen";
2323
protected $authorEmail = "ben.keen@gmail.com";
2424
protected $authorLink = "https://formtools.org";
25-
protected $version = "2.0.4";
26-
protected $date = "2018-08-11";
25+
protected $version = "2.0.5";
26+
protected $date = "2019-05-29";
2727
protected $originLanguage = "en_us";
2828

2929
protected $nav = array(
@@ -108,7 +108,7 @@ public function registerHooks()
108108

109109
// display the submission history on the administrator's Edit Submission page
110110
Hooks::registerHook("template", "submission_history", "admin_edit_submission_bottom", "", "hookDisplaySubmissionChangelog");
111-
Hooks::registerHook("code", "submission_history", "main", "FormTools\\Themes::displayPage", "hookIncludeModuleResources");
111+
Hooks::registerHook("code", "submission_history", "main", "FormTools\\Themes::getPage", "hookIncludeModuleResources");
112112
}
113113

114114

css/styles.css

Lines changed: 78 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,105 +1,130 @@
11
div#sh__content {
2-
padding: 4px 8px 4px;
3-
margin-top: 16px;
4-
width: 723px;
2+
padding: 4px 8px 4px;
3+
margin-top: 16px;
4+
width: 723px;
55
}
6+
67
div#sh__page_label {
7-
font-size: 8pt;
8-
color: #1a6696;
9-
margin-left: 2px;
8+
font-size: 8pt;
9+
color: #1a6696;
10+
margin-left: 2px;
1011
}
12+
1113
div#sh__loading, div#sh__load_history {
12-
float: right;
13-
margin: 0px;
14+
float: right;
15+
margin: 0;
1416
}
17+
1518
div#sh__results_div ul {
16-
margin-left: 0px;
17-
padding-left: 0px;
18-
list-style: none;
19+
margin-left: 0;
20+
padding-left: 0;
21+
list-style: none;
1922
}
23+
2024
div#sh__pagination {
21-
float: right;
22-
margin-top: -30px;
25+
float: right;
26+
margin-top: -30px;
2327
}
28+
2429
div#sh__results_div ul li {
25-
border-bottom: 1px solid #cccccc;
26-
padding: 2px;
30+
border-bottom: 1px solid #cccccc;
31+
padding: 2px;
2732
}
33+
2834
div#sh__results_div ul li:hover {
29-
background-color: #efefef;
35+
background-color: #efefef;
3036
}
37+
3138
div#sh__results_div ul div.sh__date {
32-
float: left;
33-
width: 160px;
39+
float: left;
40+
width: 160px;
3441
}
42+
3543
div#sh__results_div ul div.sh__change_type {
36-
float: left;
37-
width: 100px;
44+
float: left;
45+
width: 100px;
3846
}
47+
3948
div#sh__results_div div.sh__changed_by {
40-
float: left;
41-
width: 160px;
49+
float: left;
50+
width: 160px;
4251
}
52+
4353
div#sh__results_div div.sh__view_change {
44-
float: right;
45-
width: 60px;
54+
float: right;
55+
width: 60px;
4656
}
57+
4758
div.sh__changes {
48-
float: left;
49-
width: 210px;
59+
float: left;
60+
width: 210px;
5061
}
62+
5163
div.sh__changes select {
52-
width: 100%;
64+
width: 100%;
5365
}
66+
5467
.change_type_new {
55-
color: #005900;
68+
color: #005900;
5669
}
70+
5771
.change_type_update {
58-
color: #0066cc;
72+
color: #0066cc;
5973
}
74+
6075
.change_type_restore {
61-
color: orange;
76+
color: orange;
6277
}
78+
6379
.change_type_original {
64-
color: #269200;
80+
color: #269200;
6581
}
82+
6683
.change_type_undelete {
67-
color: #4babe7;
84+
color: #4babe7;
6885
}
86+
6987
.change_type_delete {
70-
color: red;
88+
color: red;
7189
}
90+
7291
.change_type_submission {
73-
color: purple;
92+
color: purple;
7493
}
94+
7595
.no_changed_fields {
76-
color: #999999;
96+
color: #999999;
7797
}
98+
7899
.sh__field_name {
79-
float: left;
80-
width: 190px;
100+
float: left;
101+
width: 190px;
81102
}
103+
82104
.sh__previous_value {
83-
float: left;
84-
width: 255px;
85-
max-height: 80px;
86-
overflow-y: hidden;
87-
text-overflow: ellipsis;
105+
float: left;
106+
width: 255px;
107+
max-height: 80px;
108+
overflow-y: hidden;
109+
text-overflow: ellipsis;
88110
}
111+
89112
.sh__new_value {
90-
float: left;
91-
width: 255px;
92-
max-height: 80px;
93-
overflow-y: hidden;
94-
text-overflow: ellipsis;
113+
float: left;
114+
width: 255px;
115+
max-height: 80px;
116+
overflow-y: hidden;
117+
text-overflow: ellipsis;
95118
}
119+
96120
div#sh__results_div li.changed_field {
97-
background-color: #ffffaa;
121+
background-color: #ffffaa;
98122
}
123+
99124
.change_type_info {
100-
-moz-border-radius: 6px;
101-
border-radius: 6px;
102-
background-color: #DAE9F2;
103-
padding: 2px 6px;
104-
width: 100%;
125+
-moz-border-radius: 6px;
126+
border-radius: 6px;
127+
background-color: #DAE9F2;
128+
padding: 2px 6px;
129+
width: 100%;
105130
}

index.php

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
$success = true;
1515
$message = "";
1616
if (isset($_POST["update_activity_tracking"])) {
17-
list($success, $message) = Code::updateActivityTracking($_POST, $L);
17+
list($success, $message) = Code::updateActivityTracking($_POST, $L);
1818
} else if (isset($_GET["clear_logs"])) {
19-
list($success, $message) = Code::clearFormLogs($_GET["clear_logs"], $L);
19+
list($success, $message) = Code::clearFormLogs($_GET["clear_logs"], $L);
2020
} else if (isset($_POST["clear_all_logs"])) {
21-
list($success, $message) = Code::clearAllFormLogs($L);
21+
list($success, $message) = Code::clearAllFormLogs($L);
2222
}
2323

2424
$module_settings = $module->getSettings();
@@ -30,30 +30,30 @@
3030
$table_prefix = Core::getDbTablePrefix();
3131

3232
foreach ($all_forms as $form_info) {
33-
if ($form_info["is_complete"] == "no") {
34-
continue;
35-
}
33+
if ($form_info["is_complete"] == "no") {
34+
continue;
35+
}
3636

37-
$form_id = $form_info["form_id"];
38-
$form_ids[] = $form_id;
37+
$form_id = $form_info["form_id"];
38+
$form_ids[] = $form_id;
3939

40-
// once the history tables have been created, there should ALWAYS be a key here
41-
if (array_key_exists("{$table_prefix}form_{$form_id}_history", $history_table_info)) {
42-
$form_info["history_table_size"] = round($history_table_info["{$table_prefix}form_{$form_id}_history"]["size"]);
43-
$form_info["history_table_rows"] = $history_table_info["{$table_prefix}form_{$form_id}_history"]["rows"];
44-
$form_info["num_deleted_submissions"] = Code::getNumDeletedSubmissions($form_id);
45-
}
40+
// once the history tables have been created, there should ALWAYS be a key here
41+
if (array_key_exists("{$table_prefix}form_{$form_id}_history", $history_table_info)) {
42+
$form_info["history_table_size"] = round($history_table_info["{$table_prefix}form_{$form_id}_history"]["size"]);
43+
$form_info["history_table_rows"] = $history_table_info["{$table_prefix}form_{$form_id}_history"]["rows"];
44+
$form_info["num_deleted_submissions"] = Code::getNumDeletedSubmissions($form_id);
45+
}
4646

47-
$forms[] = $form_info;
47+
$forms[] = $form_info;
4848
}
4949
$form_ids_str = implode(",", $form_ids);
5050

5151
$page_vars = array(
52-
"g_success" => $success,
53-
"g_message" => $message,
54-
"forms" => $forms,
55-
"module_settings" => $module_settings,
56-
"configured_form_ids" => explode(",", $module_settings["tracked_form_ids"])
52+
"g_success" => $success,
53+
"g_message" => $message,
54+
"forms" => $forms,
55+
"module_settings" => $module_settings,
56+
"configured_form_ids" => explode(",", $module_settings["tracked_form_ids"])
5757
);
5858

5959
$page_vars["head_js"] = <<< END

module.php

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)