Skip to content

Add a button editing action secret #34348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 8, 2025
1 change: 1 addition & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3733,6 +3733,7 @@ deletion = Remove secret
deletion.description = Removing a secret is permanent and cannot be undone. Continue?
deletion.success = The secret has been removed.
deletion.failed = Failed to remove secret.
edit = Edit secret
management = Secrets Management

[actions]
Expand Down
16 changes: 16 additions & 0 deletions templates/shared/secrets/add_list.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
data-modal="#add-secret-modal"
data-modal-form.action="{{.Link}}"
data-modal-header="{{ctx.Locale.Tr "secrets.creation"}}"
data-modal-secret-name.value=""
data-modal-secret-name.read-only=""
data-modal-secret-data=""
data-modal-secret-description=""
>
{{ctx.Locale.Tr "secrets.creation"}}
</button>
Expand Down Expand Up @@ -33,6 +37,18 @@
<span class="color-text-light-2">
{{ctx.Locale.Tr "settings.added_on" (DateUtils.AbsoluteShort .CreatedUnix)}}
</span>
<button class="ui btn interact-bg show-modal tw-p-2"
data-modal="#add-secret-modal"
data-modal-form.action="{{$.Link}}"
data-modal-header="{{ctx.Locale.Tr "secrets.creation"}}"
data-tooltip-content="{{ctx.Locale.Tr "secrets.edit"}}"
data-modal-secret-name.value="{{.Name}}"
data-modal-secret-name.read-only="true"
data-modal-secret-data=""
data-modal-secret-description="{{if .Description}}{{.Description}}{{end}}"
>
{{svg "octicon-pencil"}}
</button>
<button class="ui btn interact-bg link-action tw-p-2"
data-url="{{$.Link}}/delete?id={{.ID}}"
data-modal-confirm="{{ctx.Locale.Tr "secrets.deletion.description"}}"
Expand Down