diff options
Diffstat (limited to 'httemplate/elements/tr-input-fiber_circuit.html')
-rw-r--r-- | httemplate/elements/tr-input-fiber_circuit.html | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/httemplate/elements/tr-input-fiber_circuit.html b/httemplate/elements/tr-input-fiber_circuit.html new file mode 100644 index 000000000..fb6462bb6 --- /dev/null +++ b/httemplate/elements/tr-input-fiber_circuit.html @@ -0,0 +1,31 @@ +<& /elements/tr-td-label.html, %opt &> + <td> + <table class="inv"> + <tr> + <th>FDU#</th> + <td><input name="<% $field %>_fdu" value="<% $fdu |h %>" SIZE="1"></td> + <th>FAT#</th> + <td><input name="<% $field %>_fat" value="<% $fat |h %>" SIZE="1"> + <input name="<% $field %>_subfat" value="<% $subfat |h %>" SIZE="1"> + </td> + <th>Port#</th> + <td><input name="<% $field %>_port" value="<% $port |h %>" SIZE="1"></td> + </tr> + </table> + </td> +</tr> +<%doc> +Supports a circuit ID of the form +FDU# (digit), FAT# (digit), SubFAT (letter), Port# (numeric) +May support other formats in the future, or just a free text field. +</%doc> +<%init> +my %opt = @_; +my $value = length($opt{curr_value}) ? $opt{curr_value} : $opt{value}; +my ($fdu, $fat, $port) = split('/', $value); +my $subfat = ''; +if ( $fat =~ /[A-Z]$/i ) { + $subfat = substr($fat, -1, 1, ''); +} +my $field = $opt{'field'} || 'circuit_id'; +</%init> |