Skip to content

Commit

Permalink
Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
darkwing committed Jul 9, 2012
1 parent 3a8c01e commit fe4454f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/wiki/views.py
Expand Up @@ -610,6 +610,16 @@ def edit_document(request, document_slug, document_locale, revision_id=None):
is_iframe_target = request.GET.get('iframe', False)
is_raw = request.GET.get('raw', False)
need_edit_links = request.GET.get('edit_links', False)
parent_id = request.POST.get('parent_id', '')

# Attempt to set a parent
if show_translation_parent_block and parent_id:
try:
parent_doc = get_object_or_404(Document, id=parent_id)
doc.parent = parent_doc
except Document.DoesNotExist:
logging.debug('Could not find posted parent')


# Comparing against localized names for the Save button bothers me, so
# I embedded a hidden input:
Expand Down

0 comments on commit fe4454f

Please sign in to comment.