View | Details | Raw Unified | Return to bug 8670
Collapse All | Expand All

(-)a/C4/Branch.pm (-6 / +9 lines)
Lines 90-100 Create a branch selector with the following code. Link Here
90
90
91
=head3 in TEMPLATE
91
=head3 in TEMPLATE
92
92
93
    <select name="branch">
93
    <select name="branch" id="branch">
94
        <option value="">Default</option>
94
        <option value=""></option>
95
        <!-- TMPL_LOOP name="branchloop" -->
95
            [% FOREACH branchloo IN branchloop %]
96
        <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
96
                [% IF ( branchloo.selected ) %]
97
        <!-- /TMPL_LOOP -->
97
                    <option value="[% branchloo.value %]" selected="selected">[% branchloo.branchname %]</option>
98
                [% ELSE %]
99
                    <option value="[% branchloo.value %]" >[% branchloo.branchname %]</option>
100
                [% END %]
101
            [% END %]
98
    </select>
102
    </select>
99
103
100
=head4 Note that you often will want to just use GetBranchesLoop, for exactly the example above.
104
=head4 Note that you often will want to just use GetBranchesLoop, for exactly the example above.
101
- 

Return to bug 8670