Skip to content

Commit 4c14eef

Browse files
authored
add closing slashes, indentation (#202)
1 parent f0795fa commit 4c14eef

File tree

1 file changed

+58
-35
lines changed

1 file changed

+58
-35
lines changed

webroot/panel/account.php

Lines changed: 58 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -122,34 +122,49 @@
122122
} elseif ($isActive) {
123123
echo "<p>You are curently a <strong>user</strong> on the Unity Cluster</p>";
124124
} else {
125-
echo "<p>You are currently not assigned to any PI, and will be
126-
<strong>unable to use the cluster</strong>. Go to the <a href='groups.php'>My PIs</a>
127-
page to join a PI, or click on the button below if you are a PI</p>";
128-
echo "<p>Students should not request a PI account.</p>";
125+
echo "
126+
<p>
127+
You are currently not assigned to any PI, and will be
128+
<strong>unable to use the cluster</strong>.
129+
Go to the
130+
<a href='groups.php'>My PIs</a>
131+
page to join a PI, or click on the button below if you are a PI.
132+
</p>
133+
<p>Students should not request a PI account.</p>
134+
";
129135
}
130136

131137
if (!$isPI) {
132138
if ($SQL->accDeletionRequestExists($USER->getUID())) {
133-
echo
134-
"<form action='' method='POST' id='piReq'
135-
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'>
136-
<input type='hidden' name='form_type' value='pi_request'>";
137-
echo "<input type='submit' value='Request PI Account' disabled>";
138-
echo
139-
"<label style='margin-left: 10px'>
139+
echo "
140+
<form
141+
action=''
142+
method='POST'
143+
id='piReq'
144+
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'
145+
>
146+
<input type='hidden' name='form_type' value='pi_request'/>
147+
<input type='submit' value='Request PI Account' disabled />
148+
<label style='margin-left: 10px'>
140149
You cannot request PI Account while you have requested account deletion.
141-
</label>";
142-
echo "</form>";
150+
</label>
151+
</form>
152+
";
143153
} else {
144-
echo
145-
"<form action='' method='POST' id='piReq'
146-
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'>
147-
<input type='hidden' name='form_type' value='pi_request'>";
154+
echo "
155+
<form
156+
action=''
157+
method='POST'
158+
id='piReq'
159+
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'
160+
>
161+
<input type='hidden' name='form_type' value='pi_request'/>
162+
";
148163
if ($SQL->requestExists($USER->getUID())) {
149-
echo "<input type='submit' value='Request PI Account' disabled>";
164+
echo "<input type='submit' value='Request PI Account' disabled />";
150165
echo "<label style='margin-left: 10px'>Your request has been submitted and is currently pending</label>";
151166
} else {
152-
echo "<input type='submit' value='Request PI Account'>";
167+
echo "<input type='submit' value='Request PI Account'/>";
153168
}
154169
echo "</form>";
155170
}
@@ -169,13 +184,16 @@
169184
for ($i = 0; $sshPubKeys != null && $i < count($sshPubKeys); $i++) { // loop through keys
170185
echo
171186
"<div class='key-box'>
172-
<textarea spellcheck='false' readonly>" . $sshPubKeys[$i] . "</textarea>
173-
<form action='' id='del-" . $i . "'
174-
onsubmit='return confirm(\"Are you sure you want to delete this SSH key?\");' method='POST'>
175-
<input type='hidden' name='delIndex' value='$i'>
176-
<input type='hidden' name='form_type' value='delKey'>
177-
<input type='submit' value='&times;'>
178-
</form>
187+
<textarea spellcheck='false' readonly>" . $sshPubKeys[$i] . "</textarea>
188+
<form
189+
action='' id='del-" . $i . "'
190+
onsubmit='return confirm(\"Are you sure you want to delete this SSH key?\");'
191+
method='POST'
192+
>
193+
<input type='hidden' name='delIndex' value='$i' />
194+
<input type='hidden' name='form_type' value='delKey' />
195+
<input type='submit' value='&times;' />
196+
</form>
179197
</div>";
180198
}
181199

@@ -186,7 +204,7 @@
186204
<hr>
187205

188206
<form action="" method="POST">
189-
<input type="hidden" name="form_type" value="loginshell">
207+
<input type="hidden" name="form_type" value="loginshell" />
190208
<select id="loginSelector" name="shellSelect">
191209
<?php
192210
foreach ($CONFIG["loginshell"]["shell"] as $shell) {
@@ -202,11 +220,11 @@
202220
type='text'
203221
placeholder='Enter login shell path (ie. /bin/bash)'
204222
name='shell'
205-
>
223+
/>
206224
";
207225
?>
208226
<br>
209-
<input id='submitLoginShell' type='submit' value='Set Login Shell'>
227+
<input id='submitLoginShell' type='submit' value='Set Login Shell' />
210228
</form>
211229
<hr>
212230

@@ -217,15 +235,20 @@
217235
if ($hasGroups) {
218236
echo "<p>You cannot request to delete your account while you are in a PI group.</p>";
219237
} else {
220-
echo
221-
"<form action='' method='POST' id='accDel'
222-
onsubmit='return confirm(\"Are you sure you want to request an account deletion?\")'>
223-
<input type='hidden' name='form_type' value='account_deletion_request'>";
238+
echo "
239+
<form
240+
action=''
241+
method='POST'
242+
id='accDel'
243+
onsubmit='return confirm(\"Are you sure you want to request an account deletion?\")'
244+
>
245+
<input type='hidden' name='form_type' value='account_deletion_request' />
246+
";
224247
if ($SQL->accDeletionRequestExists($USER->getUID())) {
225-
echo "<input type='submit' value='Request Account Deletion' disabled>";
248+
echo "<input type='submit' value='Request Account Deletion' disabled />";
226249
echo "<label style='margin-left: 10px'>Your request has been submitted and is currently pending</label>";
227250
} else {
228-
echo "<input type='submit' value='Request Account Deletion'>";
251+
echo "<input type='submit' value='Request Account Deletion' />";
229252
}
230253
echo "</form>";
231254
}

0 commit comments

Comments
 (0)