-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathadd.php
49 lines (39 loc) · 1.21 KB
/
add.php
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
require("../../global/library.php");
use FormTools\Core;
use FormTools\Modules;
$module = Modules::initModulePage("admin");
$L = $module->getLangStrings();
$root_url = Core::getRootUrl();
// if the user has the tinyMCE field module installed, offer the option of editing the pages with it
$tinymce_available = Modules::checkModuleAvailable("field_type_tinymce");
$page_vars = array(
"head_title" => $L["phrase_add_page"],
"tinymce_available" => ($tinymce_available ? "yes" : "no"),
);
$editor = "codemirror";
if ($tinymce_available) {
$page_vars["js_files"] = array("$root_url/modules/field_type_tinymce/tinymce/tinymce.min.js");
$editor = "tinymce";
}
$page_vars["head_css"] =<<< END
body .mce-ico {
font-size: 13px;
}
body .mce-btn button {
padding: 3px 5px 3px 7px;
}
END;
$page_vars["head_js"] =<<< EOF
if (typeof pages_ns == undefined) {
var pages_ns = {};
}
pages_ns.current_editor = "$editor";
var rules = [];
rsv.onCompleteHandler = function() {
$("#use_wysiwyg_hidden").val($("#uwe").attr("checked") ? "yes" : "no");
ft.select_all("selected_client_ids[]");
return true;
}
EOF;
$module->displayPage("templates/add.tpl", $page_vars);