Files
ProxyPanel/resources/views/admin/node/cert/info.blade.php
兔姬桑 c3dbcb19f4 使用whenFilled优化代码筛选 & 页面代码适量简化
针对管理页面中筛选行为使用whenFilled属性进行重写简化&规范化修正;
同时对页面搜索代码进行适量简化;
2021-03-16 13:13:42 -04:00

67 lines
3.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
@extends('admin.layouts')
@section('css')
<link href="/assets/global/vendor/bootstrap-select/bootstrap-select.min.css" rel="stylesheet">
@endsection
@section('content')
<div class="page-content container">
<div class="panel">
<div class="panel-heading">
<h2 class="panel-title">@isset($cert) 编辑 @else 添加 @endisset域名证书</h2>
<div class="panel-actions">
<a href="{{route('admin.node.cert.index')}}" class="btn btn-danger"> </a>
</div>
</div>
@if (Session::has('successMsg'))
<x-alert type="success" :message="Session::get('successMsg')"/>
@endif
@if($errors->any())
<x-alert type="danger" :message="$errors->all()"/>
@endif
<div class="panel-body">
<form action="@isset($cert) {{route('admin.node.cert.update', $cert)}} @else {{route('admin.node.cert.store')}} @endisset"
method="POST" enctype="multipart/form-data" class="form-horizontal">
@isset($cert)@method('PUT')@endisset
@csrf
<div class="form-group row">
<label for="domain" class="col-md-3 col-form-label">域名</label>
<div class="col-md-9">
<input type="text" class="form-control" name="domain" id="domain" required>
</div>
</div>
<div class="form-group row">
<label for="key" class="col-md-3 col-form-label">Key</label>
<div class="col-md-9">
<textarea type="text" rows="10" class="form-control" name="key" id="key"
placeholder="域名证书的KEY值允许为空VNET-V2Ray后端支持自动签证书"></textarea>
</div>
</div>
<div class="form-group row">
<label for="pem" class="col-md-3 col-form-label">Pem</label>
<div class="col-md-9">
<textarea type="text" rows="10" class="form-control" name="pem" id="pem"
placeholder="域名证书的PEM值允许为空VNET-V2Ray后端支持自动签证书"></textarea>
</div>
</div>
<div class="form-actions">
<button type="submit" class="btn btn-success"> </button>
</div>
</form>
</div>
</div>
</div>
@endsection
@section('javascript')
<script>
$(document).ready(function() {
$('#domain').val(@json(old('domain')));
$('#key').val(@json(old('key')));
$('#pem').val(@json(old('pem')));
@isset($cert)
$('#domain').val(@json(old('domain') ?? $cert->domain));
$('#key').val(@json(old('key') ?? $cert->key));
$('#pem').val(@json(old('pem') ?? $cert->pem));
@endisset
});
</script>
@endsection