summaryrefslogtreecommitdiff
path: root/app/views/profiles/personal_access_tokens/index.html.haml
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-06-02 08:27:47 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-06-02 11:06:38 +0530
commit4d50d8a6e3b8ae1521617df32af4cad18385fb9f (patch)
tree8d4e5fe2362d347600049ed934ff511c86e218d5 /app/views/profiles/personal_access_tokens/index.html.haml
parentc75aea5e4dc6f4420e7576a5c367a9e035f63646 (diff)
downloadgitlab-ce-4d50d8a6e3b8ae1521617df32af4cad18385fb9f.tar.gz
Only show a personal access token right after its creation.
Diffstat (limited to 'app/views/profiles/personal_access_tokens/index.html.haml')
-rw-r--r--app/views/profiles/personal_access_tokens/index.html.haml26
1 files changed, 12 insertions, 14 deletions
diff --git a/app/views/profiles/personal_access_tokens/index.html.haml b/app/views/profiles/personal_access_tokens/index.html.haml
index b4468dd9839..503f88efb43 100644
--- a/app/views/profiles/personal_access_tokens/index.html.haml
+++ b/app/views/profiles/personal_access_tokens/index.html.haml
@@ -8,6 +8,16 @@
%p
You can generate a personal access token for each application you use that needs access to GitLab.
.col-lg-9
+
+ - if flash[:personal_access_token]
+ .panel.panel-success
+ .panel-heading Success!
+ .panel-body
+ Your new personal access token has been created. Make sure to save it - you can't see it again on this page.
+ .created-personal-access-token
+ %pre= flash[:personal_access_token]
+ = clipboard_button(clipboard_text: flash[:personal_access_token])
+
%h5.prepend-top-0
Add a Personal Access Token
%p.profile-settings-content
@@ -37,7 +47,6 @@
%thead
%tr
%th Name
- %th Token
%th Created
%th Expires
%th Actions
@@ -45,11 +54,6 @@
- @active_personal_access_tokens.each do |token|
%tr
%td= token.name
- %td.input-group.personal-access-tokens-token-column
- %input.form-control{ type: "text", value: token.token, readonly: true }
- %div.input-group-btn
- %button.btn.btn-default{ type: "button", data: { clipboard_text: token.token } }
- %i.fa.fa-clipboard
%td= token.created_at.to_date.to_s(:medium)
- if token.expires_at.present?
%td= token.expires_at.to_date.to_s(:medium)
@@ -71,17 +75,11 @@
%thead
%tr
%th Name
- %th Token
%th Created
%tbody
- @inactive_personal_access_tokens.each do |token|
%tr
%td= token.name
- %td.input-group.personal-access-tokens-token-column
- %input.form-control{ type: "text", value: token.token, readonly: true }
- %div.input-group-btn
- %button.btn.btn-default{ type: "button", data: { clipboard_text: token.token } }
- %i.fa.fa-clipboard
%td= token.created_at.to_date.to_s(:medium)
- else
@@ -91,5 +89,5 @@
:javascript
$(".datepicker").datepicker({
dateFormat: "yy-mm-dd",
- onSelect: function(dateText, inst) { $("#personal_access_token_params_expires_at").val(dateText) }
- }).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $('#personal_access_token_params_expires_at').val()));
+ onSelect: function(dateText, inst) { $("#personal_access_token_expires_at").val(dateText) }
+ }).datepicker("setDate", $.datepicker.parseDate('yy-mm-dd', $('#personal_access_token_expires_at').val()));