Skip to content

Commit bf04e30

Browse files
Add mail generation form for non aaf members apply for vho account
1 parent 654387f commit bf04e30

3 files changed

Lines changed: 97 additions & 12 deletions

File tree

content/en/docs/user-guides/getting-started/non-aaf-members.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,9 @@ XNAT uses AAF for login. QCIF/QRIScloud can provide AAF Virtual Home (VHO) accou
2323
#### Step 1
2424
Open a ticket with RCC support to request an AAF account
2525

26-
_Example below (replace __________ with your details)_
26+
Fill in your details below and click to send a pre-filled email to RCC support
2727

28-
{{< card header="**To:** rcc-support@uq.edu.au" subtitle="**Subject:** XNAT AAF account for project __________" >}}
29-
Hello RCC support
30-
31-
I require an AAF account to access the UQ AIS XNAT service<br>
32-
33-
My details are below<br>
34-
Organisation: __________<br>
35-
Data Acquisition Site: __________<br>
36-
{{< /card >}}
28+
{{< email-aaf-request-form >}}
3729

3830
#### Step 2
3931
AAF's VHO account will return an email regarding the VHO account registration process
@@ -52,7 +44,7 @@ This is the link to the UQ AIS XNAT. If you have been provided with a project sp
5244

5345

5446
#### Step 2
55-
Login in with the AAF Single sign-on button (_See below_).
47+
Log in with the AAF Single sign-on button (_See below_).
5648

5749
<img src="/docs/user-guides/logging-into-xnat/xnat-aaf-login-page.png" width="100%" style="border: 1px solid #ddd"></img>
5850

content/en/docs/user-guides/getting-started/other-aaf-members.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This is the link to the UQ AIS XNAT. If you have been provided with a project sp
2929
{{% /alert %}}
3030

3131
#### Step 2
32-
Login in with the AAF Single sign-on button (_See below_).
32+
Log in with the AAF Single sign-on button (_See below_).
3333

3434
Follow the AAF login process for your organisation
3535

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
<div class="card mb-4">
2+
<div class="card-body">
3+
<div class="form-group mb-3">
4+
<label for="aaf-project-{{ .Ordinal }}"><strong>XNAT Project Name</strong></label>
5+
<input type="text" class="form-control mt-1" id="aaf-project-{{ .Ordinal }}" placeholder="e.g. MyProject">
6+
</div>
7+
<div class="form-group mb-3">
8+
<label for="aaf-org-{{ .Ordinal }}"><strong>Organisation</strong></label>
9+
<input type="text" class="form-control mt-1" id="aaf-org-{{ .Ordinal }}" placeholder="e.g. QLD Health">
10+
</div>
11+
<div class="form-group mb-3">
12+
<label for="aaf-site-{{ .Ordinal }}"><strong>Data Acquisition Site</strong></label>
13+
<input type="text" class="form-control mt-1" id="aaf-site-{{ .Ordinal }}" placeholder="e.g. HIRF, CAI, TRI">
14+
</div>
15+
16+
<div id="aaf-output-{{ .Ordinal }}" style="display:none;">
17+
<table class="table table-bordered mb-3">
18+
<tr>
19+
<th style="width:80px;">To</th>
20+
<td>rcc-support@uq.edu.au</td>
21+
<td style="width:70px; text-align:center; vertical-align:middle;">
22+
<button class="btn btn-sm btn-outline-secondary" id="aaf-copy-to-{{ .Ordinal }}">Copy</button>
23+
</td>
24+
</tr>
25+
<tr>
26+
<th>Subject</th>
27+
<td><span id="aaf-subject-{{ .Ordinal }}"></span></td>
28+
<td style="width:70px; text-align:center; vertical-align:middle;">
29+
<button class="btn btn-sm btn-outline-secondary" id="aaf-copy-subject-{{ .Ordinal }}">Copy</button>
30+
</td>
31+
</tr>
32+
<tr>
33+
<th>Body</th>
34+
<td><span id="aaf-body-{{ .Ordinal }}" style="white-space:pre-line;"></span></td>
35+
<td style="width:70px; text-align:center; vertical-align:middle;">
36+
<button class="btn btn-sm btn-outline-secondary" id="aaf-copy-body-{{ .Ordinal }}">Copy</button>
37+
</td>
38+
</tr>
39+
</table>
40+
<a id="aaf-mailto-{{ .Ordinal }}" class="btn btn-primary" href="#" role="button">
41+
Open in Email Client
42+
</a>
43+
</div>
44+
</div>
45+
</div>
46+
47+
<script>
48+
(function() {
49+
var ord = '{{ .Ordinal }}';
50+
var projectInput = document.getElementById('aaf-project-' + ord);
51+
var orgInput = document.getElementById('aaf-org-' + ord);
52+
var siteInput = document.getElementById('aaf-site-' + ord);
53+
var output = document.getElementById('aaf-output-' + ord);
54+
var subjectEl = document.getElementById('aaf-subject-' + ord);
55+
var bodyEl = document.getElementById('aaf-body-' + ord);
56+
var mailto = document.getElementById('aaf-mailto-' + ord);
57+
58+
function getSubject() {
59+
return 'XNAT AAF account for project ' + projectInput.value.trim();
60+
}
61+
function getBody() {
62+
return 'Hello RCC support,\n\nI require an AAF account to access the UQ AIS XNAT service.\n\nMy details are below:\nOrganisation: ' + orgInput.value.trim() + '\nData Acquisition Site: ' + siteInput.value.trim() + '\n\nThank you';
63+
}
64+
65+
function update() {
66+
var project = projectInput.value.trim();
67+
var org = orgInput.value.trim();
68+
var site = siteInput.value.trim();
69+
if (project && org && site) {
70+
subjectEl.textContent = getSubject();
71+
bodyEl.textContent = getBody();
72+
mailto.href = 'mailto:rcc-support@uq.edu.au?subject=' + encodeURIComponent(getSubject()) + '&body=' + encodeURIComponent(getBody() + '\n');
73+
output.style.display = 'block';
74+
} else {
75+
output.style.display = 'none';
76+
}
77+
}
78+
79+
projectInput.addEventListener('input', update);
80+
orgInput.addEventListener('input', update);
81+
siteInput.addEventListener('input', update);
82+
83+
document.getElementById('aaf-copy-to-' + ord).addEventListener('click', function() {
84+
navigator.clipboard.writeText('rcc-support@uq.edu.au');
85+
});
86+
document.getElementById('aaf-copy-subject-' + ord).addEventListener('click', function() {
87+
navigator.clipboard.writeText(getSubject());
88+
});
89+
document.getElementById('aaf-copy-body-' + ord).addEventListener('click', function() {
90+
navigator.clipboard.writeText(getBody());
91+
});
92+
})();
93+
</script>

0 commit comments

Comments
 (0)