X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Felements%2Fedit.html;h=de309ca3d0ddf241a10f14a26493f132b2020458;hb=73fc1e4f3a2100fdccbc5eace399b604c5645b5e;hp=33e4b0deec943a7968f21e3caae22743d33bfb61;hpb=1d84feb7fe821b547e211ad03e5c200c8f218797;p=freeside.git diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html index 33e4b0dee..de309ca3d 100644 --- a/httemplate/edit/elements/edit.html +++ b/httemplate/edit/elements/edit.html @@ -2,12 +2,12 @@ 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 # (deprecated, will be pluralized simplistically) - 'table' => + 'table' => #database table #? 'primary_key' => #required when the dbdef doesn't know...??? 'labels' => { @@ -36,18 +36,22 @@ Example: #fixed - display fixed value from object or here #fixed-country #fixed-state - 'value' => 'Y', #for checkbox, title, fixed, fixedhidden + 'value' => 'Y', #for checkbox, title, fixed, hidden '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,51 @@ 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 ) = @_; }, - - #run before display to return a different value - 'value_callback' => sub { my( $columname, $value ) = @_; }, + 'viewall_dir' => '', #'search' or 'browse', defaults to 'search' - #run before display to manipulate element of the 'fields' arrayref - 'field_callback' => sub { my( $cgi, $object, $field_hashref ) = @_; }, + # overrides default popurl(1)."process/$table.html" + 'post_url' => popurl(1).'process/something', - 'viewall_dir' => '', #'search' or 'browse', defaults to 'search' + # optional link to delete this object; primary key will be appended + 'delete_url' => $p.'misc/delete-something.html?', + + #we're in a popup (no title/menu/searchboxes) + 'popup' => 1, + + #if you need to access the submit button + 'submit_id' => 'mysubmitbuttonid', + + #we're embedded (rows only: no header at all, no html_init, no error + # display, no