11<li data-test-input-variables-list-item>
22 {{ #if (or this.isEditing this.isCreating )}}
3- <form class =" pds-form" data-test-input-variables-form {{ on " submit" this.saveVariable }} >
4- <div part =" fields" class =" card" >
5- <div class =" card-header" >
6- <h4 >{{ t " form.project_variables_settings.title" }} </h4 >
3+ <form class =' pds-form' data-test-input-variables-form {{ on ' submit' this.saveVariable }} >
4+ <div part =' fields' class =' card' >
5+ <div class =' card-header' >
6+ <h4 >{{ t ' form.project_variables_settings.title' }} </h4 >
77 </div >
8- <fieldset class =" pds-formFieldSet" >
9- <div class =" pds-formField" >
10- <label for =" input-variable-name" class =" pds-fieldName" >
11- {{ t " form.project_variables_settings.variable_name" }}
8+ <fieldset class =' pds-formFieldSet' >
9+ <div class =' pds-formField' >
10+ <label for =' input-variable-name' class =' pds-fieldName' >
11+ {{ t ' form.project_variables_settings.variable_name' }}
1212 </label >
1313 <Pds::Input
14- @type =" text"
14+ @type =' text'
1515 data-test-input-variables-var-name
16- id =" input-variable-name"
17- placeholder ={{ t " form.project_variables_settings.variable_name_placeholder" }}
16+ id =' input-variable-name'
17+ placeholder ={{ t ' form.project_variables_settings.variable_name_placeholder' }}
1818 value ={{ this.variable.name }}
19- {{ on " input" (pick " target.value" (set this " variable.name" ))}}
19+ {{ on ' input' (pick ' target.value' (set this ' variable.name' ))}}
2020 />
2121 </div >
22- <div class =" pds-formField" >
23- <label for =" input-variable-value" class =" pds-fieldName" >
24- {{ t " form.project_variables_settings.variable_value" }}
22+ <div class =' pds-formField' >
23+ <label for =' input-variable-value' class =' pds-fieldName' >
24+ {{ t ' form.project_variables_settings.variable_value' }}
2525 </label >
26- <div class =" pds-formField__input-inline-toggle" >
26+ <div class =' pds-formField__input-inline-toggle' >
2727 {{ #if this.isHcl }}
2828 <Pds::Input
29- @type =" text"
29+ @type =' text'
3030 data-test-input-variables-var-hcl
31- id =" input-variable-value"
32- placeholder ={{ t " form.project_variables_settings.variable_value_placeholder" }}
33- value ={{ this.variable.hcl }}
34- {{ on " input" (pick " target.value" (set this " variable.hcl" ))}}
31+ id =' input-variable-value'
32+ placeholder ={{ if
33+ this.writeOnly
34+ (t ' form.project_variables_settings.variable_value_placeholder_sensitive' )
35+ (t ' form.project_variables_settings.variable_value_placeholder' )
36+ }}
37+ value ={{ if this.writeOnly ' ' this.variable.hcl }}
38+ {{ on ' input' (pick ' target.value' (set this ' variable.hcl' ))}}
3539 />
3640 {{ else }}
3741 <Pds::Input
38- @type =" text"
39- id =" input-variable-value"
42+ @type =' text'
43+ id =' input-variable-value'
4044 data-test-input-variables-var-str
41- placeholder ={{ t " form.project_variables_settings.variable_value_placeholder" }}
42- value ={{ this.variable.str }}
43- {{ on " input" (pick " target.value" (set this " variable.str" ))}}
45+ placeholder ={{ if
46+ this.writeOnly
47+ (t ' form.project_variables_settings.variable_form_placeholder_sensitive' )
48+ (t ' form.project_variables_settings.variable_value_placeholder' )
49+ }}
50+ value ={{ if this.writeOnly ' ' this.variable.str }}
51+ {{ on ' input' (pick ' target.value' (set this ' variable.str' ))}}
4452 />
4553 {{ /if }}
46- <span class =" pds-input-inline-toggle" >
54+ <span class =' pds-input-inline-toggle' >
4755 <input
48- type =" checkbox"
56+ type =' checkbox'
4957 data-test-input-variables-toggle-hcl
50- id =" input-variable-hcl"
58+ id =' input-variable-hcl'
5159 checked ={{ this.isHcl }}
52- {{ on " change" (fn this.toggleHcl this.variable )}} >
53- <label for =" input-variable-hcl" >HCL</label >
60+ {{ on ' change' (fn this.toggleHcl this.variable )}}
61+ />
62+ <label for =' input-variable-hcl' >HCL</label >
5463 </span >
5564 </div >
65+ <div class =' pds-formField__input-inline-toggle' >
66+ <Hds::Form::Toggle::Field
67+ data-test-input-variables-toggle-sensitive
68+ checked ={{ this.isSensitive }}
69+ {{ on ' change' (fn this.toggleSensitive this.variable )}}
70+ as |F|
71+ >
72+ <F .Label>
73+ {{ t ' form.project_variables_settings.variable_set_sensitive' }}
74+ </F .Label>
75+ </Hds::Form::Toggle::Field >
76+ </div >
5677 </div >
5778 </fieldset >
58- <div class =" card-footer" >
79+ <div class =' card-footer' >
5980 <Pds::ButtonSet >
60- <Pds::Button
61- data-test-input-variables-edit-save
62- @variant =" primary"
63- @type =" submit" >
64- {{ t " form.project_variables_settings.button_submit" }}
81+ <Pds::Button data-test-input-variables-edit-save @variant =' primary' @type =' submit' >
82+ {{ t ' form.project_variables_settings.button_submit' }}
6583 </Pds::Button >
6684 <Pds::Button
6785 data-test-input-variables-edit-cancel
68- @variant =" secondary"
69- {{ on " click"
70- (if this.isCreating this.cancelCreate this.cancelEdit )
71- }} >
72- {{ t " form.project_variables_settings.button_cancel" }}
86+ @variant =' secondary'
87+ {{ on ' click' (if this.isCreating this.cancelCreate this.cancelEdit )}}
88+ >
89+ {{ t ' form.project_variables_settings.button_cancel' }}
7390 </Pds::Button >
7491 </Pds::ButtonSet >
7592 </div >
7693 </div >
7794 </form >
7895 {{ else }}
79- <div class =" variables--list-item" >
80- <span class =" variables--list-item-name" data-test-input-variables-var-name>{{ this.variable.name }} </span >
81- <span class =" variables--list-item-value" data-test-input-variables-var-value>
82- {{ #if this.isHcl }}
83- <b class =" badge" data-test-input-variables-list-item-is-hcl>
96+ <div class =' variables--list-item' >
97+ <span class =' variables--list-item-name' data-test-input-variables-var-name>{{ this.variable.name }} </span >
98+ <span class =' variables--list-item-value' data-test-input-variables-var-value>
99+ {{ #if this.isSensitive }}
100+ <Hds::Badge
101+ data-test-sensitive-var-badge
102+ @icon =' eye-off'
103+ @text ={{ t ' form.project_variables_settings.variable_value_placeholder_sensitive' }}
104+ />
105+ {{ else if this.isHcl}}
106+ <b class =' badge' data-test-input-variables-list-item-is-hcl>
84107 HCL
85108 </b >
86109 {{ this.variable.hcl }}
87110 {{ else }}
88111 {{ this.variable.str }}
89112 {{ /if }}
90113 </span >
91- <Pds::Dropdown @align =" right" as |D|>
92- <D .Trigger
93- data-test-input-variables-dropdown
94- @variant =" ghost" >
114+ <Pds::Dropdown @align =' right' as |D|>
115+ <D .Trigger data-test-input-variables-dropdown @variant =' ghost' >
95116 Actions
96117 </D .Trigger>
97- <D .Dialog >
118+ <D .Dialog>
98119 <section >
99120 <Pds::Button
100121 data-test-input-variables-dropdown-edit
101- @variant =" secondary"
102- {{ on " click" (fn this.editVariable this.variable )}} >
122+ @variant =' secondary'
123+ {{ on ' click' (fn this.editVariable this.variable )}}
124+ >
103125 Edit
104126 </Pds::Button >
105127 <Pds::Button
106128 data-test-input-variables-dropdown-delete
107- @variant =" warning"
108- {{ on " click" (fn this.deleteVariable this.variable )}} >
129+ @variant =' warning'
130+ {{ on ' click' (fn this.deleteVariable this.variable )}}
131+ >
109132 Delete
110133 </Pds::Button >
111134 </section >
112135 </D .Dialog>
113136 </Pds::Dropdown >
114137 </div >
115138 {{ /if }}
116- </li >
139+ </li >
0 commit comments