Revision 6b466453

View differences:

src/sunstone/public/app/tabs/images-tab/form-panels/create-common.js
432 432
      break;
433 433
    case "datablock":
434 434
      size = WizardFields.retrieveInput($('#img_size', context));
435

  
436
      if(size && $(".mb_input_unit", context).val() == "GB"){
437
        size = size * 1024;
438
        size = size.toString();
439
      }
435 440
      if (size) img_json["SIZE"] = size;
436 441

  
437 442
      var vcenter_disk_type = WizardFields.retrieveInput($('#vcenter_disk_type', context));
src/sunstone/public/app/tabs/images-tab/form-panels/create/wizard.hbs
99 99
    <div class="img_size row">
100 100
      <div class="medium-6 columns">
101 101
        <label for="img_size">
102
          {{tr "Size in MB"}}
102
          {{tr "Size"}}
103 103
        </label>
104
        <input type="text" name="img_size" id="img_size" />
104
        <div class="input-group mb_input_wrapper">
105
          <div class="input-group-field">
106
            <input type="text" name="img_size" id="img_size" />
107
          </div>
108
          <div class="input-group-button">
109
            <select class="mb_input_unit">
110
              <option value="MB">{{tr "MB"}}</option>
111
              <option value="GB" selected>{{tr "GB"}}</option>
112
            </select>
113
          </div>
114
        </div>
105 115
      </div>
106 116
      <div class="medium-6 columns only_vcenter">
107 117
        <label for="vcenter_disk_type">
src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab.js
148 148

  
149 149
    var tmpl = WizardFields.retrieve(selectedContext);
150 150

  
151
    if(tmpl.SIZE){
151
    if($(".mb_input_unit", context).val() == "GB"){
152 152
      tmpl.SIZE = tmpl.SIZE * 1024;
153
      tmpl.SIZE = tmpl.SIZE.toString();
153 154
    }
154 155

  
155 156
    if($("input[name='" + this.diskTabId + "']:checked", context).val() == "image" && !tmpl["IMAGE"] && !tmpl["IMAGE_ID"]){
src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/storage/disk-tab/html.hbs
62 62
</div>
63 63
<div id="disk_type" class="volatile" style="display: none;">
64 64
  <div class="row">
65
    <div class="medium-6 columns left">
65
    <div class="medium-6 columns">
66 66
      <label for="SIZE">
67
        {{tr "Size in GB"}}
67
        {{tr "Size"}}
68 68
      </label>
69
      <input wizard_field="SIZE" type="number" id="SIZE" name="SIZE"/>
69
      <div class="input-group mb_input_wrapper">
70
        <div class="input-group-field">
71
          <input wizard_field="SIZE" type="number" id="SIZE" name="SIZE"/>
72
        </div>
73
        <div class="input-group-button">
74
          <select class="mb_input_unit">
75
            <option value="MB">{{tr "MB"}}</option>
76
            <option value="GB" selected>{{tr "GB"}}</option>
77
          </select>
78
        </div>
79
      </div>
70 80
    </div>
71 81
  </div>
72 82
  <div class="row">

Also available in: Unified diff