37 lines
2.5 KiB
PHP
37 lines
2.5 KiB
PHP
<x-app-layout>
|
|||
|
|
<section class="bg-white dark:bg-gray-900 border-b border-gray-100 dark:border-gray-800">
|
||
|
|
<div class="mx-auto max-w-7xl px-4 sm:px-6 lg:px-8 py-8">
|
||
|
|
<h1 class="text-2xl sm:text-3xl font-extrabold tracking-tight text-gray-900 dark:text-white">New Program</h1>
|
||
|
|
<p class="mt-2 text-gray-600 dark:text-gray-300">Give it a name and how many weeks it runs for. You'll add workouts to specific weeks next.</p>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
|
||
|
|
<section class="mx-auto max-w-2xl px-4 sm:px-6 lg:px-8 py-8">
|
||
|
|
@if ($errors->any())
|
||
|
|
<div class="mb-4 rounded-xl bg-red-50 text-red-700 px-4 py-3">
|
||
|
|
<ul class="list-disc ms-5 text-sm">
|
||
|
|
@foreach ($errors->all() as $error)
|
||
|
|
<li>{{ $error }}</li>
|
||
|
|
@endforeach
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
@endif
|
||
|
|
<form method="POST" action="{{ route('programs.store') }}" class="space-y-5 bg-white dark:bg-gray-800 rounded-2xl p-6 ring-1 ring-gray-200 dark:ring-gray-700">
|
||
|
|
@csrf
|
||
|
|
<div>
|
||
|
|
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">Title</label>
|
||
|
|
<input type="text" name="title" value="{{ old('title') }}" required placeholder="e.g. Push Pull Legs" class="mt-1 w-full rounded-xl border-gray-300 dark:border-gray-700 bg-white/80 dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2">
|
||
|
|
</div>
|
||
|
|
<div>
|
||
|
|
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">Weeks</label>
|
||
|
|
<input type="number" name="weeks" min="1" max="52" value="{{ old('weeks', 4) }}" required class="mt-1 w-32 rounded-xl border-gray-300 dark:border-gray-700 bg-white/80 dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2">
|
||
|
|
</div>
|
||
|
|
<div>
|
||
|
|
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300">Description</label>
|
||
|
|
<textarea name="description" rows="3" class="mt-1 w-full rounded-xl border-gray-300 dark:border-gray-700 bg-white/80 dark:bg-gray-900 text-gray-900 dark:text-gray-100 px-3 py-2">{{ old('description') }}</textarea>
|
||
|
|
</div>
|
||
|
|
<button type="submit" class="inline-flex items-center rounded-xl bg-gradient-to-r from-fuchsia-600 to-indigo-600 px-4 py-2 text-sm font-semibold text-white shadow hover:from-fuchsia-500 hover:to-indigo-500">Create Program</button>
|
||
|
|
</form>
|
||
|
|
</section>
|
||
|
|
</x-app-layout>
|