-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] portal_event_tickets: Migration to 17.0
- Loading branch information
1 parent
a3b871b
commit 504d3bc
Showing
11 changed files
with
155 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** @odoo-module **/ | ||
|
||
import publicWidget from "@web/legacy/js/public/public_widget"; | ||
|
||
publicWidget.registry.TransferTicketWidget = publicWidget.Widget.extend({ | ||
selector: "#transfer_ticket", | ||
|
||
async willStart() { | ||
await this._super(...arguments); | ||
|
||
const event_name = this.$el.data("event-name"); | ||
const $modal = $("#modal_attendees_registration"); | ||
|
||
/* 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]"); | ||
$submit.parent().empty().append($submit); | ||
$submit.text("Confirm"); | ||
|
||
/* Remove Close button */ | ||
$modal.find(".close").remove(); | ||
|
||
/* 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>"); | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
30 changes: 30 additions & 0 deletions
30
portal_event_tickets/static/src/js/ticket_transfer.tour.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** @odoo-module **/ | ||
|
||
import {registry} from "@web/core/registry"; | ||
|
||
registry.category("web_tour.tours").add("ticket_transfer_receive", { | ||
test: true, | ||
url: "/my/tickets/transfer/receive", | ||
steps: () => [ | ||
{ | ||
content: "Fill attendees details", | ||
trigger: "input[type='email']", | ||
run: function () { | ||
// Fill: | ||
// * phone (optional) | ||
$("input[name^='1-phone']").val("111 111"); | ||
}, | ||
}, | ||
{ | ||
content: "Validate attendees details", | ||
trigger: 'button:contains("Confirm")', | ||
}, | ||
{ | ||
content: "We are redirected to /my/tickets page", | ||
trigger: ".breadcrumb-item:contains(Tickets)", | ||
run: function () { | ||
// It's needed to don't make a click on the link | ||
}, | ||
}, | ||
], | ||
}); |
40 changes: 0 additions & 40 deletions
40
portal_event_tickets/static/src/js/ticket_transfer.tour.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.