Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6437 from ochameau/csp-ftu
Browse files Browse the repository at this point in the history
Bug 796739: [ftu] fix CSP violation r=fcampo
  • Loading branch information
ochameau committed Nov 29, 2012
2 parents a557af6 + 665165f commit 4f5f66d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/communications/ftu/index.html
Expand Up @@ -134,10 +134,10 @@ <h2 id="time-zone-title">
GMT +00:00 Greenwich Mean Time
</h2>
</section>
<form data-type="list" onsubmit="return false;">
<form id="time-form" data-type="list">
<ul>
<li>
<button class="change icon icon-dialog" data-l10n-id="change">
<button class="change icon icon-dialog" data-l10n-id="change" type="button">
Change
</button>
<p id="timezone-configuration-label">GMT +00:00</p>
Expand Down Expand Up @@ -166,14 +166,14 @@ <h2 id="time-zone-title">
</select>
</li>
<li>
<button class="change icon icon-dialog" data-l10n-id="change">
<button class="change icon icon-dialog" data-l10n-id="change" type="button">
Change
</button>
<p id="date-configuration-label"></p>
<input id="date-configuration" class="invisible" type="date"></input>
</li>
<li>
<button class="change icon icon-dialog" data-l10n-id="change">
<button class="change icon icon-dialog" data-l10n-id="change" type="button">
Change
</button>
<p id="time-configuration-label">00:00</p>
Expand Down
8 changes: 8 additions & 0 deletions apps/communications/ftu/js/ui.js
Expand Up @@ -100,6 +100,10 @@ var UIManager = {
delete this.buttonSkip;
return this.buttonSkip = document.getElementById('skip');
},
get timeForm() {
delete this.timeForm;
return this.timeForm = document.getElementById('time-form');
},
init: function ui_init() {
var currentDate = new Date();
var f = new navigator.mozL10n.DateTimeFormat();
Expand Down Expand Up @@ -127,6 +131,10 @@ var UIManager = {
Tutorial.init();
});
this.fakeSimPin.addEventListener('input', this);
// Prevent form submit in case something try to send it
this.timeForm.addEventListener('submit', function (event) {
event.preventDefault();
});
},
handleEvent: function ui_handleEvent(event) {
switch (event.target.id) {
Expand Down

0 comments on commit 4f5f66d

Please sign in to comment.