Don't allow reinstall if server install failed

This commit is contained in:
Dane Everitt 2017-05-23 22:57:09 -05:00
parent f0fca2a681
commit 0e48c94918
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
1 changed files with 8 additions and 4 deletions

View File

@ -62,10 +62,14 @@
<p>This will reinstall the server with the assigned pack and service scripts. <strong>Danger!</strong> This could overwrite server data.</p> <p>This will reinstall the server with the assigned pack and service scripts. <strong>Danger!</strong> This could overwrite server data.</p>
</div> </div>
<div class="box-footer"> <div class="box-footer">
<form action="{{ route('admin.servers.view.manage.reinstall', $server->id) }}" method="POST"> @if($server->installed)
{!! csrf_field() !!} <form action="{{ route('admin.servers.view.manage.reinstall', $server->id) }}" method="POST">
<button type="submit" class="btn btn-danger">Reinstall Server</button> {!! csrf_field() !!}
</form> <button type="submit" class="btn btn-danger">Reinstall Server</button>
</form>
@else
<button class="btn btn-danger disabled">Reinstall Server</button>
@endif
</div> </div>
</div> </div>
</div> </div>