Merge pull request #684 from dod-ccpo/none-component-handling

Default defense component to None
This commit is contained in:
montana-mil 2019-02-27 11:36:41 -05:00 committed by GitHub
commit 39aa160bb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 7 deletions

View File

@ -16,7 +16,7 @@ class PortfolioError(Exception):
class Portfolios(object): class Portfolios(object):
@classmethod @classmethod
def create(cls, user, name, defense_component): def create(cls, user, name, defense_component=None):
portfolio = PortfoliosQuery.create( portfolio = PortfoliosQuery.create(
name=name, defense_component=defense_component name=name, defense_component=defense_component
) )

View File

@ -24,12 +24,16 @@
<button type="submit" class="usa-button usa-button-big usa-button-primary" tabindex="0">Save</button> <button type="submit" class="usa-button usa-button-big usa-button-primary" tabindex="0">Save</button>
</div> </div>
</div> </div>
<div class='defense-row'> <div class='defense-row'>
<div> <div>
<div class='admin-title'>{{ "forms.task_order.defense_component_label" | translate }}</div> <div class='admin-title'>{{ "forms.task_order.defense_component_label" | translate }}</div>
<div class='admin-content'>{{ portfolio.defense_component }}</div> {% if portfolio.defense_component %}
<div class='admin-content'>{{ portfolio.defense_component }}</div>
{% else %}
<div class='admin-content'>{{ "fragments.portfolio_admin.none" | translate }}</div>
{% endif %}
</div>
</div> </div>
</div>
</form> </form>
{% include "fragments/audit_events_log.html" %} {% include "fragments/audit_events_log.html" %}

View File

@ -6,7 +6,6 @@
# title: A title with <a href="#">a link</a>! # title: A title with <a href="#">a link</a>!
# `{{ "login.title" | translate | safe }}` # `{{ "login.title" | translate | safe }}`
audit_log: audit_log:
events: events:
default: default:
@ -298,6 +297,8 @@ fragments:
bullet_1: Make sure the information below matches the final task order and is accurate and up-to-date bullet_1: Make sure the information below matches the final task order and is accurate and up-to-date
bullet_2: Upload your Task Order (TO) document bullet_2: Upload your Task Order (TO) document
bullet_3: Add both the Task Order (TO) and Line(s) of Accounting (LOA) numbers bullet_3: Add both the Task Order (TO) and Line(s) of Accounting (LOA) numbers
portfolio_admin:
none: Not Selected
login: login:
ccpo_logo_alt_text: Cloud Computing Program Office Logo ccpo_logo_alt_text: Cloud Computing Program Office Logo
certificate_selection: certificate_selection: