Editing
Variable-Length Line Item Edits
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Markup === Create PHP include files containing markup to display & edit the line items. ==== Line item group container ==== One `div` (or `section`) to act as a container for the line items. * This `div` should be outside the include file for the individual line items, either in its own include file, or placed directly in the details and editing include file. * CSS class is `line-items-container`. * Include a `button` for adding new line items (class `add-line-btn`). ** CSS class is `add-line-btn`. ** `data-pid` attribute contains the parent record's id. ** `data-type` attribute contains the name of the PHP class that will be used to save edits to the line. ==== Individual flattened line items ==== The line item is placed in a container `div`. * CSS class `line-item` to enable double-clicks to edit the item. (That's the default CSS class. It can be overridden within the $.lineitem library's settings.) * `data-type` with the name of the PHP class. * `data-id` with the record id of the line item. * (optional) `title` attribute to give some indication that the element is clickable. ==== Line item edit form ==== * `div` container with `line-item` CSS class. * `form` element * Hidden input with `name="<?=P_COMMIT ?>"` and `value="1"` * Hidden input with `name="class"` with the PHP class's name as its value. * Hidden inputs storing record id and parent id values. * Form inputs for each of the object's properties. * Submit buttons include: `[COMMON_TEMPLATE_DIR]forms/ajax/edit_line_item_submit_buttons.php` ==== Line item deletion confirmation form ==== * `div` container with `line-item` and `delete-confirmation` CSS classes. * `form` element * Hidden input with `name="<?=P_COMMIT ?>"` and `value="1"` * Hidden input with `name="class"` with the PHP class's name as its value. * Plain text description of the line item, optionally inside of an element with `infoblock` as its CSS class. * Submit buttons include: `[COMMON_TEMPLATE_DIR]forms/ajax/delete_line_item_submit_buttons.php`
Summary:
Please note that all contributions to Littledamien Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Littledamien Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information