X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Manual.git;a=blobdiff_plain;f=lib%2FCatalyst%2FManual%2FTutorial%2F09_AdvancedCRUD%2F09_FormHandler.pod;h=e15245c414bdd6570edaac47ecc8a09a17ce58d4;hp=60c554fc3829e9c334b8f19146f65ce198a1120d;hb=02bb2b5a140dc22d7d002fcdce868656d704676a;hpb=7ce05098c9b1df9078e709e5a724e821a3b3b00d diff --git a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod index 60c554f..e15245c 100644 --- a/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod +++ b/lib/Catalyst/Manual/Tutorial/09_AdvancedCRUD/09_FormHandler.pod @@ -2,7 +2,6 @@ Catalyst::Manual::Tutorial::09_AdvancedCRUD::09_FormHandler - Catalyst Tutorial - Chapter 9: Advanced CRUD - FormHandler - =head1 OVERVIEW This is B for the Catalyst tutorial. @@ -82,7 +81,7 @@ Also, add: requires 'HTML::FormHandler::Model::DBIC'; -to your C. +to your F. =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. Create C: +Create the directory F. Create F: package MyApp::Form::Book; @@ -117,7 +116,7 @@ Create the directory C. Create C: =head2 Add Action to Display and Save the Form -At the top of the C add: +At the top of the F 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 in your editor and enter the following: +Open F in your editor and enter the following: [% META title = 'Create/Update Book' %] @@ -173,13 +172,13 @@ Open C in your editor and enter the following: =head2 Add Link for Create -Open C in your editor and add the following to +Open F in your editor and add the following to the bottom of the existing file: ...

- HTML::FormHandler: - Create + HTML::FormHandler: + Create

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 in your editor. +Open F 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 and add the following method: +Edit F and add the following method: =head2 edit @@ -260,14 +259,14 @@ Edit C and add the following method: return $self->form($c, $c->stash->{object}); } -Update the C, adding an 'edit' link below the +Update the F, adding an 'edit' link below the "Delete" link to use the FormHandler edit method: - [% # Add a link to delete a book %] - Delete - [% # Add a link to edit a book %] - Edit + [% # Add a link to delete a book %] + Delete + [% # Add a link to edit a book %] + Edit