Location: PHPKode > projects > Community Learning Network > cln/modules/Text/TextEditForm.html
<?php
/*
 * Text Edit Form
 *
 * Copyright (c) 2003-4 St. Christopher House
 *
 * Developed by The Working Group Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  
 *
 * @version $Id: TextEditForm.html,v 1.33 2004/10/24 22:15:01 darcy Exp $
 *
 */
?>

<!-- Configure the path to the editor.  We make it relative now, so that the
    example ZIP file will work anywhere, but please NOTE THAT it's better to
    have it an absolute path, such as '/htmlarea/'. -->
<script type="text/javascript">
_editor_url = "<?php echo CLN_CLEAN_URL_BASE; ?>modules/Text/htmlarea/";
_editor_lang = "en";
</script>
<script type="text/javascript" src="<?php echo CLN_CLEAN_URL_BASE; ?>modules/Text/htmlarea/htmlarea.js"></script>
<script type="text/javascript" src="<?php echo CLN_CLEAN_URL_BASE; ?>modules/Text/lib/htmlArea.js"></script>

<?php

// set title
// should support multiple languages
$GLOBALS['CLN_PAGE_TITLE'] = 'Edit Text';

$cleanURL = cleanURL($GLOBALS['path']);;
$params = 'editKoId=' . $this->_super->koId . '&amp;editProcess=Content';

// This passes TRUE to the appendToURL, which it doesn't usually. 
// The reason is that for a normal form submit, browsers seem to translate 
// &amp; into &, but for a javascript submit, apparently
// that doesn't happen
$fullURL = appendToURL($cleanURL, $params, TRUE); 
?>

<?php echo ADMIN_EDIT_TEXT_DESC; ?>

<form name="blockEdit" action="<?php echo $fullURL; ?>" method="post">

<?php
$sessionObject = 'KO';
include("interfaces/simpleMetadata.html");
?>

<input type="hidden" id="textSubmitted" name="textSubmitted" value="0" />

<div class="clnFormLine">
	<span class="clnFormLabel"><label for="textSource">Text:</label></span>
	<span class="clnFormElement">
		<div style="margin-left:140px"><textarea id="textSource" name="textSource" rows="20" cols="80"><?php print $_SESSION['KO']->currentPart['object']->text; ?></textarea></div>
	</span>
</div>


<div class="clnFormLine">
	<span class="clnFormLabel">&nbsp;</span>
	<span class="clnFormElement">
		<input class="clnFormInput" type="submit" name="ok" value="Submit" />
		<input class="clnFormInput" type="submit" name="ReturnToPanel" value="Cancel" />
	</span>
</div>

<script type="text/javascript">
// load htmlarea editor
HTMLArea.loadPlugin("DynamicCSS"); 
initEditor();
</script>

</form>
Return current item: Community Learning Network