Revision 9fc7770c

View differences:

src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general.js
161 161

  
162 162
      if (this.value == "vcenter"){
163 163
        $("#vcenter_template_ref", context).attr("required", "");
164
        $("#vcenter_instance_id", context).attr("required", "");
165
        $("#vcenter_ccr_ref", context).attr("required", "");
164 166
      } else {
165 167
        $("#vcenter_template_ref", context).removeAttr("required");
168
        $("#vcenter_instance_id", context).removeAttr("required");
169
        $("#vcenter_ccr_ref", context).removeAttr("required");
166 170
      }
167 171
      // There is another listener in context.js setup
168 172
    });
......
188 192
      templateJSON["MEMORY_COST"] = templateJSON["MEMORY_COST"] * 1024;
189 193
    if (templateJSON["HYPERVISOR"] == 'vcenter') {
190 194
      templateJSON["VCENTER_TEMPLATE_REF"] = WizardFields.retrieveInput($("#vcenter_template_ref", context));
195
      templateJSON["VCENTER_CCR_REF"] = WizardFields.retrieveInput($("#vcenter_ccr_ref", context));
196
      templateJSON["VCENTER_INSTANCE_ID"] = WizardFields.retrieveInput($("#vcenter_instance_id", context));
191 197

  
192 198
      if (Config.isFeatureEnabled("vcenter_vm_folder")) {
193 199
        templateJSON["VCENTER_VM_FOLDER"] = WizardFields.retrieveInput($("#vcenter_vm_folder", context))
......
309 315
      delete templateJSON["VCENTER_TEMPLATE_REF"];
310 316
    }
311 317

  
318
    if(templateJSON["VCENTER_CCR_REF"]){
319
      WizardFields.fillInput($("#vcenter_ccr_ref", context), templateJSON["VCENTER_CCR_REF"]);
320
      delete templateJSON["VCENTER_CCR_REF"];
321
    }
322

  
323
    if(templateJSON["VCENTER_INSTANCE_ID"]){
324
      WizardFields.fillInput($("#vcenter_instance_id", context), templateJSON["VCENTER_INSTANCE_ID"]);
325
      delete templateJSON["VCENTER_INSTANCE_ID"];
326
    }
327

  
312 328
    CapacityCreate.fill($("div.capacityCreate", context), templateJSON);
313 329

  
314 330
    WizardFields.fill(context, templateJSON);
src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/general/html.hbs
62 62
      <input type="text" id="vcenter_template_ref"/>
63 63
    </div>
64 64
  </div>
65
  <div class="row hypervisor only_vcenter" style="display: none;">
66
    <div class="medium-6 columns">
67
      <label  for="vcenter_ccr_ref">
68
        {{tr "vCenter Cluster Ref"}}
69
      </label>
70
      <input type="text" id="vcenter_ccr_ref"/>
71
    </div>
72
    <div class="medium-6 columns">
73
      <label  for="vcenter_instance_id">
74
        {{tr "vCenter Instance ID"}}
75
      </label>
76
      <input type="text" id="vcenter_instance_id"/>
77
    </div>
78
  </div>
65 79
  <div class="vcenter_rp_input row">
66 80
     <div class="large-3 medium-6 columns">
67 81
       <label>

Also available in: Unified diff