source: indico/indico/MaKaC/plugins/Collaboration/tpls/ElectronicAgreementForm.tpl @ 35c7ed

hello-world-walkthroughipv6v0.98-seriesv0.98.2v0.98.3v0.98b2v0.99v1.0v1.1
Last change on this file since 35c7ed was 35c7ed, checked in by Pedro Ferreira <jose.pedro.ferreira@…>, 23 months ago

[FIX] Moved HTML to TPLs

  • Several other fixes, include i18n true lazy strings;
  • Also replaced most old JS code with jQuery;
  • Property mode set to 100644
File size: 4.2 KB
Line 
1% if not error:
2    <script>
3    function getChoice(){
4        chosen = "";
5        len = document.choiceButton.EAChoice.length;
6        for (i = 0; i<len; i++){
7            if (document.choiceButton.EAChoice[i].checked)
8                chosen = document.choiceButton.EAChoice[i].value;
9        }
10
11        if(chosen == ""){
12            return "None";
13        }else{
14            return chosen;
15        }
16    }
17    function signEA(){
18        choice = getChoice();
19
20        if(choice == "accept"){
21            // Update and store info, popup confirmation and redirect to event page.
22            acceptElectronicAgreement(${conf.getId()}, "${authKey}", "${linkToEvent}");
23        }else if(choice == "refuse"){
24            // Popup window asking for the rejection reason...
25            rejectElectronicAgreement(${conf.getId()}, "${authKey}", "${linkToEvent}");
26        }else{
27            var dialog = new WarningPopup($T("Warning"), $T("No choice selected! Please select one."));
28            dialog.open();
29        }
30    }
31    </script>
32        <div class="EATitle">Electronic Agreement</div>
33        <div ${'style="margin: 0 10%;"' if conf.getType() != 'conference' else ''}>
34            <div class="EAContent">
35              <div class="EAFormSection">
36                <p>Dear ${speaker.getDirectFullName()},</p>
37                <p>you have been contacted because you have been scheduled to give a talk for the following event:</p>
38                <table class="EATable">
39                  <tr>
40                    <td class="EAInfo">Event Title:</td>
41                    <td>${conf.getTitle()}</td>
42                  </tr>
43                  <tr>
44                    <td class="EAInfo">Held on:</td>
45                    <td>${confDate}</td>
46                  </tr>
47                  <tr>
48                    <td class="EAInfo">Place:</td>
49                    <td>${locationText}</td>
50                  </tr>
51
52                % if showContributionInfo:
53                </table>
54                <p>Your contribution details are the following:</p>
55                <table class="EATable">
56                  <tr>
57                    <td class="EAInfo">Talk:</td>
58                    <td>${cont.getTitle()}</td>
59                  </tr>
60                  % if cont.getDescription():
61                  <tr>
62                    <td class="EAInfo">Description:</td>
63                    <td>${cont.getDescription()}</td>
64                  </tr>
65                  % endif
66                  <tr>
67                    <td class="EAInfo">Scheduled on:</td>
68                    <td>${contDate}</td>
69                  </tr>
70                  <tr>
71                    <td class="EAInfo">Place:</td>
72                    <td>${locationText}</td>
73                  </tr>
74                </table>
75                % endif
76                </table>
77              </div>
78              <div class="EAFormSection">
79                <div>
80                  <p>${requestText}</p>
81                  <p>[blablablabla]</p>
82                </div>
83                <form name="choiceButton" class="EAChoiceButton">
84                  <div><input type="radio" name="EAChoice" value="accept">I confirm that I read the Electronic Agreement form and <strong>accept</strong>.</input></div>
85                  <div><input type="radio" name="EAChoice" value="refuse">I confirm that I read the Electronic Agreement form but I <strong>refuse</strong>.</input></div>
86                  <div><input type="button" name="sendChoice" value="Submit" onclick="return signEA()"/></div>
87                </form>
88              </div>
89              </div>
90            </div>
91% elif error == 'Already Submitted':
92        <div class="EATitle">Electronic Agreement</div>
93        <div ${'style="margin: 0 10%;"' if conf.getType() != 'conference' else ''}>
94            <div class="EAContent">
95                <div class="EAFormSection">
96                  <p>Dear ${speaker.getDirectFullName()},</p>
97                  <p>${outcomeText}</p>
98                  <p>Thus, you don't have access to this page anymore. Therefore, if you want to modify your choice, you have to contact the manager.</p>
99
100                </div>
101            </div>
102        </div>
103% elif error == 'Error':
104    ${"Sorry, there was an error, please go back and try again." | _}
105% endif
Note: See TracBrowser for help on using the repository browser.