Index: openacs-4/packages/acs-templating/www/doc/guide/search.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/www/doc/guide/search.adp,v
diff -u -r1.2 -r1.2.2.1
--- openacs-4/packages/acs-templating/www/doc/guide/search.adp 27 Oct 2014 16:40:24 -0000 1.2
+++ openacs-4/packages/acs-templating/www/doc/guide/search.adp 25 Aug 2015 18:02:15 -0000 1.2.2.1
@@ -4,13 +4,13 @@
Form designers are often confronted by the need to provide users
+ Form designers are often confronted by the need to provide users
with a way to choose from hundreds or even thousands of potential
options, exceeding the practical capacity of a select list or set
of checkboxes or radio buttons. One common solution is to allow the
-user to select from a search result:Implementing Search-and-Select Forms
Implementing Search-and-Select Forms
+
+user to select from a search result:
The user is prompted to enter or choose some search criteria. For example, travel sites typically begin the reservation process by prompting the user to enter a city of origin and @@ -25,13 +25,16 @@ system prompts the user to choose a city before proceding. If no matches are found, the sytem prompts the user to search again.
To illustrate how to implement this type of page flow using the + +
To illustrate how to implement this type of page flow using the templating system, we will build the framework for a simple user-management interface. Required actions for such an interface might include editing basic user properties, changing user -permissions or adding users to roles or groups.
The simplest way to implement this page flow using the +permissions or adding users to roles or groups.
+The simplest way to implement this page flow using the templating system is to create a single page that conditionally -includes two different forms:
Say the administrator wishes to edit the name and screen name of a user. The administrator requests a page, user-edit.acs. The page looks for a query parameter named user_id to @@ -46,14 +49,18 @@ administrator to choose one. A link is also provided with no user_id so that the administrator may search again.
If the administrator chooses a user, the page detects the user_id and displays the edit form.
A working implementation of this example is provided in the +
A working implementation of this example is provided in the files demo/user-edit.tcl and demo/user-edit.adp. You must execute the demo data file (demo/demo.sql) for -the page to function.
Try the following scenarios:
Try the following scenarios:
+