JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: autofocus
[wfpl.git] / metaform / template.html
index 58629d8..c818b3c 100644 (file)
@@ -2,33 +2,17 @@
 
 <html>
 <head>
-       <title><!--~~title show {~~-->~plural cap~<!--~~}~~--></title>
+       <title><!--~~main_title show {~~-->~plural cap~<!--~~}~~--></title>
        <link rel="stylesheet" href="style.css" type="text/css"><!--~html_editor_headers {~--><!--~~extra_headers {~~-->
-       <script type="text/javascript" src="code/tiny_mce/tiny_mce.js"></script>
+       <script type="text/javascript" src="code/ckeditor/ckeditor.js"></script>
        <script language="javascript" type="text/javascript">
-//<![CDATA[
-               tinyMCE.init({
-                       mode : 'textareas',
-                       theme : 'advanced',
-                       plugins : 'contextmenu,table,filemanager',
-                       file_browser_callback : "fileBrowserCallBack",
-                       editor_selector : 'html_editor',
-                       gecko_spellcheck : true,
-                       object_resizing : false,
-                       theme_advanced_toolbar_location : "top",
-                       theme_advanced_toolbar_align : "left",
-                       theme_advanced_path_location : "bottom",
-                       inline_styles : true,
-                       theme_advanced_blockformats : "p,h1,h2,h3,pre",
-                       theme_advanced_buttons3 : "hr,removeformat,visualaid,|,tablecontrols,|,charmap",
-                       doctype: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
-                       content_css : 'style.css',
-                       button_tile_map : true,
-                       //document_base_url : 'http://example.com/',
-                       width: '448',
-                       height: '550',
-               });
-//]]>
+               function make_wysiwyg(name) {
+                       CKEDITOR.replace(name, {
+                               'uiColor': '#ccccff',
+                               'removePlugins': 'forms,templates,smiley,pagebreak,save,newpage,preview,print',
+                               'height': '300px'
+                       });
+               }
        </script><!--~~}~~--><!--~}~-->
 </head>
 
        <!--~~}~~--><!--~opt_display {~-->
 
        <!--~~display {~~-->
-               <h2>~singular cap~ details</h2>
+               <h2>~singular cap~ details</h2><!--~opt_listing {~-->
+
+               <p><a href="~file_name~?~file_name~_new=1">Add another ~singular attr~</a></p>
+
+               <p><a href="~file_name~">Back to ~plural attr~</a></p><!--~}~-->
 
                <p><a href="~file_name~?~file_name~_edit_id=~~id attr~~">Edit</a></p>
 
                <table border="0" cellpadding="3" cellspacing="0" summary="">
-<!--~display_row {~--><!--~display_image {~-->
-                       <tr><td class="caption">~caption html~:</td><td><img src="~~~name~ image_src~~" width="~~~name~ image_width~~" height="~~~name~ image_height~~" alt=""></td></tr>
-<!--~}~--><!--~display_yesno {~-->
+<!--~display_fields {~--><!--~image {~-->
+                       <tr><td class="caption">~caption html~:</td><td><!--~~~name~ nonempty {~~--><img src="~~~name~ image_src~~" width="~~~name~ image_width~~" height="~~~name~ image_height~~" alt=""><!--~~}~~--></td></tr>
+<!--~}~--><!--~checkbox {~-->
                        <tr><td class="caption">~caption html~:</td><td>~~~name~ yesno~~</td></tr>
-<!--~}~--><!--~display_date {~-->
+<!--~}~--><!--~date {~-->
                        <tr><td class="caption">~caption html~:</td><td>~~~name~ mmddyyyy~~</td></tr>
-<!--~}~--><!--~display_short {~-->
+<!--~}~--><!--~short {~-->
                        <tr><td class="caption">~caption html~:</td><td>~~~name~ html~~</td></tr>
-<!--~}~--><!--~display_html {~-->
+<!--~}~--><!--~html {~-->
                        <tr><td class="caption">~caption html~:</span></td><td></td></tr>
                        <tr><td colspan="2"><div style="padding: 15px; border: 1px solid black">~~~name~~~</div></td></tr>
-<!--~}~--><!--~display_multiline {~-->
+<!--~}~--><!--~textarea {~-->
                        <tr><td class="caption">~caption html~:</td><td>~~~name~ htmlbrtab~~</td></tr>
 <!--~}~--><!--~}~-->
-               </table>
+               </table><!--~opt_listing {~-->
+
+               <p><a href="~file_name~">Back to ~plural attr~</a></p><!--~}~-->
 
                <p><a href="~file_name~?~file_name~_edit_id=~~id attr~~">Edit</a></p>
        <!--~~}~~--><!--~}~-->
 
        <!--~~form {~~--><!--~form {~-->
-               <h2><!--~opt_db {~--><!--~~new_msg {~~-->Add a new ~singular~<!--~~}~~--><!--~~edit_msg {~~-->Edit ~singular~ "~~~always_field~ html~~"<!--~~}~~--><!--~}~--><!--~opt_db_else {~-->Submit a ~singular~<!--~}~--></h2>
+               <h2><!--~opt_db {~--><!--~~new_msg {~~-->Add a new ~singular~<!--~~}~~--><!--~~edit_msg {~~-->Edit ~singular~ "~~~always_field~ html~~"<!--~~}~~--><!--~}~--><!--~opt_db unset {~-->Submit a ~singular~<!--~}~--></h2>
 
-               <form action="~file_name~" method="post~enctype_attr~"><!--~opt_db {~--><!--~~editing {~~--><div style="display: none"><input type="hidden" name="~file_name~_edit_id" value="~~~file_name~_edit_id attr~~"></div><!--~~}~~--><!--~}~--><!--~uploads {~--><input type="hidden" name="MAX_FILE_SIZE" value="~~upload_max_filesize~~"><!--~}~-->
-<!--~row {~--><!--~image {~-->
+               <form action="~file_name~" method="post~enctype_attr~"><!--~opt_db {~--><!--~~editing {~~--><div style="display: none"><input type="hidden" name="~file_name~_edit_id" value="~~~file_name~_edit_id attr~~"></div><!--~~}~~--><!--~}~--><!--~uploads {~--><input type="hidden" name="MAX_FILE_SIZE" value="~~upload_max_filesize~~"><!--~}~--><!--~hidden_fields {~--><!--~ first {~-->
+                       <div style="display: none"><!--~}~--><input type="hidden" name="~name~" value="~~~name~ attr~~"><!--~ last {~--></div><!--~}~--><!--~}~-->
+<!--~visible_fields {~--><!--~fieldset {~-->
+                       <fieldset><legend>~caption html~</legend><!--~}~--><!--~end_fieldset {~-->
+                       </fieldset><!--~}~--><!--~image {~-->
                        <div class="caption">~caption html~</div>
                        <div class="field"><input type="file" name="~name~"><input type="hidden" name="old_~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~file {~-->
                        <div class="caption">~caption html~</div>
                        <div class="caption">~caption html~</div>
                        <div class="field"><textarea rows="9" cols="22" name="~name~">~~~name~ html~~</textarea></div><!--~}~--><!--~html {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><textarea class="html_editor" rows="20" cols="50" name="~name~">~~~name~ html~~</textarea></div><!--~}~--><!--~pulldown {~-->
+                               <div class="field_notes">
+                                       <ul>
+                                               <li>If you don't see an editor below (with buttons in it) then please try this page in <a href="http://getfirefox.com">Mozilla FireFox</a> or <a href="http://www.google.com/chrome/">Google Chrome</a>.</li>
+                                               <li>If you're pasting from Microsoft Word, please use the "paste from word" button (4 right of the scissors) instead of the normal paste.</li>
+                                       </ul>
+                               </div>
+                               <div class="field"><textarea class="html_editor" rows="20" cols="50" id="content" name="~name~">~~~name~ html~~</textarea><script type="text/javascript">make_wysiwyg('~name~');</script></div><!--~}~--><!--~pulldown {~-->
                        <div class="caption">~caption html~</div>
                        <div class="field"><select name="~name~"><option value="">Choose One:</option><!--~~~name~ options~~--></select></div><!--~}~--><!--~states {~-->
                        <div class="caption">~caption html~</div>
                        <div class="field"><select name="~name~"><option value="">Choose One:</option><!--~~~name~ states~~--></select></div><!--~}~--><!--~radio {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><input type="radio" name="~name~~~~name~ checked~~"></div><!--~}~--><!--~checkbox {~-->
+                       <div class="field">
+                               <input type="radio" name="~name~" value="~~~name~ radio_0~~">~~~name~ radio_caption_0 html~~<br>
+                               <input type="radio" name="~name~" value="~~~name~ radio_1~~">~~~name~ radio_caption_1 html~~<br>
+                               <input type="radio" name="~name~" value="~~~name~ radio_2~~">~~~name~ radio_caption_2 html~~
+                       </div><!--~}~--><!--~checkbox {~-->
                        <div class="caption"><input type="checkbox" name="~name~~~~name~ checked~~"> ~caption html~</div>
                        <div class="field"></div><!--~}~--><!--~submit {~-->
                        <div class="caption">&nbsp;</div>
                        <div class="field"><input type="submit" name="~name~" value="~caption attr~"></div><!--~}~-->
 <!--~}~-->
-               </form>
+               </form><!--~opt_listing {~-->
+
+               <div class="caption">&nbsp;</div>
+               <div class="field"><!--~~jam_edit_id {~~--><a href="~file_name attr~?~file_name attr~_id=~~~file_name attr~_edit_id~~"><!--~~}~~--><!--~~jam_edit_id unset {~~--><a href="~file_name attr~"><!--~~}~~-->Cancel</a></div><!--~}~-->
        <!--~}~--><!--~~}~~--><!--~opt_listing {~-->
 
        <!--~~listings {~~-->
                        <p><a href="~file_name~?~file_name~_new=1">[Add a new ~singular~]</a></p>
 
                        <table cellspacing="0" cellpadding="4" border="1" summary="">
-                               <!--~listing_head_col {~--><th>~caption~</th><!--~}~--><th>&nbsp;</th><!--~~rows {~~-->
-                               <tr><!--~listing_row_col {~-->
-                                       <td class="listing"><a href="~file_name~?~file_name~_<!--~opt_display_else {~-->edit_<!--~}~-->id=~~id~~"><!--~listing_value_enc {~-->~~~name~ ~listing_enc~~~<!--~}~--><!--~listing_value_thumb {~--><img src="~~~name~ thumb_src~~" width="~~~name~ thumb_width~~" height="~~~name~ thumb_height~~" alt=""><!--~}~--></a></td><!--~}~-->
+                               <!--~listing_headers {~--><th>~caption~</th><!--~}~--><th>&nbsp;</th><!--~~rows {~~-->
+                               <tr><!--~listing_fields {~-->
+                                       <td class="listing"><a href="~file_name~?~file_name~_<!--~opt_display unset {~-->edit_<!--~}~-->id=~~id~~"><!--~enc {~-->~~~name~ ~enc~~~<!--~}~--><!--~thumb {~--><!--~~~name~ nonempty {~~--><img src="~~~name~ thumb_src~~" width="~~~name~ thumb_width~~" height="~~~name~ thumb_height~~" alt=""><!--~~}~~--><!--~}~--></a></td><!--~}~-->
                                        <td><a href="~file_name~?~file_name~_delete_id=~~id~~" onclick="return confirm('Permanently delete?')">[delete this ~singular~]</a></td>
                                </tr><!--~~}~~-->