Add note about media license

Fixes #150
This commit is contained in:
rubenwardy 2019-07-29 22:48:05 +01:00
parent c4a4d9c116
commit 85340a2fe9
2 changed files with 7 additions and 0 deletions

View File

@ -59,6 +59,10 @@
{{ render_field(form.license, class_="not_txp col-sm-6") }}
{{ render_field(form.media_license, class_="col-sm-6") }}
</div>
<div class="pkg_meta row">
<div class="not_txp col-sm-6"></div>
<div class="not_txp col-sm-6">{{ _("If there is no media, set the Media License to the same as the License.") }}</div>
</div>
{{ render_field(form.desc, class_="pkg_meta", fieldclass="form-control markdown") }}
</fieldset>

View File

@ -255,6 +255,9 @@ def create_edit_package_page(author=None, name=None):
form.populate_obj(package) # copy to row
if package.type== PackageType.TXP:
package.license = package.media_license
mpackage_cache = {}
package.provides.clear()
mpackages = MetaPackage.SpecToList(form.provides_str.data, mpackage_cache)