snippets.xml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <template id="ehtml_editor" inherit_id="website.assets_editor" name="eHTML Resources">
  5. <xpath expr="/t" position="inside">
  6. <script type="text/javascript" src="/entity_html_form/static/src/js/ehtml_editor.js" />
  7. </xpath>
  8. </template>
  9. <template id="ehtml" inherit_id="website.snippets" name="eHTML Forms Snippet">
  10. <xpath expr="//div[@id='snippet_structure']" position="inside">
  11. <div>
  12. <div class="oe_snippet_thumbnail">
  13. <img class="oe_snippet_thumbnail_img" src="/entity_html_form/static/src/img/ui/snippet_thumb_form.jpg"/>
  14. <span class="oe_snippet_thumbnail_title">HTML Form(Alpha)</span>
  15. </div>
  16. <section class="oe_snippet_body ehtml_form">
  17. <div class="container">
  18. <div class="row">
  19. My Form
  20. <form method="POST" action="/form/myinsert">
  21. <div id="ehtml_fields" class="oe_structure">
  22. </div>
  23. <input type="submit" class="btn btn-primary btn-lg" value="Send"/>
  24. </form>
  25. </div>
  26. </div>
  27. </section>
  28. </div>
  29. </xpath>
  30. <xpath expr="//div[@id='snippet_options']" position="inside">
  31. <div data-snippet-option-id='ehtml'
  32. data-selector=".ehtml_form"
  33. data-selector-siblings="p, h1, h2, h3, blockquote, .well, .panel"
  34. >
  35. <li>
  36. <a href="#" class="button">Change Form Settings</a>
  37. </li>
  38. </div>
  39. </xpath>
  40. </template>
  41. <template id="ehtml_field" inherit_id="website.snippets" name="eHTML Field Snippet">
  42. <xpath expr="//div[@id='snippet_structure']" position="inside">
  43. <div>
  44. <div class="oe_snippet_thumbnail">
  45. <img class="oe_snippet_thumbnail_img" src="/entity_html_form/static/src/img/ui/snippet_thumb_field.jpg"/>
  46. <span class="oe_snippet_thumbnail_title">HTML Form Field Snippet(Alpha)</span>
  47. </div>
  48. <section class="oe_snippet_body ehtml_form_field">
  49. <div class="form-group">
  50. <label for="field1">Field 1</label>
  51. <input type="text" class="form-control" id="field1" name="field1"/>
  52. </div>
  53. </section>
  54. </div>
  55. </xpath>
  56. <xpath expr="//div[@id='snippet_options']" position="inside">
  57. <div data-snippet-option-id='ehtml_field'
  58. data-selector=".ehtml_form_field"
  59. data-selector-siblings="form"
  60. >
  61. <li>
  62. <a href="#" class="button">Change Field Settings</a>
  63. </li>
  64. </div>
  65. </xpath>
  66. </template>
  67. </data>
  68. </openerp>