Skip to content

Commit 844ebfa

Browse files
committed
Add support for starting server on creation.
1 parent 482bf48 commit 844ebfa

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

app/Repositories/ServerRepository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ public function create(array $data)
330330
(string) $server->daemonSecret => $this->daemonPermissions,
331331
],
332332
'rebuild' => false,
333+
'start_on_completion' => isset($data['start_on_completion']),
333334
],
334335
]);
335336

resources/themes/pterodactyl/admin/servers/new.blade.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,18 @@
5252
<select class="form-control" style="padding-left:0;" name="user_id" id="pUserId"></select>
5353
</div>
5454
</div>
55-
<div class="form-group col-md-6">
56-
<label for="description" class="control-label">Server Description</label>
57-
<textarea name="description" rows="3" class="form-control">{{ old('description') }}</textarea>
58-
<p class="text-muted small">A brief description of this server.</p>
55+
<div class="col-md-6">
56+
<div class="form-group">
57+
<label for="description" class="control-label">Server Description</label>
58+
<textarea name="description" rows="3" class="form-control">{{ old('description') }}</textarea>
59+
<p class="text-muted small">A brief description of this server.</p>
60+
</div>
61+
<div class="form-group">
62+
<div class="checkbox checkbox-primary no-margin-bottom">
63+
<input id="pStartOnCreation" name="start_on_completion" type="checkbox" value="1" checked />
64+
<label for="pStartOnCreation" class="strong">Start Server when Installed</label>
65+
</div>
66+
</div>
5967
</div>
6068
</div>
6169
</div>

0 commit comments

Comments
 (0)