| 7 | | Select Band: [Band Menu] OR... [Add a New Band] |
|---|
| 8 | | |
|---|
| 9 | | When the user clicks "Add a New Band," the state of the form is saved and the user is diverted to the edit action of the band admin module. When the user saves a new band, they are automatically redirected back to the edit action of the event admin module, with all of their form fields restored and the newly created band preselected from the band menu. The cancel ("list") button also redirects appropriately. (We recommend relabeling them "save" and "cancel" via custom templates.) |
|---|
| 10 | | |
|---|
| 11 | | Solutions to keep the user from becoming confused about the process and avoid certain implementation pitfalls are discussed below. |
|---|
| 12 | | |
|---|
| 13 | | Diversions can be nested, so it's possible to add a guitarist while adding a band while adding an event, although it is certainly true that the potential for user confusion increases as one goes along. |
|---|
| 14 | | |
|---|
| 15 | | This greatly increases the user-friendliness of the admin generator with a minimum of new effort on your part. |
|---|
| 16 | | |
|---|
| 17 | | == Requirements == |
|---|
| | 7 | Select Band: Band Menu OR... Add a New Band |
|---|
| | 8 | |
|---|
| | 9 | When the user clicks "Add a New Band," the state of the form is saved and the user is diverted to the edit action of the band admin module. When the user saves a new band, they are automatically redirected back to the edit action of the event admin module, with all of their form fields restored and the newly created band preselected from the band menu. The cancel ("list") button also redirects appropriately. (We recommend relabeling them "save" and "cancel" via custom templates.) |
|---|
| | 10 | |
|---|
| | 11 | Solutions to keep the user from becoming confused about the process and avoid certain implementation pitfalls are discussed below. |
|---|
| | 12 | |
|---|
| | 13 | Diversions can be nested, so it's possible to add a guitarist while adding a band while adding an event, although it is certainly true that the potential for user confusion increases as one goes along. |
|---|
| | 14 | |
|---|
| | 15 | This greatly increases the user-friendliness of the admin generator with a minimum of new effort on your part. |
|---|
| | 16 | |
|---|
| | 17 | ## Requirements ## |
|---|
| 29 | | 1. The action class of the admin generator module you are |
|---|
| 30 | | coming from (events, in my example). I'll call this the "source" module. |
|---|
| 31 | | |
|---|
| 32 | | 2. The templates of that module. |
|---|
| 33 | | |
|---|
| 34 | | 3. The action class of the admin generator module you are |
|---|
| 35 | | going to (bands, in my example). I'll call this the "destination" module. |
|---|
| 36 | | |
|---|
| 37 | | 4. Technically optional, but essential for your users to understand what |
|---|
| 38 | | is going on: change the templates of your destination module. |
|---|
| 39 | | |
|---|
| 40 | | === Step One: The Source Module's Action Class === |
|---|
| | 29 | * The action class of the admin generator module you are |
|---|
| | 30 | coming from (events, in my example). I'll call this the "source" module. |
|---|
| | 31 | |
|---|
| | 32 | * The templates of that module. |
|---|
| | 33 | |
|---|
| | 34 | * The action class of the admin generator module you are |
|---|
| | 35 | going to (bands, in my example). I'll call this the "destination" module. |
|---|
| | 36 | |
|---|
| | 37 | * Technically optional, but essential for your users to understand what |
|---|
| | 38 | is going on: change the templates of your destination module. |
|---|
| | 39 | |
|---|
| | 40 | ### Step One: The Source Module's Action Class ### |
|---|
| 251 | | <?php if (pkAdminQuickCreateTools::active()): ?> |
|---|
| 252 | | <p><b>You are adding a band as part of a new event.</b> When you click |
|---|
| 253 | | Save you will be returned to the event form. If you decide not to add a new |
|---|
| 254 | | band, click Cancel. |
|---|
| 255 | | </p> |
|---|
| 256 | | <?php endif ?> |
|---|
| 257 | | |
|---|
| 258 | | == Pitfalls: Ensuring Consistent Results == |
|---|
| | 253 | <?php if (pkAdminQuickCreateTools::active()): ?> |
|---|
| | 254 | <p><b>You are adding a band as part of a new event.</b> When you click |
|---|
| | 255 | Save you will be returned to the event form. If you decide not to add a new |
|---|
| | 256 | band, click Cancel. |
|---|
| | 257 | </p> |
|---|
| | 258 | <?php endif ?> |
|---|
| | 259 | |
|---|
| | 260 | ## Pitfalls: Ensuring Consistent Results ## |
|---|