vpn.keks.cloud/resources/views/peer/new.blade.php
2020-11-08 03:07:10 +01:00

44 lines
1.3 KiB
PHP

<!-- Stored in resources/views/child.blade.php -->
@extends('layout.app')
@section('title', 'VPN')
@section('content')
<div class="row"">
<div class="col-md-12">
<h1>New Peer</h1>
<form method="post">
@csrf
<label>Name</label>
<input name="name" class="form-control">
<span id="keys">
<label>Public Key</label>
<input name="public_key" id="public_key" class="form-control">
<label>Preshared Key</label>
<input name="preshared_key" id="preshared_key" class="form-control">
</span>
<input style="margin-top: 15px;" type="checkbox" id="genKeys" name="genKeys"> Generate Keys at the Server <b>Very Insecure!</b>
<br>
<input style="margin-top: 15px;" type="submit" value="Create Peer" class="btn btn-success">
</form>
</div>
</div>
@endsection
@section('script')
<script>
$("#genKeys").change(function() {
if($("#genKeys").prop("checked")) {
alert("Generate the Key on the Server is not secure!")
$("#keys").hide();
$("#public_key").val("");
$("#preshared_key").val("");
} else {
$("#keys").show();
}
});
</script>
@endsection