Merge pull request #5389 from ryanpetrello/fix-5387

don't trim newlines from custom inventory scripts; they may be relevant
This commit is contained in:
Ryan Petrello 2017-02-17 16:55:21 -05:00 committed by GitHub
commit 080b7fd5c2
2 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,7 @@ export default ['i18n', function(i18n) {
required: true,
awDropFile: true,
ngDisabled: '!(inventory_script_obj.summary_fields.user_capabilities.edit || canAdd)',
ngTrim: false,
rows: 10,
awPopOver: "<p>" + i18n._("Drag and drop your custom inventory script file here or create one in the field to import your custom inventory.") + " " +
"<br><br> " + i18n.sprintf(i18n._("Script must begin with a hashbang sequence: i.e.... %s"), "#!/usr/bin/env python") + "</p>",

View File

@ -1014,6 +1014,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += (field.ngDisabled) ? this.attr(field, 'ngDisabled'): "";
html += (field.required) ? "required " : "";
html += (field.ngRequired) ? "ng-required=\"" + field.ngRequired +"\"" : "";
html += (field.ngTrim !== undefined) ? "ng-trim=\"" + field.ngTrim +"\"" : "";
html += (field.readonly || field.showonly) ? "readonly " : "";
html += (field.awDropFile) ? "aw-drop-file " : "";
if(field.awRequiredWhen) {