diff --git a/app/blueprints/packages/packages.py b/app/blueprints/packages/packages.py index 53421d72..b9da2888 100644 --- a/app/blueprints/packages/packages.py +++ b/app/blueprints/packages/packages.py @@ -322,6 +322,8 @@ def create_edit(author=None, name=None): package = None if author is None: form = PackageForm(formdata=request.form) + form.submit.label.text = lazy_gettext("Save draft") + author = request.args.get("author") if author is None or author == current_user.username: author = current_user @@ -340,7 +342,7 @@ def create_edit(author=None, name=None): if package is None: abort(404) if not package.check_perm(current_user, Permission.EDIT_PACKAGE): - return redirect(package.get_url("packages.view")) + abort(403) author = package.author diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html index af795f35..d0d2c66b 100644 --- a/app/templates/packages/create_edit.html +++ b/app/templates/packages/create_edit.html @@ -86,7 +86,7 @@ {{ render_field(form.desc, class_="pkg_meta", fieldclass="form-control markdown") }} -