summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/html.php41
1 files changed, 31 insertions, 10 deletions
diff --git a/inc/html.php b/inc/html.php
index 48d4370dc..dda797f9e 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -1110,11 +1110,9 @@ function html_updateprofile(){
}
/**
- * This displays the edit form (lots of logic included)
+ * Preprocess edit form data
*
- * @fixme this is a huge lump of code and should be modularized
* @triggers HTML_PAGE_FROMTEMPLATE
- * @triggers HTML_EDITFORM_INJECTION
* @author Andreas Gohr <andi@splitbrain.org>
*/
function html_edit($text=null,$include='edit'){ //FIXME: include needed?
@@ -1128,7 +1126,6 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
global $SUM;
global $lang;
global $conf;
- global $license;
//set summary default
if(!$SUM){
@@ -1182,20 +1179,44 @@ function html_edit($text=null,$include='edit'){ //FIXME: include needed?
print p_locale_xhtml('read');
}
if(!$DATE) $DATE = $INFO['lastmod'];
- ?>
- <div style="width:99%;">
- <div class="toolbar">
- <div id="draft__status"><?php if(!empty($INFO['draft'])) echo $lang['draftdate'].' '.dformat();?></div>
- <div id="tool__bar"><?php if($wr){?><a href="<?php echo DOKU_BASE?>lib/exe/mediamanager.php?ns=<?php echo $INFO['namespace']?>"
- target="_blank"><?php echo $lang['mediaselect'] ?></a><?php }?></div>
+ $data = compact('wr', 'text', 'mod', 'check');
+ trigger_event('HTML_EDIT_FORMSELECTION', $data, 'html_edit_form', true);
+}
+/**
+ * Display the default edit form
+ *
+ * Is the default action for HTML_EDIT_FORMSELECTION.
+ *
+ * @triggers HTML_EDITFORM_OUTPUT
+ */
+function html_edit_form($param) {
+ extract($param);
+ global $conf;
+ global $license;
+ global $lang;
+ global $REV;
+ global $DATE;
+ global $PRE;
+ global $SUF;
+ global $INFO;
+ global $SUM;
+ global $ID;
+ ?>
<?php if($wr){?>
<script type="text/javascript" charset="utf-8"><!--//--><![CDATA[//><!--
<?php /* sets changed to true when previewed */?>
textChanged = <?php ($mod) ? print 'true' : print 'false' ?>;
//--><!]]></script>
<?php } ?>
+ <div style="width:99%;">
+
+ <div class="toolbar">
+ <div id="draft__status"><?php if(!empty($INFO['draft'])) echo $lang['draftdate'].' '.dformat();?></div>
+ <div id="tool__bar"><?php if($wr){?><a href="<?php echo DOKU_BASE?>lib/exe/mediamanager.php?ns=<?php echo $INFO['namespace']?>"
+ target="_blank"><?php echo $lang['mediaselect'] ?></a><?php }?></div>
+
</div>
<?php
$form = new Doku_Form(array('id' => 'dw__editform'));