blob: de98efdf8a9fc23374734dc3acec187702925986 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<h3>Page does not exist</h3>
<br /><br /><br />
{{if $canadd}}
<form id="new-page-form" action="wiki/{{$channel_address}}/create/page" method="post" >
<input type="hidden" name="resource_id" value="{{$resource_id}}">
{{include file="field_input.tpl" field=$pageName}}
{{if $typelock}}
<input id="id_mimetype" type="hidden" name="mimetype" value="{{$lockedtype}}">
{{else}}
<div id="wiki_missing_page_options" style="display: none">
{{$mimetype}}
</div>
<div class="float-right fakelink" onClick="openClose('wiki_missing_page_options')">
{{$options}}
</div>
{{/if}}
<button id="create-missing-page-submit" class="btn btn-primary" type="submit" name="submit" >{{$submit}}</button>
</form>
<script>
$('#create-missing-page-submit').click(function (ev) {
$.post("wiki/{{$channel_address}}/create/page", {pageName: $('#id_missingPageName').val(), resource_id: window.wiki_resource_id, mimetype: $('#id_mimetype').val() },
function(data) {
if(data.success) {
window.location = data.url;
} else {
window.console.log('Error creating page. ('+data.message+')');
}
}, 'json');
ev.preventDefault();
});
</script>
{{/if}}
|