Browse Source

Fix name field always being readonly

pull/161/head
rubenwardy 3 years ago
parent
commit
3c8a8b8988
  1. 6
      app/templates/packages/create_edit.html

6
app/templates/packages/create_edit.html

@ -47,7 +47,11 @@ @@ -47,7 +47,11 @@
<div class="row">
{{ render_field(form.type, class_="pkg_meta col-sm-2") }}
{{ render_field(form.title, class_="pkg_meta col-sm-7") }}
{{ render_field(form.name, class_="pkg_meta col-sm-3", readonly=package.approved and not package.checkPerm(current_user, "CHANGE_NAME")) }}
{% if package and package.approved and not package.checkPerm(current_user, "CHANGE_NAME") %}
{{ render_field(form.name, class_="pkg_meta col-sm-3", readonly=True) }}
{% else %}
{{ render_field(form.name, class_="pkg_meta col-sm-3") }}
{% endif %}
</div>
{{ render_field(form.short_desc, class_="pkg_meta") }}
{{ render_multiselect_field(form.tags, class_="pkg_meta") }}

Loading…
Cancel
Save