Skip to content

Commit fb74475

Browse files
authored
Added parameters
1 parent a0f871c commit fb74475

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tx_aspnet_protected_subtextparts/Views/Home/Index.cshtml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<script>
1313
// this function is sending a POST request to the
1414
// controller to insert a SubTextPart
15-
function InsertSubTextPart() {
15+
function InsertSubTextPart(name, protect) {
1616
1717
var sel = TXTextControl.selection
1818
@@ -33,9 +33,9 @@
3333
url: serviceURL,
3434
contentType: 'application/json',
3535
data: JSON.stringify({
36-
Name: 'Test1',
36+
Name: name,
3737
BinaryDocument: e.data,
38-
Protected: true
38+
Protected: protect
3939
}),
4040
success: successFunc,
4141
error: errorFunc
@@ -69,4 +69,4 @@
6969
TXTextControl.editMode = TXTextControl.EditMode.Edit;
7070
$('#tbSubTextPartName').val('');
7171
});
72-
</script>
72+
</script>

0 commit comments

Comments
 (0)