Start TO form template

This commit is contained in:
leigh-mil
2019-06-03 11:48:51 -04:00
committed by Montana
parent 91e41199b7
commit e7771f789b
12 changed files with 66 additions and 46 deletions

View File

@@ -29,12 +29,6 @@
<li><span class="sidenav__text">You have no portfolios yet</span></li>
{% endif %}
</ul>
<div class="sidenav__divider--small"></div>
<a class="sidenav__link sidenav__link--add" href="{{ url_for("task_orders.get_started") }}" title="Fund a New Portfolio">
<span class="sidenav__link-label">Fund a new portfolio</span>
{{ Icon("plus", classes="sidenav__link-icon") }}
</a>
</div>
</div>
</template>
</div>

View File

@@ -6,11 +6,10 @@
{% block content %}
{{
EmptyState(
action_href=url_for("task_orders.get_started"),
action_href="#",
action_label=("portfolios.index.empty.start_button" | translate),
icon="cloud",
message=("portfolios.index.empty.title" | translate),
)
}}
{% endblock %}

View File

@@ -93,7 +93,7 @@
{% call StickyCTA(text="Funding") %}
<div class='portfolio-funding__header row'>
<a href="{{ url_for("task_orders.new", screen=1, portfolio_id=portfolio.id) }}" class="usa-button">Start a new task order</a>
<a href="{{ url_for("task_orders.new", portfolio_id=portfolio.id) }}" class="usa-button">Start a new task order</a>
</div>
{% endcall %}
@@ -125,7 +125,7 @@
{{ EmptyState(
'This portfolio doesnt have any active or pending task orders.',
action_label='Add a New Task Order',
action_href=url_for('task_orders.new', screen=1, portfolio_id=portfolio.id),
action_href=url_for('task_orders.new', portfolio_id=portfolio.id),
icon='cloud',
) }}
{% endif %}

View File

@@ -0,0 +1,30 @@
{% extends "base.html" %}
{% from 'components/save_button.html' import SaveButton %}
{% from 'components/text_input.html' import TextInput %}
{% block content %}
<div class="col task-order-form">
{% include "fragments/flash.html" %}
<div class="panel">
{% block portfolio_header %}
{% include "portfolios/header.html" %}
{% endblock %}
<base-form inline-template>
<form id="new-task-order" action='{{ url_for("task_orders.create", portfolio_id=portfolio.id) }}' method="POST" autocomplete="off">
{{ form.csrf_token }}
<div class="panel__content">
<!-- TODO: implement save bar with component -->
<span class="h3">Add Funding</span>
{{ SaveButton(text=('common.save' | translate), element='input', form='new-task-order') }}
</div>
<div class="panel__content">
{{ "task_orders.new.form_help_text" | translate }}
<hr>
{{ TextInput(form.number) }}
</div>
</form>
</base-form>
</div>
</div>
{% endblock %}

View File

@@ -1,5 +1,3 @@
{% extends 'task_orders/_new.html' %}
{% from "components/text_input.html" import TextInput %}
{% from "components/options_input.html" import OptionsInput %}
{% from "components/date_input.html" import DateInput %}

View File

@@ -1,5 +1,3 @@
{% extends 'task_orders/_new.html' %}
{% from "components/text_input.html" import TextInput %}
{% from "components/options_input.html" import OptionsInput %}
{% from "components/date_input.html" import DateInput %}

View File

@@ -1,5 +1,3 @@
{% extends 'task_orders/_new.html' %}
{% from "components/user_info.html" import UserInfo %}
{% from "components/checkbox_input.html" import CheckboxInput %}
{% from "components/text_input.html" import TextInput %}

View File

@@ -1,5 +1,3 @@
{% extends 'task_orders/_new.html' %}
{% from "components/edit_link.html" import EditLink %}
{% from "components/required_label.html" import RequiredLabel %}
{% from "components/icon.html" import Icon %}