normalize whitespace in verbatim sections
[catagits/Catalyst-Manual.git] / lib / Catalyst / Manual / Tutorial / 09_AdvancedCRUD / 09_FormHandler.pod
index 60c554f..e15245c 100644 (file)
@@ -2,7 +2,6 @@
 
 Catalyst::Manual::Tutorial::09_AdvancedCRUD::09_FormHandler - Catalyst Tutorial - Chapter 9: Advanced CRUD - FormHandler
 
-
 =head1 OVERVIEW
 
 This is B<Chapter 9 of 10> for the Catalyst tutorial.
@@ -82,7 +81,7 @@ Also, add:
 
     requires 'HTML::FormHandler::Model::DBIC';
 
-to your C<Makefile.PL>.
+to your F<Makefile.PL>.
 
 =head1 HTML::FormHandler FORM CREATION
 
@@ -97,7 +96,7 @@ to a form is only a couple of lines of code.
 
 =head2 Create a Book Form
 
-Create the directory C<lib/MyApp/Form>. Create C<lib/MyApp/Form/Book.pm>:
+Create the directory F<lib/MyApp/Form>. Create F<lib/MyApp/Form/Book.pm>:
 
     package MyApp::Form::Book;
 
@@ -117,7 +116,7 @@ Create the directory C<lib/MyApp/Form>. Create C<lib/MyApp/Form/Book.pm>:
 
 =head2 Add Action to Display and Save the Form
 
-At the top of the C<lib/MyApp/Controller/Books.pm> add:
+At the top of the F<lib/MyApp/Controller/Books.pm> add:
 
    use MyApp::Form::Book;
 
@@ -161,7 +160,7 @@ method later when we implement 'edit'.
 
 =head2 Create a Template Page To Display The Form
 
-Open C<root/src/books/form.tt2> in your editor and enter the following:
+Open F<root/src/books/form.tt2> in your editor and enter the following:
 
     [% META title = 'Create/Update Book' %]
 
@@ -173,13 +172,13 @@ Open C<root/src/books/form.tt2> in your editor and enter the following:
 
 =head2 Add Link for Create
 
-Open C<root/src/books/list.tt2> in your editor and add the following to
+Open F<root/src/books/list.tt2> in your editor and add the following to
 the bottom of the existing file:
 
     ...
     <p>
-      HTML::FormHandler:
-      <a href="[% c.uri_for(c.controller.action_for('create')) %]">Create</a>
+        HTML::FormHandler:
+        <a href="[% c.uri_for(c.controller.action_for('create')) %]">Create</a>
     </p>
 
 This adds a new link to the bottom of the book list page that we can
@@ -211,7 +210,7 @@ integers.
 
 =head2 Add Constraints
 
-Open C<lib/MyApp/Form/Book.pm> in your editor.
+Open F<lib/MyApp/Form/Book.pm> in your editor.
 
 Restrict the title size and make it required:
 
@@ -245,7 +244,7 @@ rating of 0 or 6, etc.  Also try selecting one, two, and zero authors.
 
 =head2 Create the 'edit' method
 
-Edit C<lib/MyApp/Controller/Books.pm> and add the following method:
+Edit F<lib/MyApp/Controller/Books.pm> and add the following method:
 
 
     =head2 edit
@@ -260,14 +259,14 @@ Edit C<lib/MyApp/Controller/Books.pm> and add the following method:
         return $self->form($c, $c->stash->{object});
     }
 
-Update the C<root/src/books/list.tt2>, adding an 'edit' link below the
+Update the F<root/src/books/list.tt2>, adding an 'edit' link below the
 "Delete" link to use the FormHandler edit method:
 
     <td>
-      [% # Add a link to delete a book %]
-      <a href="[% c.uri_for(c.controller.action_for('delete'), [book.id]) %]">Delete</a>
-      [% # Add a link to edit a book %]
-      <a href="[% c.uri_for(c.controller.action_for('edit'), [book.id]) %]">Edit</a>
+        [% # Add a link to delete a book %]
+        <a href="[% c.uri_for(c.controller.action_for('delete'), [book.id]) %]">Delete</a>
+        [% # Add a link to edit a book %]
+        <a href="[% c.uri_for(c.controller.action_for('edit'), [book.id]) %]">Edit</a>
     </td>