-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update vcs provider token (#594)
Fixes #576
- Loading branch information
Showing
26 changed files
with
410 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
internal/http/html/static/templates/content/vcs_provider_edit.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{{ template "layout" . }} | ||
|
||
{{ define "content-header-title" }} | ||
<a href="{{ vcsProvidersPath .Organization }}">vcs providers</a> | ||
/ | ||
{{ .VCSProvider.String }} | ||
/ | ||
settings | ||
{{ end }} | ||
|
||
{{ define "content" }} | ||
{{ template "vcs_provider_form" . }} | ||
<hr class="my-4"> | ||
<h3 class="font-semibold text-lg mb-2">Advanced</h3> | ||
<form action="{{ deleteVCSProviderPath .VCSProvider.ID }}" method="POST"> | ||
<button id="delete-vcs-provider-button" class="btn-danger" onclick="return confirm('Are you sure you want to delete?')"> | ||
Delete VCS provider | ||
</button> | ||
</form> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
internal/http/html/static/templates/partials/create_vcs_provider_form.tmpl
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
internal/http/html/static/templates/partials/vcs_provider_form.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{{ define "vcs_provider_form" }} | ||
<form class="flex flex-col gap-5" action="{{ .FormAction }}" method="POST"> | ||
<div class="field"> | ||
<label for="name">Name</label> | ||
<input class="text-input w-64" type="text" name="name" id="name" {{ if .VCSProvider.Name }}value="{{ .VCSProvider.Name }}"{{ else }} placeholder="{{ .VCSProvider.String }}"{{ end }}> | ||
<span class="description">An optional display name for your VCS provider.</span> | ||
</div> | ||
<div class="field"> | ||
<label for="token">Token</label> | ||
<textarea class="text-input w-96" rows="3" name="token" id="token" {{ if .EditMode }}placeholder="*****"{{ else }}required{{ end }}></textarea> | ||
</div> | ||
{{ if .EditMode }} | ||
<button class="btn w-32">Update</button> | ||
{{ else }} | ||
<button class="btn w-32">Create</button> | ||
<input type="hidden" name="cloud" id="cloud" value="{{ .VCSProvider.CloudConfig.Name }}"> | ||
{{ end }} | ||
</form> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.