|
209 | 209 | "; |
210 | 210 | echo $CSRFTokenHiddenFormInput; |
211 | 211 | if ($SQL->accDeletionRequestExists($USER->uid)) { |
212 | | - echo "<input type='submit' value='Request PI Account' disabled />"; |
213 | 212 | echo " |
214 | | - <label style='margin-left: 10px'> |
215 | | - You cannot request PI Account while you have requested account deletion. |
216 | | - </label> |
| 213 | + <input |
| 214 | + type='submit' |
| 215 | + value='Request PI Account' |
| 216 | + title='You cannot request PI Account while you have requested account deletion.' |
| 217 | + disabled |
| 218 | + /> |
217 | 219 | "; |
218 | 220 | } else { |
219 | 221 | if ($SQL->requestExists($USER->uid, UnitySQL::REQUEST_BECOME_PI)) { |
|
296 | 298 | "; |
297 | 299 |
|
298 | 300 | if ($hasGroups) { |
299 | | - echo "<p>You cannot request to delete your account while you are in a PI group.</p>"; |
| 301 | + $request_account_deletion_disabled = "disabled"; |
| 302 | + $request_account_deletion_title = "You cannot request to delete your account while you are in a PI group."; |
300 | 303 | } else { |
301 | | - if ($SQL->accDeletionRequestExists($USER->uid)) { |
302 | | - echo " |
303 | | - <p>Your request has been submitted and is currently pending.</p> |
304 | | - <form |
305 | | - action='' |
306 | | - method='POST' |
307 | | - onsubmit=' |
308 | | - return confirm( |
309 | | - \"Are you sure you want to cancel your request for account deletion?\" |
310 | | - ) |
311 | | - ' |
312 | | - > |
313 | | - $CSRFTokenHiddenFormInput |
314 | | - <input type='hidden' name='form_type' value='cancel_account_deletion_request' /> |
315 | | - <input type='submit' value='Cancel Account Deletion Request' /> |
316 | | - </form> |
317 | | - "; |
318 | | - } else { |
319 | | - echo " |
320 | | - <form |
321 | | - action='' |
322 | | - method='POST' |
323 | | - onsubmit='return confirm(\"Are you sure you want to request an account deletion?\")' |
324 | | - > |
325 | | - $CSRFTokenHiddenFormInput |
326 | | - <input type='hidden' name='form_type' value='account_deletion_request' /> |
327 | | - <input type='submit' value='Request Account Deletion' /> |
328 | | - </form> |
329 | | - "; |
330 | | - } |
| 304 | + $request_account_deletion_disabled = ""; |
| 305 | + $request_account_deletion_title = ""; |
| 306 | +} |
| 307 | +if ($SQL->accDeletionRequestExists($USER->uid)) { |
| 308 | + echo " |
| 309 | + <p>Your request has been submitted and is currently pending.</p> |
| 310 | + <form |
| 311 | + action='' |
| 312 | + method='POST' |
| 313 | + onsubmit=' |
| 314 | + return confirm( |
| 315 | + \"Are you sure you want to cancel your request for account deletion?\" |
| 316 | + ) |
| 317 | + ' |
| 318 | + > |
| 319 | + $CSRFTokenHiddenFormInput |
| 320 | + <input type='hidden' name='form_type' value='cancel_account_deletion_request' /> |
| 321 | + <input type='submit' value='Cancel Account Deletion Request' /> |
| 322 | + </form> |
| 323 | + "; |
| 324 | +} else { |
| 325 | + echo " |
| 326 | + <form |
| 327 | + action='' |
| 328 | + method='POST' |
| 329 | + onsubmit='return confirm(\"Are you sure you want to request an account deletion?\")' |
| 330 | + > |
| 331 | + $CSRFTokenHiddenFormInput |
| 332 | + <input type='hidden' name='form_type' value='account_deletion_request' /> |
| 333 | + <input |
| 334 | + type='submit' |
| 335 | + value='Request Account Deletion' |
| 336 | + title='$request_account_deletion_title' |
| 337 | + $request_account_deletion_disabled |
| 338 | + /> |
| 339 | + </form> |
| 340 | + "; |
331 | 341 | } |
332 | 342 |
|
333 | 343 | ?> |
|
348 | 358 |
|
349 | 359 | function enableOrDisableSubmitLoginShell() { |
350 | 360 | if ($("#loginSelector").val() == ldapLoginShell) { |
351 | | - $("#submitLoginShell").prop("disabled", true); |
| 361 | + $("#submitLoginShell").prop("disabled", true).prop("title", "Login shell is unchanged"); |
352 | 362 | } else { |
353 | | - $("#submitLoginShell").prop("disabled", false); |
| 363 | + $("#submitLoginShell").prop("disabled", false).prop("title", ""); |
354 | 364 | } |
355 | 365 | } |
356 | 366 | $("#loginSelector").change(enableOrDisableSubmitLoginShell); |
|
0 commit comments