PageRenderTime 14ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/webapps/galaxy/user/api_keys.mako

https://bitbucket.org/cistrome/cistrome-harvard/
Mako | 45 lines | 42 code | 3 blank | 0 comment | 2 complexity | 1095c553fc899bf061ab7cc7b935bd35 MD5 | raw file
 1<%inherit file="/base.mako"/>
 2<%namespace file="/message.mako" import="render_msg" />
 3
 4<br/><br/>
 5<ul class="manage-table-actions">
 6    <li>
 7        <a class="action-button"  href="${h.url_for( controller='user', action='index', cntrller=cntrller )}">User preferences</a>
 8    </li>
 9</ul>
10
11%if message:
12    ${render_msg( message, status )}
13%endif
14
15<div class="toolForm">
16    <div class="toolFormTitle">Web API Key</div>
17    <div class="toolFormBody">
18        <form name="user_api_keys" id="user_api_keys" action="${h.url_for( controller='user', action='api_keys', cntrller=cntrller )}" method="post" >
19            <div class="form-row">
20                <label>Current API key:</label>
21                %if user.api_keys:
22                    ${user.api_keys[0].key}
23                %else:
24                    none set
25                %endif
26            </div>
27            <div class="form-row">
28                <input type="submit" name="new_api_key_button" value="Generate a new key now"/>
29                %if user.api_keys:
30                    (invalidates old key)
31                %endif
32                <div class="toolParamHelp" style="clear: both;">
33                    <%
34                        if trans.webapp.name == 'galaxy':
35                            webapp_str = 'Galaxy'
36                        else:
37                            webapp_str = 'the Tool Shed'
38                    %>
39                    An API key will allow you to access ${webapp_str} via its web API.  Please note that <strong>this key acts as an alternate means 
40                    to access your account and should be treated with the same care as your login password</strong>.
41                </div>
42            </div>
43        </form>
44    </div>
45</div>