Skip to content

Commit

Permalink
[FIX, IMP] website_formio: Show the complete (resized) Form, after dr…
Browse files Browse the repository at this point in the history
…opping on the webpage!

Only list published Form Builders in the drag&drop selectbox (Form chooser).
  • Loading branch information
bobslee committed Jan 19, 2021
1 parent ea1c269 commit 7aadfe7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion website_formio/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
'name': 'Forms | Website (Snippet etc)',
'summary': 'Forms Snippet, Other website integration',
'version': '1.4',
'version': '1.5',
'license': 'LGPL-3',
'author': 'Nova Code',
'website': 'https://www.novacode.nl',
Expand Down
9 changes: 9 additions & 0 deletions website_formio/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ <h4 class="oe_mb16 text-center">Website - Form on webpage</h4>
<section class="oe_container oe_dark">
<div class="oe_row oe_spaced">
<h2 class="oe_slogan" style="color:#875A7B;">Releases</h2>
<h4 class="oe_mb16">1.5</h4>
<ul>
<li>
Fix: Show the complete (resized) Form, after dropping on the webpage!
</li>
<li>
Only list published Form Builders in the drag&amp;drop selectbox (Form chooser).
</li>
</ul>
<h4 class="oe_mb16">1.4</h4>
<ul>
<li>
Expand Down
3 changes: 2 additions & 1 deletion website_formio/static/src/js/website_formio_editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ odoo.define('website_formio_editor', function (require) {
return rpc.query({
model: 'formio.builder',
method: 'search_read',
args: [[['public', '=', true]],['uuid', 'display_name_full']],
args: [[['public', '=', true], ['state', '=', 'CURRENT']],['uuid', 'display_name_full']],
context: self.options.recordInfo.context,
}).then(function (formio_builders) {
var def = wUtils.prompt({
Expand All @@ -40,6 +40,7 @@ odoo.define('website_formio_editor', function (require) {
var form_iframe = self.$target.find('.formio_form_iframe_container iframe'),
iframe_src = '/formio/public/form/create/' + result.val;
form_iframe.attr("src", iframe_src);
iFrameResize({}, '.formio_form_embed');
});
});
},
Expand Down

0 comments on commit 7aadfe7

Please sign in to comment.