Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! [ADD] …
Browse files Browse the repository at this point in the history
…portal_event_tickets
  • Loading branch information
em230418 committed Oct 14, 2024
1 parent 695d292 commit 94c678f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion portal_event_tickets/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"views/event_registration.xml",
"views/event_event.xml",
"data/mail_template_data.xml",
"views/assets.xml"
"views/assets.xml",
],
"qweb": [],
"demo": ["data/res_users_demo.xml"],
Expand Down
36 changes: 19 additions & 17 deletions portal_event_tickets/static/src/js/portal.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
odoo.define('portal_event_tickets.portal', function (require) {
'use strict';
odoo.define("portal_event_tickets.portal", function (require) {
"use strict";

var publicWidget = require('web.public.widget');
var publicWidget = require("web.public.widget");

publicWidget.registry.transferTicketWidget = publicWidget.Widget.extend({
selector: '#transfer_ticket',
selector: "#transfer_ticket",

start: function () {
var def = this._super.apply(this, arguments);

var event_name = this.$el.data("event-name");
var $modal = $('#modal_attendees_registration');
var $modal = $("#modal_attendees_registration");

/* show form inline */
$modal.find('form').attr('action', '/my/tickets/transfer/receive');
$modal.removeClass('modal fade');
/* Show form inline */
$modal.find("form").attr("action", "/my/tickets/transfer/receive");
$modal.removeClass("modal fade");

/* remove Cancel button; update title */
var $submit = $modal.find('[type=submit]');
/* Remove Cancel button; update title */
var $submit = $modal.find("[type=submit]");
$submit.parent().empty().append($submit);
$submit.text('Confirm');
$submit.text("Confirm");

/* remove Close button */
$modal.find('.close').remove();
/* Remove Close button */
$modal.find(".close").remove();

/* make email non-editable */
$modal.find('[name=1-email]').attr('disabled', '1');
/* Make email non-editable */
$modal.find("[name=1-email]").attr("disabled", "1");

/* update title */
$modal.find('h4.modal-title').html('Receive the ticket for <b>' + event_name + '</b>');
/* Update title */
$modal
.find("h4.modal-title")
.html("Receive the ticket for <b>" + event_name + "</b>");
return def;
},
});
Expand Down
5 changes: 4 additions & 1 deletion portal_event_tickets/views/assets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
<odoo>
<template id="assets_frontend" inherit_id="website.assets_frontend">
<xpath expr="//script[last()]" position="after">
<script type="text/javascript" src="/portal_event_tickets/static/src/js/portal.js"></script>
<script
type="text/javascript"
src="/portal_event_tickets/static/src/js/portal.js"
/>
</xpath>
</template>

Expand Down
2 changes: 1 addition & 1 deletion portal_event_tickets/views/portal_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@
name="transfer_ticket"
t-att-value="transfer_ticket.id"
type="hidden"
/>
/>
</t>
</div>
</t>
Expand Down

0 comments on commit 94c678f

Please sign in to comment.