mirror of
https://github.com/sissbruecker/linkding.git
synced 2025-08-09 19:57:49 +02:00
Allow passing title and description to new bookmark form (#479)
* Added ability to set title and description #118
* Updated bookmarklet to pass site title #118
* Revert "Updated bookmarklet to pass site title #118"
This reverts commit 873d90130b
.
This commit is contained in:
@@ -114,6 +114,8 @@ def convert_tag_string(tag_string: str):
|
||||
@login_required
|
||||
def new(request):
|
||||
initial_url = request.GET.get('url')
|
||||
initial_title = request.GET.get('title')
|
||||
initial_description = request.GET.get('description')
|
||||
initial_auto_close = 'auto_close' in request.GET
|
||||
|
||||
if request.method == 'POST':
|
||||
@@ -131,6 +133,10 @@ def new(request):
|
||||
form = BookmarkForm()
|
||||
if initial_url:
|
||||
form.initial['url'] = initial_url
|
||||
if initial_title:
|
||||
form.initial['title'] = initial_title
|
||||
if initial_description:
|
||||
form.initial['description'] = initial_description
|
||||
if initial_auto_close:
|
||||
form.initial['auto_close'] = 'true'
|
||||
|
||||
|
Reference in New Issue
Block a user