Skip to content

Commit 094b98d

Browse files
committed
3.1
1 parent cb6248c commit 094b98d

File tree

9 files changed

+20
-10
lines changed

9 files changed

+20
-10
lines changed

assets/modules/docmanager/templates/changeauthors.tpl

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<p>[+lang.DM_adjust_authors_desc+]</p>
55

66
<form name="authors" method="post" action="">
7+
[+csrf+]
78
<label for="author_createdby">[+lang.DM_adjust_authors_createdby+]</label>
89
<select name="author_createdby" size="1">
910
<option value="0">[+lang.DM_adjust_authors_noselection+]</option>
@@ -15,4 +16,4 @@
1516
<option value="0">[+lang.DM_adjust_authors_noselection+]</option>
1617
[+changeauthors.options+]
1718
</select>
18-
</form>
19+
</form>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<p>[+lang.DM_doc_desc+]</p><br />
22
<form name="docgroups" action="">
3+
[+csrf+]
34
[+documentgroups.grid+]
45
<br /><br />
56
<input type="radio" name="tabAction" value="pushDocGroup" checked />&nbsp;[+lang.DM_doc_radio_add+]&nbsp;&nbsp;
67
<input type="radio" name="tabAction" value="pullDocGroup" />&nbsp;[+lang.DM_doc_radio_remove+]
78
<br /><br />
8-
</form>
9+
</form>

assets/modules/docmanager/templates/documents.tpl

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<div class="tab-header">[+lang.DM_range_title+]</div>
55
<div class="tab-body">
66
<form name="range" id="range" action="" method="post">
7+
[+csrf+]
78
<input type="hidden" id="newvalue" name="newvalue" value="" />
89
<input type="hidden" id="setoption" name="setoption" value="" />
910
<input type="hidden" id="pubdate" name="pubdate" value="" />
@@ -26,4 +27,4 @@
2627
</div>
2728
</div>
2829
</div>
29-
</div>
30+
</div>

assets/modules/docmanager/templates/main.tpl

100755100644
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<script type="text/javascript" src="media/script/mootools/mootools.js"></script>
99
<script type="text/javascript" src="../assets/modules/docmanager/js/docmanager.js"></script>
1010
<script type="text/javascript">
11+
const token = '[+token+]';
1112
function loadTemplateVars(tplId)
1213
{
1314
document.getElementById('tvloading').style.display = 'block';
@@ -36,7 +37,7 @@
3637
}
3738
}
3839
};
39-
xhr.send('theme=[+theme+]&tplID=' + tplId);
40+
xhr.send('_token=' + token + '&theme=[+theme+]&tplID=' + tplId);
4041
}
4142
4243
function save()
@@ -131,4 +132,4 @@
131132
[+view.documents+]
132133
[+view.tab+]
133134
</body>
134-
</html>
135+
</html>

assets/modules/docmanager/templates/misc.tpl

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<h4><i class="fa fa-calendar"></i> [+lang.DM_adjust_dates_header+]</h4>
33
<p>[+lang.DM_adjust_dates_desc+]</p>
44
<form id="dates" name="dates" method="post" action="">
5+
[+csrf+]
56
<table>
67
<tr>
78
<td><label for="date_pubdate" id="date_pubdate_label">[+lang.DM_date_pubdate+]</label></td>
@@ -64,4 +65,4 @@
6465
<br /><br />
6566
<input type="radio" name="choice" value="1" />&nbsp;<label for="choice" id="choice_label_1">[+lang.DM_other_publish_radio1+]</label>
6667
<input type="radio" name="choice" value="0" />&nbsp;<label for="choice" id="choice_label_2">[+lang.DM_other_publish_radio2+]</label>
67-
</form>
68+
</form>

assets/modules/docmanager/templates/templates.tpl

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<p>[+lang.DM_tpl_desc+]</p>
22
<br />
33
<form name="template" action="">
4+
[+csrf+]
45
[+templates.grid+]
56
<br />
67
<table class="grid">
@@ -13,4 +14,4 @@
1314
</tr>
1415
</tbody>
1516
</table>
16-
</form>
17+
</form>

assets/modules/docmanager/templates/templatevars.tpl

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<p>[+lang.DM_tv_desc+]</p>
22
<br />
33
<form name="templatevariables" action="" method="post">
4+
[+csrf+]
45
[+templatevars.grid+]
56
<div id="tvloading" class="warning" style="display:none">[+lang.DM_tv_loading+]</div>
67
<br />
@@ -10,4 +11,4 @@
1011
<input type="hidden" id="pids_tv" name="pids" value="" />
1112
<input type="hidden" id="template_id" name="template_id" value="" />
1213
<input type="hidden" id="tabaction_tv" name="tabAction" value="changeTV" />
13-
</form>
14+
</form>

assets/modules/docmanager/templates/update.tpl

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@
4040
<b>[+lang.DM_update_title+]</b>
4141
<p>[+update.message+]</p>
4242
<form id="backform" method="post" style="display: none;" action="">
43+
[+csrf+]
4344
<input type="submit" name="back" value="[+lang.DM_process_back+]" />
4445
</form>
4546
</div>
4647
</div>
4748

4849
</body>
49-
</html>
50+
</html>

install/assets/modules/docmanager.tpl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Quickly perform bulk updates to the Documents in your site including templates, publishing details, and permissions
66
*
77
* @category module
8-
* @version 3.0
8+
* @version 3.1
99
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL)
1010
* @internal @properties
1111
* @internal @guid docman435243542tf542t5t
@@ -26,6 +26,8 @@ $dmb = new DocManagerBackend($dm, $modx);
2626

2727
$dm->ph = $dm->getLang();
2828
$dm->ph['theme'] = $dm->getTheme();
29+
$dm->ph['token'] = csrf_token();
30+
$dm->ph['csrf'] = (string)csrf_field();
2931
$dm->ph['ajax.endpoint'] = MODX_SITE_URL.'assets/modules/docmanager/tv.ajax.php';
3032
$dm->ph['datepicker.offset'] = $modx->config['datepicker_offset'];
3133
$dm->ph['datetime.format'] = $modx->config['datetime_format'];

0 commit comments

Comments
 (0)