{% extends "base.html" %} {% load widget_tweaks %} {% block title %}{{ is_edit|yesno:"Edit IP,New IP" }} – IP Submission{% endblock %} {% block content %}

{{ is_edit|yesno:"Edit IP,New IP" }}

{% csrf_token %}
Basic Information
{{ form.title|add_class:"form-control" }}
{{ form.ip_type|add_class:"form-select" }}
{{ form.ip_status|add_class:"form-select" }}
{{ form.funding_status|add_class:"form-select" }}
{{ form.abstract|add_class:"form-control" }}
{{ form.domain|add_class:"form-control" }}
{{ form.keywords|add_class:"form-control" }}
{{ form.owning_unit|add_class:"form-control" }}
Readiness Indicators (basic)
{{ form.trl|add_class:"form-select" }}
Select the current TRL. Hover the icon to see the full 0–9 guide.
Low Medium High
No TRL selected yet.
{{ form.crl|add_class:"form-select" }}
Select how far the technology is along its commercialization path.
{{ form.has_prototype }}
Innovation Details
{{ form.prior_art_summary|add_class:"form-control" }}
{{ form.claimed_novelty|add_class:"form-control" }}
{{ form.target_market|add_class:"form-control" }}
{{ form.market_need|add_class:"form-control" }}
{{ form.biz_model_clarity|add_class:"form-control" }}
{% if formset.non_form_errors %}
{{ formset.non_form_errors }}
{% endif %} {{ formset.management_form }}
Supporting Documents
{% for f in formset %}
{# CRITICAL: Include the hidden ID field for existing documents #} {% for hidden in f.hidden_fields %} {{ hidden }} {% endfor %}
{{ f.doc_type|add_class:"form-select" }} {% if f.doc_type.errors %}
{{ f.doc_type.errors }}
{% endif %}

{% if f.instance.pk and f.instance.file %} {% endif %} {{ f.file }} {% if f.file.errors %}
{{ f.file.errors }}
{% endif %}
{% if f.instance.pk %}
{{ f.DELETE|add_class:"form-check-input" }}
{% endif %}
{% if f.non_field_errors %}
{{ f.non_field_errors }}
{% endif %}
{% endfor %}
{{ formset.empty_form.doc_type|add_class:"form-select" }}

{{ formset.empty_form.file }}
You can attach abstract, description, claims, drawings, etc. Only PDF allowed for now.
{% if is_edit and asset %} Cancel {% elif is_edit and ip %} Cancel {% else %} Cancel {% endif %}
Guide: This form collects the core inputs for the AI TRL/CRL assessment. You can save as draft and return later, or submit to the Technology Transfer Office.
{% endblock %}