blob: 225a3d2fc7b39b1f311e997def874953e20099bc [file] [log] [blame]
<table id="launch-gates-table" class="hidden">
<tr>
<th>Approval</th>
<th style="color:grey">gate-less</th>
<th><input name="phase_0" placeholder="Gate Name" size="7" [if-any allow_edit][else]disabled[end]></th>
<th><input name="phase_1" size="7" [if-any allow_edit][else]disabled[end]></th>
<th><input name="phase_2" size="7" [if-any allow_edit][else]disabled[end]></th>
<th><input name="phase_3" size="7" [if-any allow_edit][else]disabled[end]></th>
<th><input name="phase_4" size="7" [if-any allow_edit][else]disabled[end]></th>
<th><input name="phase_5" size="7" [if-any allow_edit][else]disabled[end]></th>
<th style="color:grey">omit</th>
</tr>
[for approvals]
<tr>
<td nowrap><b>[approvals.field_name]</b>
<br>
<span><input id="[approvals.field_id]_required" name="approval_[approvals.field_id]_required" type="checkbox" [if-any allow_edit][else]disabled[end]>
<label for="[approvals.field_id]_required">Require review</label></span>
</td>
<td><input id="[approvals.field_id]" name="approval_[approvals.field_id]" value="no_phase" type="radio" [if-any allow_edit][else]disabled[end]></td>
<td><input id="[approvals.field_id]_phase_0" name="approval_[approvals.field_id]" value="phase_0" type="radio" [if-any allow_edit][else]disabled[end]></td>
<td><input id="[approvals.field_id]_phase_1" name="approval_[approvals.field_id]" value="phase_1" type="radio" [if-any allow_edit][else]disabled[end]></td>
<td><input id="[approvals.field_id]_phase_2" name="approval_[approvals.field_id]" value="phase_2" type="radio" [if-any allow_edit][else]disabled[end]></td>
<td><input id="[approvals.field_id]_phase_3" name="approval_[approvals.field_id]" value="phase_3" type="radio" [if-any allow_edit][else]disabled[end]></td>
<td><input id="[approvals.field_id]_phase_4" name="approval_[approvals.field_id]" value="phase_4" type="radio" [if-any allow_edit][else]disabled[end]></td>
<td><input id="[approvals.field_id]_phase_5" name="approval_[approvals.field_id]" value="phase_5" type="radio" [if-any allow_edit][else]disabled[end]></td>
<td><input name="approval_[approvals.field_id]" value="omit" type="radio" checked="checked" [if-any allow_edit][else]disabled[end]></td>
</tr>
[end]
</table>
<script type="text/javascript" nonce="[nonce]">
runOnLoad(function() {
let phaseNum = 0;
[for initial_phases]
document.getElementsByName(`phase_${phaseNum++}`)[0].value = '[format "js"][initial_phases.name][end]';
[end]
[for prechecked_approvals]
document.getElementById("[prechecked_approvals]").checked = "checked"
[end]
[for required_approval_ids]
document.getElementById("[required_approval_ids]_required").checked = "checked"
[end]
});
</script>