瀏覽代碼

Hide API token by default, make visible with a click

Jordi Boggiano 12 年之前
父節點
當前提交
58473be3a0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/Resources/FOSUserBundle/views/Profile/show.html.twig

+ 1 - 1
app/Resources/FOSUserBundle/views/Profile/show.html.twig

@@ -15,7 +15,7 @@
 
         {% if app.user.apiToken %}
             <h1>Your API Token</h1>
-            <p><pre><code>{{ app.user.apiToken }}</code></pre></p>
+            <p><a href="#" onclick="this.parentNode.innerHTML = '<pre><code>{{ app.user.apiToken }}</code></pre>'; return false;">Show API Token</a></p>
             <p>You can use your API token to interact with the Packagist API.</p>
             <h1>GitHub Service Hook</h1>
             <p>Enabling the Packagist service hook ensures that your package will always be updated instantly when you push to GitHub. To do so you can go to your GitHub repository, click the "Settings" button, then "Service Hooks". Pick "Packagist" in the list, and add your API token (see above), plus your Packagist username if it is not the same as on GitHub. Check the "Active" box and submit the form.</p>