[FIX] website_forum: use other attr than value to init select2
[odoo/odoo.git] / addons / website_forum / views / website_forum.xml
index 31b666c..abb5048 100644 (file)
     <xpath expr="." position="inside">
         <link rel='stylesheet' href="/web/static/lib/jquery.textext/jquery.textext.css"/>
         <link rel='stylesheet' href='/website_forum/static/src/css/website_forum.css'/>
-        <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
         <script type="text/javascript" src="/web/static/lib/jquery.textext/jquery.textext.js"/>
-        <!-- TODO in master - add select2 in asset front_end from website and remove from asset_editor. -->
         <script type="text/javascript" src="/web/static/lib/select2/select2.js"></script>
         <link rel="stylesheet" href="/web/static/lib/select2/select2.css"/>
         <link rel="stylesheet" href="/website/static/lib/select2-bootstrap-css/select2-bootstrap.css"/>
+        <script type="text/javascript" src="/website_forum/static/src/js/website_forum.js"/>
     </xpath>
 </template>
 
             <div t-if="not is_answer">
                 <br/>
                 <input type="hidden" name="tag_type" value="select2"/>
-                <input type="hidden" name="question_tag" class="form-control col-md-9 js_select2" placeholder="Tags" t-attf-value="#{tags}"/>
+                <input type="hidden" name="question_tag" class="form-control col-md-9 js_select2" placeholder="Tags" value="see data init value" t-attf-data-init-value="#{tags}"/>
                 <br/>
             </div>
             <button class="btn btn-primary btn-lg">Save</button>