Tweak default revision text

Set fake enabled checkbox if first and only revision (backend sets default for
this one automatically so lets fake it because its going to be set whether they
want it or not.
This commit is contained in:
Westly Wright 2019-08-05 16:48:57 -07:00
parent 80fc4b6efb
commit 1539459372
No known key found for this signature in database
GPG Key ID: 4FAB3D8673DC54A3
2 changed files with 17 additions and 9 deletions

View File

@ -27,16 +27,25 @@
<div class="row pb-20">
<div class="col span-6">
<label class="acc-label">
{{t "cruClusterTemplate.default.label"}}
</label>
<div class="radio">
<label>
{{input
type="checkbox"
classNames="form-control"
checked=setDefaultTemplateRevision
}}
{{t "cruClusterTemplate.default.flag"}}
{{log clusterTemplate.revisions.length}}
{{#if (eq clusterTemplate.revisions.length 0)}}
{{input
type="checkbox"
classNames="form-control"
checked=true
disabled=true
}}
{{else}}
{{input
type="checkbox"
classNames="form-control"
checked=setDefaultTemplateRevision
}}
{{/if}}
{{t "cruClusterTemplate.default.label"}}
</label>
</div>
</div>

View File

@ -3442,8 +3442,7 @@ cruClusterTemplate:
source:
label: 'Source Revision'
default:
label: 'Set As Default Revision'
flag: 'Enabled'
label: 'Default Revision'
members:
label: 'Share Template'
detail: 'Share this cluster template with individual members or make it public to your orginization.'