user_data.patch

Boris Parak, 02/16/2016 06:10 PM

Download (2.59 KB)

View differences:

src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js
258 258
        }
259 259
      }
260 260

  
261
      var user_data = $("#USER_DATA", context).val();
262
      if (user_data != "") {
263
        contextJSON["USER_DATA"] = user_data;
264
      }
265

  
261 266
      if (!$.isEmptyObject(contextJSON)) { templateJSON['CONTEXT'] = contextJSON; };
262 267
      if (!$.isEmptyObject(userInputsJSON)) { templateJSON['USER_INPUTS'] = userInputsJSON; };
263 268
    }
......
353 358
          $("#START_SCRIPT", context).val(atob(value));
354 359
        } else if ("START_SCRIPT" ==  key) {
355 360
          $("#START_SCRIPT", context).val(TemplateUtils.escapeDoubleQuotes(TemplateUtils.htmlDecode(value)));
361
        } else if ("USER_DATA" == key) {
362
          $("#USER_DATA", context).val(TemplateUtils.escapeDoubleQuotes(TemplateUtils.htmlDecode(value)));
356 363
        } else {
357 364
          customTagsJSON[key] = value;
358 365
        }
src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context/html.hbs
102 102
      </div>
103 103
      <div class="row">
104 104
        <div class="large-12 columns">
105
          <label for="USER_DATA">
106
            {{tr "User Data"}}
107
            {{{tip (tr "Cloud-init contextualization script")}}}
108
          </label>
109
          <textarea rows="6" type="text" id="USER_DATA" name="USER_DATA" />
110
        </div>
111
      </div>
112
      <div class="row">
113
        <div class="large-12 columns">
105 114
          <table class="service_custom_attrs policies_table dataTable">
106 115
            <thead>
107 116
              <tr>
108
-