X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fedit%2Felements%2Fedit.html;h=f9d13838093b4fd113ac60f36b6b4cc3cb4c4a60;hb=f8066fa6a33f4ac33beec675b17de96c8c0a274b;hp=617855888a9b6ce0555988afe6443deb7d149184;hpb=455556cc709f205cb63d42cfe941bb874f36c2f5;p=freeside.git diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 617855888..f9d138380 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -2,7 +2,7 @@ Example: - include( 'elements/edit.html', + <& elements/edit.html, 'name_singular' => #singular name for the record # (preferred, will be pluralized automatically) 'name' => #name for the record @@ -40,14 +40,18 @@ Example: 'disabled' => 0, 'onchange' => 'javascript_function', - #m2 stuff only tested w/selectlayers so far - #might work w/select too, dunno others + 'include_opt_callback' => sub { my $object = @_; + ( 'option' => 'value', ); + }, + 'm2name_table' => 'table_name', 'm2name_namecol' => 'name_column', #OR# 'm2m_method' => #'m2m_srccol' => #opt, if not the same as this table 'm2m_dstcol' => #required for now, eventuaully opt, if not the same as target table + #OR# + 'o2m_table' => 'm2_label' => 'Label', # 'm2_new_default' => \@table_name_objects, #default @@ -91,34 +95,38 @@ Example: 'menubar' => '', #menubar arrayref #agent virtualization - 'agent_virt' => 1, - 'agent_null_right' => 'Access Right Name', - - #run when re-displaying with an error - 'error_callback' => sub { my( $cgi, $object, $fields_listref, $opt_hashref ) = @_; }, - - #run when editing - 'edit_callback' => sub { my( $cgi, $object, $fields_listref ) = @_; }, - - # returns a hashref for the new object - 'new_hashref_callback' + 'agent_virt' => 1, + 'agent_null' => 1, #if true, always allow no-agentnum globals + 'agent_null_right' => 'Access Right Name', + 'agent_clone_extra_sql' => '', #if provided, this overrides the extra_sql + #implementing agent virt, for clone + #operations. i.e. pass "1=1" to allow + #cloning anything - # returns the new object iself (otherwise, ->new is called) - 'new_object_callback' - - #run when adding - 'new_callback' => sub { my( $cgi, $object, $fields_listref, $optref ) = @_; }, + 'viewall_dir' => '', #'search' or 'browse', defaults to 'search' - #run when cloning - 'clone_callback' => sub { my( $cgi, $object, $fields_listref, $optref ) = @_; }, - - #run before display to return a different value - 'value_callback' => sub { my( $columname, $value ) = @_; }, + # overrides default popurl(1)."process/$table.html" + 'post_url' => popurl(1).'process/something', - #run before display to manipulate element of the 'fields' arrayref - 'field_callback' => sub { my( $cgi, $object, $field_hashref ) = @_; }, + # optional link to delete this object; primary key will be appended + 'delete_url' => $p.'misc/delete-something.html?', - 'viewall_dir' => '', #'search' or 'browse', defaults to 'search' + #we're in a popup (no title/menu/searchboxes) + 'popup' => 1, + + #we're embedded (rows only: no header at all, no html_init, no error + # display, no