<commit_before>{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-editpage.tpl,v 1.130.2.13 2008-01-17 15:18:44 ricks99 Exp $ *}
{popup_init src="lib/overlib.js"}
{if $prefs.feature_ajax == 'y'}
  <script language="JavaScript" src="lib/wiki/wiki-ajax.js"></script>
{/if}
<h1>{tr}Edit{/tr}: {if $beingStaged eq 'y' and $prefs.wikiapproval_hideprefix == 'y'}{$approvedPageName|escape}{else}{$page|escape}{/if}{if $pageAlias ne ''}&nbsp;({$pageAlias|escape}){/if}</h1>
{if $beingStaged eq 'y'}
<div class="tocnav">
{tr}You are editing the staging copy of the approved version of this page. Changes will be merged in after approval.{/tr}
{if $outOfSync eq 'y'} {tr}The current staging copy may contain changes that have yet to be approved.{/tr}{/if}
{if $lastSyncVersion}
	<a class="link" href="tiki-pagehistory.php?page={$page|escape:'url'}&amp;diff2={$lastSyncVersion}" target="_blank">{tr}View changes since last approval.{/tr}</a>
{/if}
</div>
{/if}
{if $needsStaging eq 'y'}
<div class="tocnav">
{tr}You are editing the approved copy of this page.{/tr}
{if $outOfSync eq 'y'} {tr}There are currently changes in the staging copy that have yet to be approved.{/tr}{/if}
 {tr}Are you sure you do not want to edit{/tr} <a class="link" href="tiki-editpage.php?page={$stagingPageName|escape:'url'}">{tr}the staging copy{/tr}</a> {tr}instead?{/tr}
</div>
{/if}
{if isset($data.draft)}
  {tr}Draft written on{/tr} {$data.draft.lastModif|tiki_long_time}<br/>
  {if $data.draft.lastModif < $data.lastModif}
    <b>{tr}Warning: new versions of this page have been made after this draft{/tr}</b>
  {/if}
{/if}
{if $page|lower eq 'sandbox'}
<div class="wikitext">
{tr}The SandBox is a page where you can practice your editing skills, use the preview feature to preview the appearance of the page, no versions are stored for this page.{/tr}
</div>
{/if}
{if $category_needed eq 'y'}
<div class="simplebox highlight">{tr}A category is mandatory{/tr}</div>
{/if}
{if $contribution_needed eq 'y'}
<div class="simplebox highlight">{tr}A contribution is mandatory{/tr}</div>
{/if}
{if $likepages}
<div>
{tr}Perhaps you are looking for:{/tr}
{if $likepages|@count < 0}
<ul>
{section name=back loop=$likepages}
<li><a  href="tiki-index.php?page={$likepages[back]|escape:"url"}" class="wiki">{$likepages[back]}</a></li>
{/section}
</ul>
{else}
<table class="normal"><tr>
{cycle name=table values=',,,,</tr><tr>' print=false advance=false}
{section name=back loop=$likepages}
<td><a  href="tiki-index.php?page={$likepages[back]|escape:"url"}" class="wiki">{$likepages[back]}</a></td>{cycle name=table}
{/section}
</tr></table>
{/if}
</div>
<br />
{/if}
{if $preview}
{include file="tiki-preview.tpl"}
{/if}
<form  enctype="multipart/form-data" method="post" action="tiki-editpage.php" id='editpageform' name='editpageform'>
{if $preview && $staging_preview neq 'y'}
<input type="submit" class="wikiaction" name="preview" value="{tr}Preview{/tr}" onclick="needToConfirm = false;" />
{if $page|lower neq 'sandbox'}
{if $tiki_p_minor eq 'y'}
  <input type="submit" class="wikiaction" name="minor" value="{tr}Minor{/tr}" onclick="needToConfirm=false;" />
{/if}
<input type="submit" class="wikiaction" name="save" value="{tr}Save{/tr}" onclick="needToConfirm = false;" /> &nbsp;&nbsp; <input type="submit" class="wikiaction" name="cancel_edit" value="{tr}Cancel Edit{/tr}" />
{/if}<commit_msg>lost edit protetion. edit session countdown timer in browser status bar (if allowed by user browser) and alert appears with 1 minute remaining<commit_after>{* $Header: /cvsroot/tikiwiki/tiki/templates/tiki-editpage.tpl,v 1.130.2.14 2008-01-17 16:23:46 ricks99 Exp $ *}
{popup_init src="lib/overlib.js"}
{if $prefs.feature_ajax == 'y'}
  <script language="JavaScript" src="lib/wiki/wiki-ajax.js"></script>
{/if}

{* Display edit time out *}



<script language='Javascript' type='text/javascript'>
{literal}

<!-- Begin

function Minutes(data) {
for (var i = 0; i < data.length; i++)
if (data.substring(i, i + 1) == ":")
break;
return (data.substring(0, i));
}

function Seconds(data) {
for (var i = 0; i < data.length; i++)
if (data.substring(i, i + 1) == ":")
break;
return (data.substring(i + 1, data.length));
}
function Display(min, sec) {
var disp;
if (min <= 9) disp = " 0";
else disp = " ";
disp += min + ":";
if (sec <= 9) disp += "0" + sec;
else disp += sec; 
return (disp);
}
function Down() { 
sec--;      
if (sec == -1) { sec = 59; min--; }
document.editpageform.clock.value = Display(min, sec);
window.status = "{/literal}{tr}Your edit session will expire in{/tr}{literal}: " + Display(min, sec);
if (min == 1 && sec == 0) {
alert("{/literal}{tr}Your edit session will expire in 1 minute. You must PREVIEW or SAVE your work now, to avoid losing your edits.{/tr}{literal}");
// window.location.href = timedouturl;
}
else down = setTimeout("Down()", 1000);
}
function timeIt() {
min = 1 * Minutes(document.editpageform.clock.value);
sec = 0 + Seconds(document.editpageform.clock.value);
Down();
}
window.onload = timeIt;
//  End -->
{/literal}
</script>


<h1>{tr}Edit{/tr}: {if $beingStaged eq 'y' and $prefs.wikiapproval_hideprefix == 'y'}{$approvedPageName|escape}{else}{$page|escape}{/if}{if $pageAlias ne ''}&nbsp;({$pageAlias|escape}){/if}</h1>
{if $beingStaged eq 'y'}
<div class="tocnav">
{tr}You are editing the staging copy of the approved version of this page. Changes will be merged in after approval.{/tr}
{if $outOfSync eq 'y'} {tr}The current staging copy may contain changes that have yet to be approved.{/tr}{/if}
{if $lastSyncVersion}
	<a class="link" href="tiki-pagehistory.php?page={$page|escape:'url'}&amp;diff2={$lastSyncVersion}" target="_blank">{tr}View changes since last approval.{/tr}</a>
{/if}
</div>
{/if}
{if $needsStaging eq 'y'}
<div class="tocnav">
{tr}You are editing the approved copy of this page.{/tr}
{if $outOfSync eq 'y'} {tr}There are currently changes in the staging copy that have yet to be approved.{/tr}{/if}
 {tr}Are you sure you do not want to edit{/tr} <a class="link" href="tiki-editpage.php?page={$stagingPageName|escape:'url'}">{tr}the staging copy{/tr}</a> {tr}instead?{/tr}
</div>
{/if}
{if isset($data.draft)}
  {tr}Draft written on{/tr} {$data.draft.lastModif|tiki_long_time}<br/>
  {if $data.draft.lastModif < $data.lastModif}
    <b>{tr}Warning: new versions of this page have been made after this draft{/tr}</b>
  {/if}
{/if}
{if $page|lower eq 'sandbox'}
<div class="wikitext">
{tr}The SandBox is a page where you can practice your editing skills, use the preview feature to preview the appearance of the page, no versions are stored for this page.{/tr}
</div>
{/if}
{if $category_needed eq 'y'}
<div class="simplebox highlight">{tr}A category is mandatory{/tr}</div>
{/if}
{if $contribution_needed eq 'y'}
<div class="simplebox highlight">{tr}A contribution is mandatory{/tr}</div>
{/if}
{if $likepages}
<div>
{tr}Perhaps you are looking for:{/tr}
{if $likepages|@count < 0}
<ul>
{section name=back loop=$likepages}
<li><a  href="tiki-index.php?page={$likepages[back]|escape:"url"}" class="wiki">{$likepages[back]}</a></li>
{/section}
</ul>
{else}
<table class="normal"><tr>
{cycle name=table values=',,,,</tr><tr>' print=false advance=false}
{section name=back loop=$likepages}
<td><a  href="tiki-index.php?page={$likepages[back]|escape:"url"}" class="wiki">{$likepages[back]}</a></td>{cycle name=table}
{/section}
</tr></table>
{/if}
</div>
<br />
{/if}
{if $preview}
{include file="tiki-preview.tpl"}
{/if}
<form  enctype="multipart/form-data" method="post" action="tiki-editpage.php" id='editpageform' name='editpageform'>
<input type="hidden" name="clock" value="{$edittimeout}" />
{if $preview && $staging_preview neq 'y'}
<input type="submit" class="wikiaction" name="preview" value="{tr}Preview{/tr}" onclick="needToConfirm = false;" />
{if $page|lower neq 'sandbox'}
{if $tiki_p_minor eq 'y'}
  <input type="submit" class="wikiaction" name="minor" value="{tr}Minor{/tr}" onclick="needToConfirm=false;" />
{/if}
<input type="submit" class="wikiaction" name="save" value="{tr}Save{/tr}" onclick="needToConfirm = false;" /> &nbsp;&nbsp; <input type="submit" class="wikiaction" name="cancel_edit" value="{tr}Cancel Edit{/tr}" />
{/if}
{'fraction_non_alphanumeric': 0.2011986301369863, 'fraction_numerical': 0.009417808219178082, 'mean_word_length': 5.848408710217756, 'pattern_counts': {'":': 3, '<': 105, '<?xml version=': 0, '>': 97, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3800738', 'n_tokens_mistral': 3075, 'n_tokens_neox': 2975, 'n_words': 783}