JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
metaform: merge ckeditor settings from cms
[wfpl.git] / metaform / template.html
index 0aaa08b..09acf3d 100644 (file)
@@ -1,44 +1,64 @@
 <!DOCTYPE html>
 
-<html>
+<html lang="en">
 <head>
        <meta charset="utf-8" />
-       <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/ckeditor/ckeditor.js"></script>
-       <script language="javascript" type="text/javascript">
+       <title><!--~~$title show {~~-->~plural cap~<!--~~}~~--></title>
+       <link rel="stylesheet" href="style.css"><!--~html_editor_headers {~-->
+       <!--~~$head {~~-->
+       <script src="inc/ckeditor/ckeditor.js?t=F0RD"></script>
+       <script>
                function make_wysiwyg(name) {
                        CKEDITOR.replace(name, {
+                               'contentsCss': 'style.css?m=~style.css mtime~',
+                               'allowedContent': true,
+                               bodyId: '~$basename~' + '_wysiwyg_' + name,
+                               'stylesSet': [
+                                       { name: 'Paragraph', element: 'p'},
+                                       { name: 'Page Headline', element: 'h1'},
+                                       { name: 'Section Headline', element: 'h2'},
+                                       { name: 'Subsection Headline', element: 'h3'},
+                                       { name: 'Tagline (under headline)', element: 'h4', attributes: { class: 'tagline'}},
+                                       { name: 'Quote', element: 'p', attributes: { class: 'quote'}},
+                                       { name: 'Quote Author', element: 'p', attributes: { class: 'attrib'}},
+                                       { name: 'div (generic box)', element: 'div'}
+                               ],
                                'uiColor': '#ccccff',
                                'removePlugins': 'forms,templates,smiley,pagebreak,save,newpage,preview,print',
-                               'height': '300px'
+                               'height': '300px',
+                               'toolbar': [
+                                       ['Source'],
+                                       ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'SpellChecker', 'Scayt'],
+                                       ['Undo', 'Redo', '-', 'Find', 'Replace', '-', 'SelectAll', 'RemoveFormat'],
+                                       '/',
+                                       ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript'],
+                                       ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote'],
+                                       ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+                                       ['Link', 'Unlink', 'Anchor'],
+                                       ['Image', 'Table', 'HorizontalRule', 'SpecialChar', 'PageBreak'],
+                                       '/',
+                                       ['Styles', 'Font', 'FontSize'],
+                                       ['TextColor', 'BGColor'],
+                                       ['Maximize', 'ShowBlocks']
+                               ]
                        });
                }
-       </script><!--~~}~~--><!--~}~-->
+       </script>
+       <!--~~}~~--><!--~}~-->
 </head>
 
 <body>
-<!--~~main_body show {~~-->
-
-       <!--~~wfpl_messages once_if {~~-->
-               <div style="border: 2px solid red; background: #fbb; padding: 5px; margin: 20px 0px">
-                       <!--~~wfpl_messages {~~-->
-                               <p style="font-size: 120%; padding: 5px; margin: 0px">~~data html~~</p>
-                               <!--~~ sep {~~-->
-                                       <hr>
-                               <!--~~}~~-->
-                       <!--~~}~~-->
-               </div>
-       <!--~~}~~--><!--~opt_display {~-->
-
+<!--~~$body show {~~--><!--~opt_display {~-->
        <!--~~display {~~-->
-               <h2>~singular cap~ details</h2><!--~opt_listing {~-->
+               <h2>~singular cap~ details</h2>
+<!--~opt_pass {~-->
+               <!--~~admin_privs {~~--><!--~}~--><!--~opt_listing {~-->
+               <!--~opt_pass {~-->     <!--~}~--><p><a href="~file_name~?new=1">Add another ~singular attr~</a></p>
 
-               <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>
+               <!--~opt_pass {~-->     <!--~}~--><p><a href="~file_name~">Back to ~plural attr~</a></p>
+<!--~}~-->
+               <!--~opt_pass {~-->     <!--~}~--><p><a href="~file_name~?edit_id=~~id attr~~">Edit</a></p><!--~opt_pass {~-->
+               <!--~~}~~--><!--~}~-->
 
                <table border="0" cellpadding="3" cellspacing="0" summary="">
 <!--~display_fields {~--><!--~image {~-->
 <!--~}~--><!--~textarea {~-->
                        <tr><td class="caption">~caption html~:</td><td>~~~name~ htmlbrtab~~</td></tr>
 <!--~}~--><!--~}~-->
-               </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>
+               </table>
+<!--~opt_pass {~-->
+               <!--~~admin_privs {~~--><!--~}~--><!--~opt_listing {~-->
+               <!--~opt_pass {~-->     <!--~}~--><p><a href="~file_name~">Back to ~plural attr~</a></p>
+<!--~}~-->
+               <!--~opt_pass {~-->     <!--~}~--><p><a href="~file_name~?edit_id=~~id attr~~">Edit</a></p><!--~opt_pass {~-->
+               <!--~~}~~--><!--~}~-->
        <!--~~}~~--><!--~}~-->
 
        <!--~~form {~~--><!--~form {~-->
-               <h2><!--~opt_db {~--><!--~~new_msg {~~-->Add a new ~singular~<!--~~}~~--><!--~~edit_msg {~~-->Edit ~singular~ "~~~always_field~ html~~"<!--~~}~~--><!--~}~--><!--~opt_db unset {~-->Submit a ~singular~<!--~}~--></h2>
+               <h2><!--~opt_db {~--><!--~~id unset {~~-->Add a new ~singular~<!--~~}~~--><!--~~id {~~-->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~~"><!--~}~--><!--~hidden_fields {~--><!--~ first {~-->
+               <form action="~opt_public_form {~~~$basename~~~}~~opt_public_form unset {~~file_name attr~~}~" method="post~enctype_attr~"><!--~opt_db {~--><!--~~id {~~--><div style="display: none"><input type="hidden" name="edit_id" value="~~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 id="~name attr~"><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="field"><input type="file" name="~name~"><input type="hidden" name="old_~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~textbox {~-->
                        <div class="caption">~caption html~</div>
-                       <div class="field"><input type="text" name="~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~date {~-->
+                       <div class="field"><input type="text" name="~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~email {~-->
+                       <div class="caption">~caption html~</div>
+                       <div class="field"><input type="email" name="~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~search {~-->
+                       <div class="caption">~caption html~</div>
+                       <div class="field"><input type="search" name="~name~" value="~~~name~ attr~~"></div><!--~}~--><!--~date {~-->
                        <div class="caption">~caption html~</div>
                        <div class="field"><input type="text" name="~name~" value="~~~name~ mmddyyyy attr~~"> mm/dd/yyyy</div><!--~}~--><!--~password {~-->
                        <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_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="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>
+                                       <li>In the link dialog, you can make a link to another page on this site by entering that page's "filename" in the URL field.</li>
+                               </ul>
+                       </div>
+                       <div class="field"><textarea class="html_editor" rows="20" cols="50" name="~name~">~~~name~ html~~</textarea><script>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~" 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 class="field"><!--~options {~-->
+                               <input type="radio" name="~name~" value="~~~name~ radio_~i~~~" id="~name~_~i~_radio"><label for="~name~_~i~_radio"> ~option_caption html~</label><br><!--~}~-->
                        </div><!--~}~--><!--~checkbox {~-->
                        <div class="caption"><input type="checkbox" name="~name~~~~name~ checked~~" id="~name~_checkbox"><label for="~name~_checkbox"> ~caption html~</label></div>
                        <div class="field"></div><!--~}~--><!--~submit {~-->
-                       <div class="caption">&nbsp;</div>
+                       <div class="caption"></div>
                        <div class="field"><input type="submit" name="~name~" value="~caption attr~"></div><!--~}~-->
 <!--~}~-->
                </form><!--~opt_listing {~-->
 
                <div class="caption">&nbsp;</div>
-               <div class="field"><!--~~~file_name attr~_edit_id {~~--><a href="~file_name attr~?~file_name attr~_id=~~~file_name attr~_edit_id~~"><!--~~}~~--><!--~~~file_name attr~_edit_id unset {~~--><a href="~file_name attr~"><!--~~}~~-->Cancel</a></div><!--~}~-->
+               <div class="field"><a href="~file_name attr~~~id {~~?id=~~id~~~~}~~">Cancel</a></div><!--~}~-->
        <!--~}~--><!--~~}~~--><!--~opt_listing {~-->
 
-       <!--~~listings once {~~-->
+       <!--~~listings {~~-->
                <h2>~plural cap~ Listing</h2>
 
-               <!--~~listings once_if {~~-->
-                       <p><a href="~file_name~?~file_name~_new=1">[Add a new ~singular~]</a></p>
+               <!--~~rows once_if {~~-->
+                       <p><a href="~file_name~?new=1">[Add a new ~singular~]</a></p>
 
-                       <table cellspacing="0" cellpadding="4" border="1" summary="">
-                               <tr><!--~listing_headers {~--><th>~caption~</th><!--~}~--><th>&nbsp;</th></tr><!--~~listings {~~-->
+                       <table cellspacing="0" cellpadding="4" border="0" summary="" class="evenodd">
+                               <tr><!--~listing_headers {~-->
+                                       <th><a href="?sort=~~sorting-by-~name~~~~name~">~caption~</a></th><!--~}~-->
+                                       <th>&nbsp;</th>
+                               </tr><!--~~rows {~~-->
                                <tr><!--~listing_fields {~-->
-                                       <td class="listing"><a href="~file_name~?~file_name~_<!--~opt_display unset {~-->edit_<!--~}~-->id=~~id~~"><!--~enc {~-->~~~name~ ~enc~~~<!--~~~name~ empty {~~--><em>(blank)</em><!--~~}~~--><!--~}~--><!--~thumb {~--><!--~~~name~ nonempty {~~--><img src="~~~name~ thumb_src~~" width="~~~name~ thumb_width~~" height="~~~name~ thumb_height~~" alt=""><!--~~}~~--><!--~}~--></a></td><!--~}~-->
+                                       <td class="listing"><a href="~file_name~?~opt_display unset {~edit_~}~id=~~id~~"><!--~enc {~-->~~~name~ ~enc~~~<!--~~~name~ empty {~~--><em>(blank)</em><!--~~}~~--><!--~}~--><!--~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><!--~~}~~-->
 
                        </table>
+                       <p><a href="?download_csv=1">Download as CSV file</a></p>
                <!--~~}~~-->
-               <!--~~listings once_else {~~-->
+               <!--~~rows once_else {~~-->
                        <p>No ~plural~ in database.</p>
                <!--~~}~~-->
 
-               <p><a href="~file_name~?~file_name~_new=1">[Add a new ~singular~]</a></p>
+               <p><a href="~file_name~?new=1">[Add a new ~singular~]</a></p>
        <!--~~}~~--><!--~}~-->
 
 <!--~~}~~-->