mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
[IMP] project_acceptance: change on controllers and modal view available
H11043
This commit is contained in:
@@ -4,92 +4,75 @@
|
||||
<template id="portal_my_task_inherit" inherit_id="project.portal_my_task">
|
||||
<xpath expr="//div[@class='mt32']" position="before">
|
||||
|
||||
<!-- ###################################################################### -->
|
||||
<!-- The comment code is for modal views and to sign document for acceptance -->
|
||||
<!-- ###################################################################### -->
|
||||
|
||||
<!-- modal relative to the actions accept -->
|
||||
<!-- <div role="dialog" class="modal fade" id="modalaccept">
|
||||
<div role="dialog" class="modal fade" id="modalaccept">
|
||||
<div class="modal-dialog">
|
||||
<form id="accept" method="POST" t-att-data-order-id="task.id" t-att-data-token="task.access_token" class="js_accept_json modal-content js_website_submit_form">
|
||||
<form id="project_accept_modal" method="POST" t-att-action="task.get_portal_url(suffix='/accept')" enctype="multipart/form-data" class="modal-content">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
|
||||
<header class="modal-header">
|
||||
<h4 class="modal-title">Validate Task</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</header>
|
||||
<main class="modal-body" id="sign-dialog">
|
||||
|
||||
<main class="modal-body" id="accept-dialog">
|
||||
<p>
|
||||
<span>By signing this proposal, I agree to the task description:</span>
|
||||
<span>I agree to the task description:</span>
|
||||
<ul>
|
||||
<li><span>Accepted on the behalf of:</span> <b t-field="task.partner_id.commercial_partner_id"/></li>
|
||||
</ul>
|
||||
</p>
|
||||
<t t-call="portal.signature_form">
|
||||
<t t-set="call_url" t-value="task.get_portal_url(suffix='/accept')"/>
|
||||
<t t-set="default_name" t-value="task.partner_id.name"/>
|
||||
</t>
|
||||
</main>
|
||||
|
||||
<footer class="modal-footer">
|
||||
<button type="submit" t-att-id="task.id" class="btn btn-primary"><i class="fa fa-check"></i> Accept</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
</footer>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<!-- modal relative to the action reject -->
|
||||
<!-- <div role="dialog" class="modal fade" id="modaldecline">
|
||||
<div role="dialog" class="modal fade" id="modaldecline">
|
||||
<div class="modal-dialog">
|
||||
<form id="decline" method="POST" t-attf-action="/my/task/#{task.id}/decline?access_token=#{task.access_token}" class="modal-content">
|
||||
<form id="project_decline_modal" method="POST" t-att-action="task.get_portal_url(suffix='/decline')" enctype="multipart/form-data" class="modal-content">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
|
||||
<header class="modal-header">
|
||||
<h4 class="modal-title">Decline This Task</h4>
|
||||
<h4 class="modal-title">Validate Task</h4>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">×</button>
|
||||
</header>
|
||||
<main class="modal-body">
|
||||
|
||||
<main class="modal-body" id="sign-dialog">
|
||||
<p>
|
||||
Tell us why you are refusing this task, this will help us improve our services.
|
||||
<span>I agree to the task description:</span>
|
||||
<ul>
|
||||
<li><span>Declined on the behalf of:</span> <b t-field="task.partner_id.commercial_partner_id"/></li>
|
||||
</ul>
|
||||
</p>
|
||||
<textarea rows="4" name="decline_message" required="" placeholder="Your feedback..." class="form-control" />
|
||||
</main>
|
||||
|
||||
<footer class="modal-footer">
|
||||
<button type="submit" t-att-id="task.id" class="btn btn-danger"><i class="fa fa-times"></i> Decline</button>
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" t-att-id="task.id" class="btn btn-primary"><i class="fa fa-check"></i> Decline</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
||||
</footer>
|
||||
</form>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- Message on head for task cancelled state -->
|
||||
<!-- <div t-if="task.stage_id.name == 'cancelled'" class="alert alert-danger alert-dismissable d-print-none" role="alert">
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="close">×</button>
|
||||
<strong>This task has been canceled.</strong> <a role="button" href="#discussion"><i class="fa fa-comment"/> Contact us to get.</a>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div t-if="task.stage_id.requires_acceptance">
|
||||
<div class="row justify-content-center text-center d-print-none pt-1 pb-4">
|
||||
<div class="col-sm-auto mt8">
|
||||
<form id="accept" method="POST" t-attf-action="/my/task/#{task.id}/accept" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<button class="btn btn-primary" t-attf-href="#" style="color: #ffffff"><i class="fa fa-check"/> Accept</button>
|
||||
<!-- Modal button -->
|
||||
<!-- <a role="button" class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" href="#" style="color: #ffffff"><i class="fa fa-check"/> Accepted</a> -->
|
||||
</form>
|
||||
</div>
|
||||
<button class="btn btn-primary" data-toggle="modal" data-target="#modalaccept" t-attf-href="#" style="color: #ffffff"><i class="fa fa-check"/> Accept</button>
|
||||
</div>
|
||||
<div class="col-sm-auto mt8">
|
||||
<form id="decline" method="POST" t-attf-action="/my/task/#{task.id}/decline" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<button class="btn btn-danger" t-attf-href="#" style="color: #ffffff"> <i class="fa fa-stop-circle"/> Declined</button>
|
||||
<!-- Modal button -->
|
||||
<!-- <a role="button" class="btn btn-danger" data-toggle="modal" data-target="#modaldecline" href="#" style="color: #ffffff"> <i class="fa fa-stop-circle"/> Declined</a> -->
|
||||
</form>
|
||||
<button class="btn btn-danger" data-toggle="modal" data-target="#modaldecline" t-attf-href="#" style="color: #ffffff"> <i class="fa fa-stop-circle"/> Decline</button>
|
||||
</div>
|
||||
<div class="col-sm-auto mt8">
|
||||
<a role="button" class="btn btn-warning" href="#discussion" style="color: #ffffff"><i class="fa fa-comment"/> Feedback</a>
|
||||
<!-- Modal button -->
|
||||
<!-- <form id="decline" method="POST" t-attf-action="/my/task/#{task.id}/feedback" enctype="multipart/form-data">
|
||||
<input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"/>
|
||||
<a t-attf-href="#discussion">
|
||||
<button class="btn btn-warning" style="color: #ffffff"><i class="fa fa-comment"/> Feedback</button>
|
||||
</a>
|
||||
</form> -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user