7 /page/form.mas - a component for displaying static and editable forms for user input
11 The form component is based on an ajax implementation and requires some backend scripts to be implemented for a given form.
19 The type of object the form is associated with - for example, 'locus' for a locus page, or 'image' for an image page, etc.
23 The ID of the object to be displayed
27 The name of the form. Should be unique for the entire page.
29 =item server_side_script
31 The url of the server side script that handles the ajax requests
35 The name of the div to be used for displaying the forms.
39 The javascript variable name to be used in the form.
43 The semi-absolute url of the page that displays the form.
45 =item alternate_new_button
47 An alternate link for the 'new' button of the form.
54 Lukas Mueller <lam87@cornell.edu>, based on Perl code by Naama Menda.
68 $alternate_new_button => undef
71 <& /util/import_javascript.mas, classes => ["CXGN.Page.Form.JSFormPage", "MochiKit.Logging"] &>
75 <table><tr><td><div id="<% $form_div_name %>_buttons" >[loading edit links...]</div>
77 <table><tr><td><div id="<% $form_div_name %>" >[loading...]</div>
79 <script language="javascript" type="text/javascript">
81 var <% $js_object_name %> = new CXGN.Page.Form.JSFormPage( '<% $object_id %>' , '<% $object_type %>', '<% $server_side_script %>', '<% $form_div_name %>', '<% $js_object_name %>','<% $page_url %>');
82 % if (defined($alternate_new_button)) {
83 <% $js_object_name %>.setNewButton('<% $alternate_new_button %>');
85 <% $js_object_name %>.render();