You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
2.4 KiB
48 lines
2.4 KiB
<?xml version="1.0" encoding="utf-8" ?>
|
|
<!-- Add button for chatgpt into composer in discuss -->
|
|
<templates name="ChatGpt" id="chatgpt" xml:space="preserve">
|
|
<t t-name="ChatGptChatter" t-inherit="mail.Composer"
|
|
t-inherit-mode="extension" owl="1">
|
|
<xpath expr="//button[hasclass('o_Composer_buttonAttachment')]"
|
|
position="after">
|
|
<button class="o_Composer_button o_Composer_toolButton btn btn-light btn border-0 rounded-pill"
|
|
id="onClickGPTChatter" title="GPT" aria-label="GPT"
|
|
type="button"
|
|
t-on-click="onClickGPT">GPT
|
|
</button>
|
|
<center>
|
|
<div class="modal" id="myModal" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header"><br/><br/>
|
|
<input type="text" class="question_chat" t-ref="Question"
|
|
style="height:48px;"
|
|
placeholder="Request Message"/>
|
|
<button class="btn btn-secondary"
|
|
t-on-click="_send_message" style="height:48px;">
|
|
<span>Request</span>
|
|
<i class="fa fa-paper-plane fa-lg replace"/>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<textarea type="text" class="answer_chat"
|
|
t-ref="answer" style=""/><br/>
|
|
<button t-on-click="_insert_message"
|
|
class="btn btn-primary">
|
|
<span>Insert</span>
|
|
<i class="fa fa-paper-plane fa-lg replace"/>
|
|
</button>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button"
|
|
t-on-click="_close_modal"
|
|
class="btn btn-secondary"
|
|
data-dismiss="modal">Close</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</center>
|
|
</xpath>
|
|
</t>
|
|
</templates>
|
|
|