mirror of
https://github.com/coder/coder.git
synced 2025-07-09 11:45:56 +00:00
Show template.display_name in the site UI (#5069)
* Show display_name field in the template settings * Show template.display_name on pages: Templates, CreateWorkspace * Fix: template.display_name pattern * make fmt/prettier * Fix tests * Fix: make fmt/prettier * Fix: merge * Fix: autoFocus * i18n: display_name
This commit is contained in:
@ -480,7 +480,9 @@ func (api *API) patchTemplateMeta(rw http.ResponseWriter, r *http.Request) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Update template metadata -- empty fields are not overwritten.
|
||||
// Update template metadata -- empty fields are not overwritten,
|
||||
// except for display_name, icon, and default_ttl.
|
||||
// The exception is required to clear content of these fields with UI.
|
||||
name := req.Name
|
||||
displayName := req.DisplayName
|
||||
desc := req.Description
|
||||
@ -490,9 +492,6 @@ func (api *API) patchTemplateMeta(rw http.ResponseWriter, r *http.Request) {
|
||||
if name == "" {
|
||||
name = template.Name
|
||||
}
|
||||
if displayName == "" {
|
||||
displayName = template.DisplayName
|
||||
}
|
||||
if desc == "" {
|
||||
desc = template.Description
|
||||
}
|
||||
|
Reference in New Issue
Block a user