PageRenderTime 52ms CodeModel.GetById 46ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 1ms

/templates/admin/request_type/common.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 33 lines | 31 code | 1 blank | 1 comment | 2 complexity | 600bd379cb88a48ccb17bda63e0d153a MD5 | raw file
 1<%def name="render_state( element_count, state_name, state_desc )">
 2    <div class="repeat-group-item">
 3        <div class="form-row">
 4            <label>${1+element_count}. State name:</label>
 5            <input type="text" name="state_name_${element_count}" value="${state_name}" size="40"/>
 6            ## Do not show remove button for the first state
 7            %if element_count > 0:
 8                <input type="submit" name="remove_state_button" value="Remove state ${1+element_count}"/>
 9            %endif
10        </div>
11        <div class="form-row">
12            <label>Description:</label>
13            <input type="text" name="state_desc_${element_count}" value="${state_desc}" size="40"/>
14            <div class="toolParamHelp" style="clear: both;">
15                optional
16            </div>
17        </div>
18        <div style="clear: both"></div>
19   </div>
20</%def>
21
22<%def name="render_external_services( element_count, external_service_select_field )">
23    <div class="repeat-group-item">
24        <div class="form-row">
25            <label>${1+element_count}. External service:</label>
26            ${external_service_select_field.get_html()}
27        </div>
28        <div class="form-row">
29            <input type="submit" name="remove_external_service_button" value="Remove external service ${1+element_count}"/>
30        </div>
31        <div style="clear: both"></div>
32   </div>
33</%def>