Rewired new location submission form
Brought over the old form for adding new location to the db and the plugged everything back up using Laravel's eloquent orm (which is pretty fucking sweet) to re-active that process NOTE: larvel gets a twitchy when sequencing isn't explicitly set some minor edits needed to be made to the development DB to prevent a null id error when inserting new records. this should be done to production when it's ready as wellpull/8/head
parent
66cf78ba75
commit
afce441001
@ -0,0 +1 @@
|
|||||||
|
/Users/ro/Projects/TheBadSpace/first/storage/app/reference
|
@ -0,0 +1,29 @@
|
|||||||
|
@extends('frame')
|
||||||
|
|
||||||
|
@section('title', 'Den|Locations')
|
||||||
|
|
||||||
|
@section('main-content')
|
||||||
|
@parent
|
||||||
|
@if($errors->any())
|
||||||
|
<h4>{{$errors->first()}}</h4>
|
||||||
|
@endif
|
||||||
|
@if(session('message'))
|
||||||
|
{!! session('message') !!}
|
||||||
|
@endif
|
||||||
|
<section role="loc-index">
|
||||||
|
<div>
|
||||||
|
<h1>Locations</h1>
|
||||||
|
Hey {{$handle}}<br />
|
||||||
|
|
||||||
|
@if($action === "add")
|
||||||
|
@include('forms.add-location')
|
||||||
|
@elseif($action === "edit")
|
||||||
|
EDIT LOCATION
|
||||||
|
@elseif($action === "bulk-add")
|
||||||
|
ADD MANY LOCATIONS
|
||||||
|
@else
|
||||||
|
START
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endsection
|
@ -0,0 +1,29 @@
|
|||||||
|
<form action="/den/locations/add" method="post" enctype="multipart/form-data">
|
||||||
|
<div>
|
||||||
|
<label>Name</label><br />
|
||||||
|
<input type="text" name="name" value="" />
|
||||||
|
<br />
|
||||||
|
<label>URL</label><br />
|
||||||
|
<input type="text" name="url" value="" />
|
||||||
|
<br />
|
||||||
|
<label>Tags</label><br />
|
||||||
|
<input type="text" name="tags" value="" />
|
||||||
|
<br />
|
||||||
|
<label>Description</label><br />
|
||||||
|
<textarea name="description"></textarea>
|
||||||
|
<br />
|
||||||
|
<label>Rating</label><br />
|
||||||
|
<select name="rating">
|
||||||
|
<option value="" disabled selected>Choose Rating
|
||||||
|
</option>
|
||||||
|
<option value="silence">Silence</option>
|
||||||
|
<option value="defederate">Defederate</option>
|
||||||
|
</select>
|
||||||
|
<br />
|
||||||
|
<label>Images</label><br />
|
||||||
|
<input type="file" id="loc_examples" name="loc_examples[]" multiple />
|
||||||
|
</div>
|
||||||
|
@csrf
|
||||||
|
<input type="hidden" name="mode" value="add" />
|
||||||
|
<input type="submit" value="Edit Location" name="submit_button">
|
||||||
|
</form>
|
Loading…
Reference in New Issue