Add ng-if to fix Angular scope+form bug in superuser tool

This commit is contained in:
Joseph Schorr 2017-05-02 17:08:19 -04:00
parent e5ec33511f
commit 6e3968896b

View file

@ -192,17 +192,12 @@
</p>
</div>
<table class="config-table">
<tr>
<td>Default expiration period:</td>
<td>
<span class="config-string-field" binding="config.MINIMUM_TAG_EXPIRATION"
pattern="[0-9]+(m|w|h|d|s)"></span>
<div class="help-text">
The default tag expiration period for all namespaces (users and organizations). Must be expressed in a duration string form: <code>30m</code>, <code>1h</code>, <code>1d</code>, <code>2w</code>.
</div>
</td>
</tr>
<tr>
<!-- This `ng-if` true is *required* to create a new scope so that the <form> inside
the config-list-field doesn't try to submit the *outer* form when the Add button
is clicked. This is highly stupid, but until we figure out a better way, such it
shall be.
-->
<tr ng-if="true">
<td>Allowed expiration periods:</td>
<td>
<span class="config-list-field" item-title="Tag Expiration Period" binding="config.TAG_EXPIRATION_OPTIONS" item-pattern="[0-9]+(m|w|h|d|s)"></span>
@ -211,6 +206,16 @@
</div>
</td>
</tr>
<tr>
<td>Default expiration period:</td>
<td>
<span class="config-string-field" binding="config.DEFAULT_TAG_EXPIRATION"
pattern="[0-9]+(m|w|h|d|s)"></span>
<div class="help-text">
The default tag expiration period for all namespaces (users and organizations). Must be expressed in a duration string form: <code>30m</code>, <code>1h</code>, <code>1d</code>, <code>2w</code>.
</div>
</td>
</tr>
<tr>
<td>Allow users to select expiration:</td>
<td>