1 <?php if (isset($PREVIEW_CONTENT)) { ?>
2 <p class="information">
3 <?php echo _("Preview only! Changes not saved. Please continue editing. (You'll find your edit area at the bottom of the page.)") ?>
5 <?php echo $PREVIEW_CONTENT ?>
8 <?php echo $PAGE_LOCKED_MESSAGE ?>
9 <?php echo $CONCURRENT_UPDATE_MESSAGE ?>
11 <?php if (! $IS_CURRENT) { ?>
12 <p class="warning_msg">
13 <?php echo _("Warning: You are editing an old revision. Saving this page will overwrite the current version.")?>
16 <?php if (forge_get_config('use_jquery_form_navigate')) { ?>
17 <script type="text/javascript">
19 function supports_local_storage() {
21 return 'localStorage' in window && window['localStorage'] !== null;
27 $(document).ready(function() {
28 $("#editpage").FormNavigate('<?php echo _('Warning: leaving the page will lose all your modifications!') ?>');
29 jQuery(this).find(":submit").unbind('click');
30 jQuery(this).on('click', "input[name='edit[save]']", function () {
31 global_formNavigate = true;
33 jQuery(this).on('click', "input[type='image'], input[name='edit[preview]'], input[name='edit[diff]']", function () {
34 if (supports_local_storage()) {
35 if (global_formNavigate == false) {
36 window.sessionStorage.setItem('wiki_modified', 1);
39 window.sessionStorage.setItem('wiki_modified', 0);
42 global_formNavigate = true;
44 $("#toolbar a").click(function() {
45 global_formNavigate = false;
47 <?php if (isset($PREVIEW_CONTENT)) { ?>
48 if (supports_local_storage()) {
49 if (window.sessionStorage.getItem('wiki_modified') == 1) {
50 global_formNavigate = false;
53 global_formNavigate = true;
61 <form method="post" id="editpage" name="editpage"
62 action="<?php echo $request->getPostURL() ?>"
63 accept-charset="UTF-8">
64 <?php if (!empty($_GET['start_debug'])) echo '<input type="hidden" name="start_debug" value="1" >'; ?>
65 <?php /* To clear beyond a larger logo, such as in the Hawaiian theme */ ?>
66 <br class="clear-floats" />
67 <table class="fullwidth">
68 <tr><td><?php echo $EDIT_TOOLBAR ?></td>
69 <td align="right"><div id="editarea-size">
70 <?php echo _("Size").':'?>
71 <label for="pref-editHeight"><b><?php echo _("H")?></b></label> <?php echo $HEIGHT_PREF?>
72 <label for="pref-editWidth"><b><?php echo _("W")?></b></label> <?php echo $WIDTH_PREF?>
73 <noscript><?php echo Button("submit:", _("Adjust"), 'wikiaction')?></noscript>
74 </div></td></tr></table>
75 <a id="editarea"></a><?php echo $EDIT_TEXTAREA?>
76 <div style="text-align: center;">
77 <label for="edit-summary"><?php echo _("Summary").':'?></label> <?php echo $SUMMARY_INPUT?>
79 <table class="fullwidth">
82 <?php echo $MINOR_EDIT_CB ?> <label for="edit-minor_edit"><?php echo _("This is a minor change.")?></label><br />
85 <?php echo $PREVIEW_B ?>
86 <?php if ($SAVE_B) { ?>
87 <?php echo $SEP?><?php echo $SAVE_B ?>
89 <?php echo $SEP?><?php echo $CHANGES_B ?>
91 <td><?php echo $AUTHOR_MESSAGE?></td>
95 <?php if ($user->isAdmin()) { ?>
96 <?php echo $LOCKED_CB ?> <label for="edit-locked" title="<?php echo _("Make the page read-only?")?>"><?php echo _("Locked")?></label>
97 <?php if (ENABLE_PAGE_PUBLIC) { ?>
98 <?php echo $PUBLIC_CB ?> <label for="edit-public" title="<?php echo _("Make the page public?")?>"><?php echo _("Public")?></label>
100 <?php if (ENABLE_EXTERNAL_PAGES) { ?>
101 <?php echo $EXTERNAL_CB ?> <label for="edit-external" title="<?php echo _("Make the page external?")?>"><?php echo _("External")?></label>
107 <?php echo $HIDDEN_INPUTS?>
110 <hr noshade="noshade" />
112 <div class="wiki-edithelp">
113 <?php if (WIKI_NAME == "help") { ?>
114 <?plugin IncludePage page=_("Help/TextFormattingRules") section=_("Synopsis") quiet=1?>
116 <?plugin IncludePage page=_("TextFormattingRules") section=_("Synopsis") quiet=1?>