PageRenderTime 21ms CodeModel.GetById 15ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/workflow/editor_generic_form.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 42 lines | 39 code | 3 blank | 0 comment | 0 complexity | 97c7dfe9b21ba304cbf9ce93354a7124 MD5 | raw file
 1<form name="${form.name}" action="${h.url_for( action='editor_form_post' )}" method="post">
 2    <div class="toolForm">
 3        <div class="toolFormTitle">${form.title}</div>
 4        <div class="toolFormBody">
 5            <input type="hidden" name="type" value="${module.type}" />
 6            %if form.inputs:
 7              %for input in form.inputs:
 8                  <%
 9                  cls = "form-row"
10                  if input.error:
11                      cls += " form-row-error"
12                  %>
13                  <div class="${cls}">
14                    <label>
15                        ${input.label}:
16                    </label>
17                    <div style="float: left; width: 250px; margin-right: 10px;">
18                        <input type="${input.type}" name="${input.name | h}" value="${input.value | h}" size="30">
19                    </div>
20                    %if input.error:
21                    <div style="float: left; color: red; font-weight: bold; padding-top: 1px; padding-bottom: 3px;">
22                        <div style="width: 300px;"><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}">&nbsp;<span style="vertical-align: middle;">${input.error}</span></div>
23                    </div>
24                    %endif
25  
26                    %if input.help:
27                    <div class="toolParamHelp" style="clear: both;">
28                        ${input.help}
29                    </div>
30                    %endif
31  
32                    <div style="clear: both"></div>
33  
34                  </div>
35              %endfor
36            %else:
37              <div class="form-row"><i>No options</i></div>
38            %endif
39            </table>
40        </div>
41    </div>
42</form>