3410abd70a
Now that full-text searching is set up in the DB, the next step is data population. The adding and editing templates were added as long as routes and base functionality to add single locations. Adding works and editing is almost there but both still need to cleaned up. The basic plumbing will be completed and then the tweaking to account for roles and login status for the sake of security. Part 2 will include clean up and and bulk uploads through the use of CSV files.
32 lines
1.1 KiB
Twig
32 lines
1.1 KiB
Twig
<form action="{{ path('location-edit') }}" method="post" enctype="multipart/form-data">
|
|
<div>
|
|
<label>Name</label><br/>
|
|
<input type="text" name="loc_name" value="{{ location.name }}"/>
|
|
<br/>
|
|
<label>URL</label><br/>
|
|
<input type="text" name="loc_url" value="{{ location.url }}"/>
|
|
<br/>
|
|
<label>Tags</label><br/>
|
|
<input type="text" name="loc_tags" value="{{ location.tags }}"/>
|
|
<br/>
|
|
<label>Description</label><br/>
|
|
<textarea name="loc_desc">{{ location.description }}</textarea>
|
|
<br/>
|
|
<label>Rating</label><br/>
|
|
<select name="rating">
|
|
{% if location.rating == "silence" %}
|
|
<option value="silence" selected>Silence</option>
|
|
<option value="defederate">Defederate</option>
|
|
{% else %}
|
|
<option value="silence">Silence</option>
|
|
<option value="defederate" selected>Defederate</option>
|
|
{% endif %}
|
|
|
|
</select>
|
|
<br/>
|
|
<label>Images</label><br/>
|
|
<input type="file" id="loc_examples" name="loc_examples[]" multiple/>
|
|
</div>
|
|
<input type="hidden" name="token" value="{{ csrf_token('upload') }}"/>
|
|
<input type="submit" value="Edit Location" name="submit_button"></form>
|