JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: in generated php file: template sub-section html-editor so it propogates...
authorJason Woofenden <jason283@herkamire.com>
Fri, 29 May 2009 09:09:59 +0000 (05:09 -0400)
committerJason Woofenden <jason283@herkamire.com>
Fri, 29 May 2009 09:09:59 +0000 (05:09 -0400)
metaform.php
metaform/template.html
metaform/template.php

index 04e786a..ebd1f99 100644 (file)
@@ -351,6 +351,7 @@ function show_in_listing($type, $input, $format, $sql) {
 }
 
 function make_php() {
+       $has_html_editors = false;
        $tem = new tem();
        $tem->load('code/wfpl/metaform/template.php');
        $tem->set('file_name', $GLOBALS['file_name']);
@@ -389,7 +390,9 @@ function make_php() {
                                        $image_included_yet = true;
                                }
                        } else {
-                               if($input == 'pulldown') {
+                               if($input == 'html') {
+                                       $has_html_editors = true;
+                               } elseif($input == 'pulldown') {
                                        $tem->show('pulldowns');
                                        $tem->show('pulldown_format_extra');
                                }
@@ -406,6 +409,10 @@ function make_php() {
                }
        }
 
+       if($has_html_editors) {
+               $tem->show('show_extra_headers');
+       }
+
        $tem->set('always_field', $always_field);
        $tem->set('db_fields', $db_fields);
        $tem->set('php_fields', $php_fields);
index 0c5c774..473db8b 100644 (file)
@@ -3,7 +3,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
   <title>~plural.cap~</title>
-  <link rel="stylesheet" href="style.css" type="text/css" /><!--~html_editor_headers start~-->
+  <link rel="stylesheet" href="style.css" type="text/css" /><!--~html_editor_headers start~--><!--~~extra_headers start~~-->
   <script type="text/javascript" src="code/tiny_mce/tiny_mce.js"></script>
   <script language="javascript" type="text/javascript">
 //<![CDATA[
@@ -29,7 +29,7 @@
       height: '550',
     });
 //]]>
-  </script><!--~end~-->
+  </script><!--~~end~~--><!--~end~-->
 </head>
 
 <body>
index 1822ff3..9742f4e 100644 (file)
@@ -226,7 +226,8 @@ function _~file_name~_main() {<!--~end~--><!--~opt_http_pass_2 start~-->
                tem_show('edit_msg');
        }
 
-       tem_show('form');
+       tem_show('form');<!--~show_extra_headers start~-->
+       tem_show('extra_headers');<!--~end~-->
 }
 
 ?>