Skip to content

Commit 9bd0eb2

Browse files
authored
cleanup account page 3 (#204)
* cleanup account page 3 * put back margin
1 parent d9d5b4d commit 9bd0eb2

File tree

1 file changed

+19
-26
lines changed

1 file changed

+19
-26
lines changed

webroot/panel/account.php

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -131,39 +131,33 @@
131131
}
132132

133133
if (!$isPI) {
134+
echo "
135+
<form
136+
action=''
137+
method='POST'
138+
id='piReq'
139+
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'
140+
>
141+
<input type='hidden' name='form_type' value='pi_request'/>
142+
";
134143
if ($SQL->accDeletionRequestExists($USER->getUID())) {
144+
echo "<input type='submit' value='Request PI Account' disabled />";
135145
echo "
136-
<form
137-
action=''
138-
method='POST'
139-
id='piReq'
140-
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'
141-
>
142-
<input type='hidden' name='form_type' value='pi_request'/>
143-
<input type='submit' value='Request PI Account' disabled />
144146
<label style='margin-left: 10px'>
145-
You cannot request PI Account while you have requested account deletion.
147+
You cannot request PI Account while you have requested account deletion.
146148
</label>
147-
</form>
148149
";
149-
} else {
150+
} elseif ($SQL->requestExists($USER->getUID())) {
151+
echo "<input type='submit' value='Request PI Account' disabled />";
150152
echo "
151-
<form
152-
action=''
153-
method='POST'
154-
id='piReq'
155-
onsubmit='return confirm(\"Are you sure you want to request a PI account?\")'
156-
>
157-
<input type='hidden' name='form_type' value='pi_request'/>
153+
<label style='margin-left: 10px'>
154+
Your request has been submitted and is currently pending
155+
</label>
158156
";
159-
if ($SQL->requestExists($USER->getUID())) {
160-
echo "<input type='submit' value='Request PI Account' disabled />";
161-
echo "<label style='margin-left: 10px'>Your request has been submitted and is currently pending</label>";
162-
} else {
163-
echo "<input type='submit' value='Request PI Account'/>";
164-
}
165-
echo "</form>";
157+
} else {
158+
echo "<input type='submit' value='Request PI Account'/>";
166159
}
160+
echo "</form>";
167161
}
168162
?>
169163

@@ -210,7 +204,6 @@
210204
</select>
211205
<br>
212206
<input id='submitLoginShell' type='submit' value='Set Login Shell' />
213-
<label id='labelSubmitLoginShell'> <!-- value set by JS --> </label>
214207
</form>
215208
<hr>
216209

0 commit comments

Comments
 (0)