JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
updated to latest wfpl
authorJason Woofenden <jason@jasonwoof.com>
Wed, 4 Nov 2009 06:12:21 +0000 (01:12 -0500)
committerJason Woofenden <jason@jasonwoof.com>
Wed, 4 Nov 2009 06:12:21 +0000 (01:12 -0500)
13 files changed:
code/config.php
code/wfpl
index.html
login.html
login.php
narrative_example.html
people.html
su.html
su.php
tasks.email.txt
tasks.html
template.html
tiny_agreement.html

index 82fb0cc..30691ab 100644 (file)
@@ -10,33 +10,23 @@ function cms_get() {
        return false;
 }
 
-function logged_in_as_admin() {
+# whether currently logged in as admin (can be changed with su)
+function logged_in_as_contractor() {
        if(!isset($GLOBALS['logged_in_as_admin'])) {
                $GLOBALS['logged_in_as_admin'] = (logged_in() == 1); # logged_in() returns id. id #1 is admin
        }
        return $GLOBALS['logged_in_as_admin'];
 }
 
-function logged_in_as_contractor() {
-       return logged_in_as_admin();
-}
-
+# whether originally logged in as contractor (reguardless of current su)
 function ever_was_contractor() {
-       return logged_in_as_contractor() || session_get('auth_was_contractor') == 'Yes';
-}
-
-function set_was_contractor() {
-       session_set('auth_was_contractor', 'Yes');
+       return logged_in_as_admin();
 }
 
 function enc_money($float) {
        return format_money($float, $cents = false);
 }
 
-function logged_in() {
-       return session_exists_and_authed();
-}
-
 # 1st arg: the correct encrypted password
 # 2nd arg: clear-text password entered by someone
 function check_password($encrypted, $pass) {
index f250e40..dfd0f15 160000 (submodule)
--- a/code/wfpl
+++ b/code/wfpl
@@ -1 +1 @@
-Subproject commit f250e40ff0e93be2feeb474660d0a21dccef4298
+Subproject commit dfd0f158f89020b3142e41127d21e48c8512aa1e
index 1310540..34d035c 100644 (file)
@@ -7,82 +7,82 @@
 </head>
 
 <body>
-  <!--~main_body start~-->
+  <!--~main_body {~-->
 
   <h2>Progress Manager</h2>
 
   <p>This page is for giving Jason Woofenden work and figuring out the details of the associated tasks, costs and priorities.</p>
 
-  <p><a href="tasks?tasks_new=1">Add a task</a> &bull; <!--~not_contractor_links start~--><a href="tasks?tasks_new_bug=1">Report a problem</a><!-- &bull; <a href="pay">Pay Jason</a>--><!--~end~--><!--~contractor_links start~--><a href="people">Manage accounts</a><!--~end~--><!--~su_link start~--> &bull; <a href="su">Switch login</a><!--~end~--></p>
+  <p><a href="tasks?tasks_new=1">Add a task</a> &bull; <!--~not_contractor_links {~--><a href="tasks?tasks_new_bug=1">Report a problem</a><!-- &bull; <a href="pay">Pay Jason</a>--><!--~}~--><!--~contractor_links {~--><a href="people">Manage accounts</a><!--~}~--><!--~su_link {~--> &bull; <a href="su">Switch login</a><!--~}~--></p>
 
-  <!--~needs_attention_header start~-->
+  <!--~needs_attention_header {~-->
     <h3>Tasks needing your attention:</h3>
-  <!--~end~-->
-    <!--~needs_approval_row start~-->
-    <div class="task_link">~client.html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title.html~</a> (~task_state~)</div>
-    <!--~end~-->
-    <!--~needs_fixing_row start~-->
-    <div class="task_link">~client.html~ <a href="tasks?tasks_edit_id=~task_id~">#~task_id~: ~task_title.html~</a> (~task_state~)</div>
-    <!--~end~-->
+  <!--~}~-->
+    <!--~needs_approval_row {~-->
+    <div class="task_link">~client html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title html~</a> (~task_state~)</div>
+    <!--~}~-->
+    <!--~needs_fixing_row {~-->
+    <div class="task_link">~client html~ <a href="tasks?tasks_edit_id=~task_id~">#~task_id~: ~task_title html~</a> (~task_state~)</div>
+    <!--~}~-->
 
-  <!--~jason start~-->
+  <!--~jason {~-->
     <h3>Tasks waiting for Jason:</h3>
-    <!--~jason_row start~-->
-    <div class="task_link"><a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title.html~</a> (~task_state~)</div>
-    <!--~end~-->
-  <!--~end~-->
+    <!--~jason_row {~-->
+    <div class="task_link"><a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title html~</a> (~task_state~)</div>
+    <!--~}~-->
+  <!--~}~-->
 
-  <!--~jason_working start~-->
+  <!--~jason_working {~-->
     <h4>Jason is currently working on:</h4>
-    <!--~jason_working_row start~-->
-    <div class="task_link"><a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
-    <!--~end~-->
-  <!--~end~-->
+    <!--~jason_working_row {~-->
+    <div class="task_link"><a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title html~</a> (~task_price money~)</div>
+    <!--~}~-->
+  <!--~}~-->
 
-  <!--~queue start~-->
+  <!--~queue {~-->
     <h4>Queued tasks</h4>
     <div>Jason hasn't started on these yet. You can use the arrows to set the priority order. Jason will do the top one first.</div>
-    <!--~queue_row start~-->
-    <div class="task_link"><span class="updown"><div class="updown_links"> <a href="tasks?tasks_edit_id=~task_id~&amp;bump=down">later</a> <a href="tasks?tasks_edit_id=~task_id~&amp;bump=up">sooner</a> <a href="tasks?tasks_edit_id=~task_id~&amp;bump=bottom">last</a> <a href="tasks?tasks_edit_id=~task_id~&amp;bump=top">first</a></div></span> ~client.html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
-    <!--~end~-->
-  <!--~end~-->
+    <!--~queue_row {~-->
+    <div class="task_link"><span class="updown"><div class="updown_links"> <a href="tasks?tasks_edit_id=~task_id~&amp;bump=down">later</a> <a href="tasks?tasks_edit_id=~task_id~&amp;bump=up">sooner</a> <a href="tasks?tasks_edit_id=~task_id~&amp;bump=bottom">last</a> <a href="tasks?tasks_edit_id=~task_id~&amp;bump=top">first</a></div></span> ~client html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title html~</a> (~task_price money~)</div>
+    <!--~}~-->
+  <!--~}~-->
 
-  <!--~finished_untested start~-->
+  <!--~finished_untested {~-->
     <h3>Finished but not tested</h3>
-    <!--~finished_untested_row start~-->
-    <div class="task_link">~client.html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
-    <!--~end~-->
-    <div>Total: ~task_total.money~</div>
-  <!--~end~-->
+    <!--~finished_untested_row {~-->
+    <div class="task_link">~client html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title html~</a> (~task_price money~)</div>
+    <!--~}~-->
+    <div>Total: ~task_total money~</div>
+  <!--~}~-->
 
-  <!--~finished_unpaid start~-->
+  <!--~finished_unpaid {~-->
     <h3>Finished tasks</h3>
-    <!--~finished_unpaid_row start~-->
-    <div class="task_link">~client.html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title.html~</a> (~task_price.money~)</div>
-    <!--~end~-->
-    <div>Total: ~task_total.money~</div>
-  <!--~end~-->
+    <!--~finished_unpaid_row {~-->
+    <div class="task_link">~client html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title html~</a> (~task_price money~)</div>
+    <!--~}~-->
+    <div>Total: ~task_total money~</div>
+  <!--~}~-->
 
-  <!--~unpaid_totals start~-->
+  <!--~unpaid_totals {~-->
     <h3>Unpaid totals</h3>
     <table cellpadding="3" cellspacing="0" border="1" summary="">
     <tr><th>Client</th><th>Queued<br />&amp; WIP</th><th>Done</th><th>Done &amp;<br />Tested</th><th>Done But<br />Not Tested</th></tr>
-    <!--~unpaid_totals_row start~-->
-    <tr><td>~client.html~</td><td class="num">~queued_total.money~</td><td class="num">~done_total.money~</td><td class="num">~tested_total.money~</td><td class="num">~not_tested_total.money~</td></tr>
-    <!--~end~-->
+    <!--~unpaid_totals_row {~-->
+    <tr><td>~client html~</td><td class="num">~queued_total money~</td><td class="num">~done_total money~</td><td class="num">~tested_total money~</td><td class="num">~not_tested_total money~</td></tr>
+    <!--~}~-->
     </table>
-  <!--~end~-->
+  <!--~}~-->
 
-  <!--~finished_paid start~-->
+  <!--~finished_paid {~-->
     <h3>Finished and paid for</h3>
-    <!--~finished_paid_row start~-->
-    <div class="task_link">~client.html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title.html~</a></div>
-    <!--~end~-->
-    <!--~finished_paid_and_more start~-->
+    <!--~finished_paid_row {~-->
+    <div class="task_link">~client html~ <a href="tasks?tasks_id=~task_id~">#~task_id~: ~task_title html~</a></div>
+    <!--~}~-->
+    <!--~finished_paid_and_more {~-->
     <div class="task_link">...</div>
-    <!--~end~-->
-  <!--~end~-->
+    <!--~}~-->
+  <!--~}~-->
 
-<!--~end~-->
+<!--~}~-->
 </body>
 </html>
index 66f2708..0b6bd59 100644 (file)
@@ -7,27 +7,27 @@
 </head>
 
 <body>
-  <!--~main_body start~-->
+  <!--~main_body {~-->
     <h3>Client Login</h3>
 
-    <!--~failed start~-->
+    <!--~failed {~-->
       <h5 style="color: red">Incorrect username and/or password</h5>
-    <!--~end~-->
+    <!--~}~-->
  
     <form action="login.html" method="post">
-      <input type="hidden" name="url" value="~url.attr~" />
+      <input type="hidden" name="url" value="~url attr~" />
  
       <table style="margin-left: 40px" cellspacing="0" cellpadding="4" border="0" summary="">
         <tr>
           <td class="caption">Username:</td>
  
-          <td><input type="text" name="username" value="~username.attr~" /></td>
+          <td><input type="text" name="username" value="~username attr~" /></td>
         </tr>
  
         <tr>
           <td class="caption">Password:</td>
  
-          <td><input type="password" name="password" value="~password.attr~" /></td>
+          <td><input type="password" name="password" value="~password attr~" /></td>
         </tr>
  
         <tr>
@@ -35,6 +35,6 @@
         </tr>
       </table>
     </form>
-  <!--~end~-->
+  <!--~}~-->
 </body>
 </html>
index f0eb6dd..da07a64 100644 (file)
--- a/login.php
+++ b/login.php
@@ -45,6 +45,9 @@ function login_main() {
                                message("Logged in successfully.");
                                session_new();
                                session_set('auth_username', "$id");
+                               if($id == '1') {
+                                       session_set('auth_admin', 'yes');
+                               }
                                if($url) {
                                        return $url;
                                } else {
index 0d52cb9..eee9505 100644 (file)
@@ -7,7 +7,7 @@
 </head>
 
 <body>
-<!--~main_body start~-->
+<!--~main_body {~-->
   <h2>Narrative Example</h2>
 
   <p>When you <a href="./">commission Jason Woofenden</a> you are asked to write about your change/addition in the form of a first-person narrative. In this narrative you write as if the change/addition you would like has already been implemented. You write the specifics of what you do and what you see as a result.</p>
@@ -16,6 +16,6 @@
   <p class="boxed">I go to my home page, (or any other page on my site) and I click a link labeled "Contact Us" which is just below the "About Us" link on the left. Then I see a page with a headline "Contact Us" and a form with these fields: "Name", "E-mail", "Comments" and a button "Send". When I click "Send", all information entered is e-mailed to foo@example.com and I see a page with the headline "Thank You" and this paragraph: "Thank you for your interest. We can usually reply within one business day."</p>
 
   <p>After Jason makes the changes, you can verify that they are complete by following the steps in the narrative and making sure you can see everything it describes.</p>
-<!--~end~-->
+<!--~}~-->
 </body>
 </html>
index e775865..ae61b3e 100644 (file)
@@ -7,60 +7,60 @@
 </head>
 
 <body>
-  <!--~main_body start~-->
+  <!--~main_body {~-->
 
-  <!--~message_container start~-->
+  <!--~message_container {~-->
        <div style="border: 2px solid red; background: #fbb; padding: 5px; margin: 20px 0px">
-       <!--~message_box start~-->
-           <!--~message_divider start~-->
+       <!--~message_box {~-->
+           <!--~message_divider {~-->
                <hr />
-           <!--~end~-->
-           <p style="font-size: 120%; padding: 5px; margin: 0px">~message_text.html~</p>
-       <!--~end~-->
+           <!--~}~-->
+           <p style="font-size: 120%; padding: 5px; margin: 0px">~message_text html~</p>
+       <!--~}~-->
        </div>
-  <!--~end~-->
+  <!--~}~-->
 
-<!--~form start~-->
-  <h2><!--~new_msg start~-->Add a new account<!--~end~--><!--~edit_msg start~-->Edit ~username.html~'s account<!--~end~--></h2>
+<!--~form {~-->
+  <h2><!--~new_msg {~-->Add a new account<!--~}~--><!--~edit_msg {~-->Edit ~username html~'s account<!--~}~--></h2>
 
-  <form action="people" method="post"><!--~editing start~--><input type="hidden" name="people_edit_id" value="~people_edit_id.attr~" /><!--~end~-->
+  <form action="people" method="post"><!--~editing {~--><input type="hidden" name="people_edit_id" value="~people_edit_id attr~" /><!--~}~-->
     <table cellspacing="0" cellpadding="4" border="0" summary="">
 
-      <tr><td class="caption">Username: </td><td class="field"><input type="text" name="username" value="~username.attr~" /></td></tr>
+      <tr><td class="caption">Username: </td><td class="field"><input type="text" name="username" value="~username attr~" /></td></tr>
 
-      <tr><td class="caption">Password: </td><td class="field"><input type="text" name="password" value="~password.attr~" /></td></tr>
+      <tr><td class="caption">Password: </td><td class="field"><input type="text" name="password" value="~password attr~" /></td></tr>
 
-      <tr><td class="caption">Name: </td><td class="field"><input type="text" name="name" value="~name.attr~" /></td></tr>
+      <tr><td class="caption">Name: </td><td class="field"><input type="text" name="name" value="~name attr~" /></td></tr>
 
-      <tr><td class="caption">Privs: </td><td class="field"><input type="text" name="privs" value="~privs.attr~" /></td></tr>
+      <tr><td class="caption">Privs: </td><td class="field"><input type="text" name="privs" value="~privs attr~" /></td></tr>
 
-      <tr><td class="caption">Balance: </td><td class="field"><input type="text" name="balance" value="~balance.attr~" /></td></tr>
+      <tr><td class="caption">Balance: </td><td class="field"><input type="text" name="balance" value="~balance attr~" /></td></tr>
 
       <tr><td class="submit_row" colspan="2"><input type="submit" name="save" value="Save" /></td></tr>
     </table>
   </form>
-<!--~end~-->
-<!--~listings start~-->
+<!--~}~-->
+<!--~listings {~-->
   <h2>Account Administration</h2>
 
-  <!--~populated_listing start~-->
+  <!--~populated_listing {~-->
   <p><a href="people.html?people_new=1">[Add a new account]</a></p>
 
   <table cellspacing="0" cellpadding="4" border="1" summary="">
-    <tr><th>Name</th><th>Login</th><th>&nbsp;</th></tr><!--~listing_row start~-->
-    <tr><td class="listing"><a href="people.html?people_edit_id=~id~">~name.html~</a></td><td class="listing"><a href="people.html?people_edit_id=~id~">~username.html~</a></td><td><a href="people.html?people_delete_id=~id~" onclick="return confirm('Permanently delete?')">[delete]</a></td></tr><!--~end~-->
+    <tr><th>Name</th><th>Login</th><th>&nbsp;</th></tr><!--~listing_row {~-->
+    <tr><td class="listing"><a href="people.html?people_edit_id=~id~">~name html~</a></td><td class="listing"><a href="people.html?people_edit_id=~id~">~username html~</a></td><td><a href="people.html?people_delete_id=~id~" onclick="return confirm('Permanently delete?')">[delete]</a></td></tr><!--~}~-->
 
   </table>
-  <!--~end~-->
-  <!--~empty_listing start~-->
-    <p>No ~field_plural.html~ in database.</p>
-  <!--~end~-->
+  <!--~}~-->
+  <!--~empty_listing {~-->
+    <p>No ~field_plural html~ in database.</p>
+  <!--~}~-->
 
   <p><a href="people.html?people_new=1">[Add a new account]</a></p>
 
   <p><a href="./">Back to main page</a></p>
-<!--~end~-->
+<!--~}~-->
 
-<!--~end~-->
+<!--~}~-->
 </body>
 </html>
diff --git a/su.html b/su.html
index 919ae94..3633f19 100644 (file)
--- a/su.html
+++ b/su.html
@@ -7,17 +7,17 @@
 </head>
 
 <body>
-  <!--~main_body start~-->
+  <!--~main_body {~-->
   <h2>Switch Login</h2>
 
   <p>With the links below you can quickly switch to being logged in under one of the client accounts. You will then see exactly what they see when they log in, and have exactly the same privileges to edit, etc. except that you are not prompted to fill out the tiny agreement and can still access this "Switch Login" page.</p>
 
-  <!--~su_row start~-->
-    <p><a href="su?as=~client_id~">log in as ~client_name.html~ (~client_username~)</a></p>
-  <!--~end~-->
+  <!--~su_row {~-->
+    <p><a href="su?as=~client_id~">log in as ~client_name html~ (~client_username~)</a></p>
+  <!--~}~-->
 
   <p style="padding-top: 10px"><a href="./">Cancel</a></p>
 
-<!--~end~-->
+<!--~}~-->
 </body>
 </html>
diff --git a/su.php b/su.php
index d777117..6f26627 100644 (file)
--- a/su.php
+++ b/su.php
@@ -18,9 +18,8 @@
 require_once('code/wfpl/format.php');
 
 function su_main() {
-       if(logged_in_as_contractor()) {
-               set_was_contractor();
-       } elseif(!ever_was_contractor()) {
+       # If you log in to the admin account, you can su to a customer account and still have access to su back to admin. That's why we're checking for admin not "contractor" here.
+       if(!logged_in_as_admin()) {
                $GLOBALS['url'] = this_url();
                message('You must be logged in as an administrator to access that function');
                return 'login';
index ebcd37b..86e867d 100644 (file)
@@ -5,6 +5,6 @@ ord: ~ord~
 title: ~title~
 url: ~url~
 description:
-~description.tab~
+~description tab~
 state: ~state~
 paid: ~paid~
index 192426b..21907ae 100644 (file)
@@ -7,86 +7,86 @@
 </head>
 
 <body>
-  <!--~main_body start~-->
+  <!--~main_body {~-->
 
-<!--~display_body start~-->
-  <h3><!--~normal_title start~-->Task #~task_id~<!--~end~--><!--~bug_title start~-->Problem Report<!--~end~--> "~title.html~"</h3>
+<!--~display_body {~-->
+  <h3><!--~normal_title {~-->Task #~task_id~<!--~}~--><!--~bug_title {~-->Problem Report<!--~}~--> "~title html~"</h3>
 
 
-  <p><strong>Title</strong>: ~title.html~</p>
+  <p><strong>Title</strong>: ~title html~</p>
 
-  <p><strong>Status</strong>: ~state.html~<!--~finished_at_section start~--> (finished on ~finished_at.mmddyyyy~)<!--~end~--><!--~tested_at_section start~--> (tested on ~tested_at.mmddyyyy~)<!--~end~--></p>
+  <p><strong>Status</strong>: ~state html~<!--~finished_at_section {~--> (finished on ~finished_at mmddyyyy~)<!--~}~--><!--~tested_at_section {~--> (tested on ~tested_at mmddyyyy~)<!--~}~--></p>
 
-  <p><strong>URL</strong>: <a target="_new" href="~url.attr~">~url.html~</a></p>
+  <p><strong>URL</strong>: <a target="_new" href="~url attr~">~url html~</a></p>
 
   <p style="padding-left: 20px; text-indent: -20px"><strong>Narrative</strong>:<br />
-  ~description.htmlbrtab~</p>
+  ~description htmlbrtab~</p>
 
-  <!--~price_row start~--><p><strong>Price</strong>: ~price.money~<!--~marked_paid start~--> &nbsp;&nbsp;<strong>Paid</strong><!--~end~--></p><!--~end~-->
+  <!--~price_row {~--><p><strong>Price</strong>: ~price money~<!--~marked_paid {~--> &nbsp;&nbsp;<strong>Paid</strong><!--~}~--></p><!--~}~-->
 
-  <!--~mark_paid_link start~--><p><a href="tasks?tasks_mark_paid_id=~task_id.attr~">Mark as paid</a></p><!--~end~-->
+  <!--~mark_paid_link {~--><p><a href="tasks?tasks_mark_paid_id=~task_id attr~">Mark as paid</a></p><!--~}~-->
 
-  <!--~approve_price_link start~--><p><a href="tasks?tasks_approve_price_id=~task_id.attr~">Approve price</a></p><!--~end~-->
+  <!--~approve_price_link {~--><p><a href="tasks?tasks_approve_price_id=~task_id attr~">Approve price</a></p><!--~}~-->
 
-  <!--~normal_edit_link start~--><p><a href="tasks?tasks_edit_id=~task_id.attr~">Edit this task</a></p><!--~end~-->
-  <!--~warning_edit_link start~--><p><a href="tasks?tasks_edit_id=~task_id.attr~" onclick="return confirm('Editing this task will invalidate the price, proceed anyway?')">Edit this task</a></p><!--~end~-->
+  <!--~normal_edit_link {~--><p><a href="tasks?tasks_edit_id=~task_id attr~">Edit this task</a></p><!--~}~-->
+  <!--~warning_edit_link {~--><p><a href="tasks?tasks_edit_id=~task_id attr~" onclick="return confirm('Editing this task will invalidate the price, proceed anyway?')">Edit this task</a></p><!--~}~-->
 
-  <!--~working_link start~--><p><a href="tasks?tasks_working_id=~task_id.attr~">I'm starting on this now</a></p><!--~end~-->
+  <!--~working_link {~--><p><a href="tasks?tasks_working_id=~task_id attr~">I'm starting on this now</a></p><!--~}~-->
 
-  <!--~hold_link start~--><p><a href="tasks?tasks_hold_id=~task_id.attr~">Place this task on hold</a></p><!--~end~-->
+  <!--~hold_link {~--><p><a href="tasks?tasks_hold_id=~task_id attr~">Place this task on hold</a></p><!--~}~-->
 
-  <!--~needs_testing_link start~--><p><a href="tasks?tasks_needs_testing_id=~task_id.attr~">Mark this task as finished (request testing)</a></p><!--~end~-->
+  <!--~needs_testing_link {~--><p><a href="tasks?tasks_needs_testing_id=~task_id attr~">Mark this task as finished (request testing)</a></p><!--~}~-->
 
-  <!--~finished_link start~--><p>Please test everything in the narrative! If everything is working, <a href="tasks?tasks_finished_id=~task_id.attr~">Mark this task as finished</a> Otherwise please e-mail or call Jason.</p><!--~end~-->
+  <!--~finished_link {~--><p>Please test everything in the narrative! If everything is working, <a href="tasks?tasks_finished_id=~task_id attr~">Mark this task as finished</a> Otherwise please e-mail or call Jason.</p><!--~}~-->
 
   <p><a href="./">Back</a></p>
-<!--~end~-->
+<!--~}~-->
 
-<!--~edit_body start~-->
-  <h3><!--~bug_msg start~-->Report a problem<!--~end~--><!--~new_msg start~-->Add a new task<!--~end~--><!--~edit_msg start~-->Edit task #~tasks_edit_id~ "~title.html~"<!--~end~--></h3>
+<!--~edit_body {~-->
+  <h3><!--~bug_msg {~-->Report a problem<!--~}~--><!--~new_msg {~-->Add a new task<!--~}~--><!--~edit_msg {~-->Edit task #~tasks_edit_id~ "~title html~"<!--~}~--></h3>
 
-  <form action="tasks" method="post"><!--~editing start~--><input type="hidden" name="tasks_edit_id" value="~tasks_edit_id.attr~" /><!--~end~-->
+  <form action="tasks" method="post"><!--~editing {~--><input type="hidden" name="tasks_edit_id" value="~tasks_edit_id attr~" /><!--~}~-->
     <table cellspacing="0" cellpadding="4" border="0" summary="">
 
-<!--~client_row start~-->
-      <tr><td class="caption">Client: </td><td class="field"><select name="client_id"><option value="">Choose One...</option><!--~client_id.options~--></select></td></tr>
-<!--~end~-->
+<!--~client_row {~-->
+      <tr><td class="caption">Client: </td><td class="field"><select name="client_id"><option value="">Choose One...</option><!--~client_id options~--></select></td></tr>
+<!--~}~-->
 
-      <tr><td class="caption">Title: </td><td class="field"><input type="text" size="40" name="title" value="~title.attr~" /></td></tr>
+      <tr><td class="caption">Title: </td><td class="field"><input type="text" size="40" name="title" value="~title attr~" /></td></tr>
 
-      <tr><td class="caption">URL: </td><td class="field"><input type="text" size="40" name="url" value="~url.attr~" /></td></tr>
+      <tr><td class="caption">URL: </td><td class="field"><input type="text" size="40" name="url" value="~url attr~" /></td></tr>
 
 
       <tr><td colspan="2">
-      <!--~fixme_instructions start~-->The narrative below contains "FIXME". This is Jason's way of marking the places in the narrative that need your attention. Please update these parts of the narrative to be more complete/specific and remove the "FIXME".<!--~end~-->
-      <!--~set_price_instructions start~-->Mark trouble spots with "FIXME".<!--~end~-->
-      <!--~normal_instructions start~-->Below, write as if the change/addition you would like has already been implemented. Write a first-person narrative with the specifics of what you do and what you see as a result. <a target="_new" href="narrative_example">See an example</a>.<!--~end~-->
-      <!--~bug_instructions start~-->Below, describe in detail 1) what you do, 2) what you expect to see, 3) what you see instead<!--~end~-->
+      <!--~fixme_instructions {~-->The narrative below contains "FIXME". This is Jason's way of marking the places in the narrative that need your attention. Please update these parts of the narrative to be more complete/specific and remove the "FIXME".<!--~}~-->
+      <!--~set_price_instructions {~-->Mark trouble spots with "FIXME".<!--~}~-->
+      <!--~normal_instructions {~-->Below, write as if the change/addition you would like has already been implemented. Write a first-person narrative with the specifics of what you do and what you see as a result. <a target="_new" href="narrative_example">See an example</a>.<!--~}~-->
+      <!--~bug_instructions {~-->Below, describe in detail 1) what you do, 2) what you expect to see, 3) what you see instead<!--~}~-->
       </td></tr>
-      <tr><td colspan="2" class="field"><textarea rows="20" cols="50" name="description">~description.html~</textarea></td></tr>
-<!--~price_field start~-->
-      <tr><td class="caption">Price: </td><td class="field"><input type="text" size="10" name="price" value="~price.attr~" /></td></tr>
-<!--~end~-->
-<!--~contractor_submits start~-->
+      <tr><td colspan="2" class="field"><textarea rows="20" cols="50" name="description">~description html~</textarea></td></tr>
+<!--~price_field {~-->
+      <tr><td class="caption">Price: </td><td class="field"><input type="text" size="10" name="price" value="~price attr~" /></td></tr>
+<!--~}~-->
+<!--~contractor_submits {~-->
       <tr><td colspan="2"><input type="submit" name="save_price" value="Save With Price" /> (directly to queue if &lt;= tiny)</td></tr>
       <tr><td colspan="2"><input type="submit" name="save_price_no_tiny" value="Await Price Approval" /> (even if it's &lt;= tiny agreement)</td></tr>
       <tr><td colspan="2"><input type="submit" name="save_draft" value="Save As Draft" /></td></tr>
       <tr><td colspan="2"><input type="submit" name="needs_clarification" value="Needs Clarification" /></td></tr>
-<!--~end~-->
-<!--~normal_submits start~-->
+<!--~}~-->
+<!--~normal_submits {~-->
       <tr><td class="submit_row" colspan="2"><input type="submit" name="request_price" value="Save and Request Price" /></td></tr>
       <tr><td class="submit_row" colspan="2"><input type="submit" name="save_draft" value="Save Draft" /></td></tr>
-<!--~end~-->
-<!--~bug_submit start~-->
+<!--~}~-->
+<!--~bug_submit {~-->
       <tr><td class="submit_row" colspan="2"><input type="submit" name="save_bug" value="Send Problem Report" /></td></tr>
-<!--~end~-->
+<!--~}~-->
     </table>
   </form>
 
   <p><a href="./">Cancel</a></p>
-<!--~end~-->
+<!--~}~-->
 
 
-<!--~end~-->
+<!--~}~-->
 </body>
 </html>
index 552caef..447d351 100644 (file)
 
           <div id="body" class="~basename~_body">
             <!--~logout_bar~-->
-            <!--~message_container start~-->
+            <!--~message_container {~-->
                  <div style="border: 2px solid red; background: #fbb; padding: 5px; margin: 20px 0px">
-                 <!--~message_box start~-->
-                     <!--~message_divider start~-->
+                 <!--~message_box {~-->
+                     <!--~message_divider {~-->
                          <hr />
-                     <!--~end~-->
-                     <p style="font-size: 120%; padding: 5px; margin: 0px">~message_text.html~</p>
-                 <!--~end~-->
+                     <!--~}~-->
+                     <p style="font-size: 120%; padding: 5px; margin: 0px">~message_text html~</p>
+                 <!--~}~-->
                  </div>
-            <!--~end~-->
+            <!--~}~-->
             <!--~main_body~-->
           </div>
           <div id="agpl_footer"><a href="http://gitorious.org/contractor-progress/contractor-progress">The code</a> that runs this website is licensed under the <a href="http://www.gnu.org/licenses/agpl.html">AGPL</a>.</div>
index 96d4143..b2386f3 100644 (file)
@@ -7,7 +7,7 @@
 </head>
 
 <body>
-<!--~main_body start~-->
+<!--~main_body {~-->
   <h3><a href="#" id="tiny_job_agreement" name="tiny_job_agreement"></a>Tiny Job Agreement</h3>
 
   <p>Welcome to the task manager! I'd like to take this opportunity to have you make an agreement with me about very small jobs. Please read it carefully, and call me if you have any questions.</p>
   <p>For tiny jobs ($30 or less) the normal pricing approval process is cumbersome. So I have my clients make the following agreement:</p>
 
   <form action="tiny_agreement" method="post">
-    <p class="agreement">For work that I request of Jason Woofenden (whether through this site, or other forms of communication like e-mail or phone), I <input type="text" size="10" name="name" value="~name.attr~" /> hereby agree to pay the fee he chooses, so long as it is <select name="level"><!--~level.options~-->
+    <p class="agreement">For work that I request of Jason Woofenden (whether through this site, or other forms of communication like e-mail or phone), I <input type="text" size="10" name="name" value="~name attr~" /> hereby agree to pay the fee he chooses, so long as it is <select name="level"><!--~level options~-->
     </select> or less. <input type="submit" value="Agree" /></p>
   </form>
 
   <p>Cutting out the overhead of quotes for tiny jobs should make it so I can keep my minimum fee at $10.</p>
-<!--~end~-->
+<!--~}~-->
 </body>
 </html>