初始化
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@php $editing = isset($term) && $term; @endphp
|
||||
|
||||
@section('title', $editing ? '编辑术语' : '新建术语')
|
||||
@section('page-title', $editing ? '编辑术语' : '新建术语')
|
||||
|
||||
@section('content')
|
||||
<form method="POST" action="{{ $editing ? route('admin.glossary.update', $term) : route('admin.glossary.store') }}" class="form-card">
|
||||
@csrf
|
||||
@if ($editing) @method('PUT') @endif
|
||||
|
||||
<div class="field">
|
||||
<label>术语</label>
|
||||
<input name="term" class="input" value="{{ old('term', $term?->term ?? '') }}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>Slug</label>
|
||||
<input name="slug" class="input" value="{{ old('slug', $term?->slug ?? '') }}" required>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>分类</label>
|
||||
<input name="category" class="input" value="{{ old('category', $term?->category ?? '') }}">
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>定义</label>
|
||||
<textarea name="definition" class="textarea" required>{{ old('definition', $term?->definition ?? '') }}</textarea>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label>别名(逗号分隔)</label>
|
||||
<input name="aliases" class="input" value="{{ old('aliases', $term?->aliases ?? '') }}">
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary">保存</button>
|
||||
<a href="{{ route('admin.glossary.index') }}" class="btn">取消</a>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user