Add usernames and sudo_usernames fields to VM request form
- DB: add usernames/sudo_usernames columns to vm_requests table - create.php: add form inputs for usernames and sudo_usernames - send.php: capture, validate, and store both fields in DB - netbox_integration/netbox_api.php: pass custom_fields to NetBox VM API - requests.php: show usernames/sudo_usernames in request list
This commit is contained in:
+28
@@ -114,6 +114,34 @@ $error = $_GET['error'] ?? '';
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="usernames">Usernames <span style="font-weight:400;color:var(--text-tertiary)">(comma-separated, optional)</span></label>
|
||||
<span class="field-label-sub">Linux user accounts to create on this VM (e.g. <em>jdoe, admin</em>).</span>
|
||||
<input
|
||||
type="text"
|
||||
id="usernames"
|
||||
name="usernames"
|
||||
maxlength="500"
|
||||
placeholder="jdoe, admin"
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="sudo_usernames">Sudo Usernames <span style="font-weight:400;color:var(--text-tertiary)">(comma-separated, optional)</span></label>
|
||||
<span class="field-label-sub">Which users should have sudo access (e.g. <em>admin</em>).</span>
|
||||
<input
|
||||
type="text"
|
||||
id="sudo_usernames"
|
||||
name="sudo_usernames"
|
||||
maxlength="500"
|
||||
placeholder="admin"
|
||||
autocomplete="off"
|
||||
spellcheck="false"
|
||||
>
|
||||
</div>
|
||||
|
||||
<button type="submit" id="submitBtn">
|
||||
<span class="btn-label">Submit Request</span>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user