UNPKG

@itrocks/edit

Version:

Generic action-based object edit form in HTML and JSON

50 lines (47 loc) 1.3 kB
<!DOCTYPE html> <html lang="en"> <head> <link href="../../action-bar/action.css" rel="stylesheet"> <link href="../../output/css/output.css" rel="stylesheet"> <link href="../../save/css/action.css" rel="stylesheet"> <link href="../../ux-core/css/app.css" rel="stylesheet"> <link href="../../ux-core/css/article.css" rel="stylesheet"> <link href="../css/edit.css" rel="stylesheet"> <meta charset="utf-8"> <title>{.action.ucFirst} {@output}</title> </head> <body> <main> <!--BEGIN--> <!--#main--> <form action="app://(@route)/save" autocomplete="off" data-action="edit" data-class="{%name}" data-id="{?id}" data-route="{@route}" data-if="{%hasFileProperty}" enctype="multipart/form-data" data-end method="post" target="#notifications:prepend" > <header> <h2>{.action.ucFirst} {@output}</h2> <ul class="general actions"> <li class="close"><a href="app://(@route)" target="main">Close</a></li> <li class="save"><input type="submit" value="Save"></li> <!--id?--> <!--.actions--> <li class="{action}">{{template}}</li> <!--end--> <!--end--> </ul> </header> <ul class="object properties"> <!--%properties--> <li data-property="{name}"> {edit} </li> <!--end--> </ul> </form> <!--#end--> <!--END--> </main> </body> </html>