Bläddra i källkod

Hide API token by default, make visible with a click

Jordi Boggiano 12 år sedan
förälder
incheckning
58473be3a0
1 ändrade filer med 1 tillägg och 1 borttagningar
  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>