Merge pull request #1927 from kensible/1845-1907-userPassAndDirectUrl

Password fields one line, direct URL access for User edit
This commit is contained in:
kensible
2016-05-18 12:38:42 -04:00

View File

@@ -423,7 +423,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
scope[form.name + '_form'][fld].$setPristine(); scope[form.name + '_form'][fld].$setPristine();
scope[form.name + '_form'][fld].$setValidity('apiError', true); scope[form.name + '_form'][fld].$setValidity('apiError', true);
} }
if (f.chkPass && scope[form.name + '_form'][fld]) { if (f.chkPass && scope[form.name + '_form'][fld] && $AnsibleConfig) {
if ($AnsibleConfig.password_length) { if ($AnsibleConfig.password_length) {
scope[form.name + '_form'][fld].$setValidity('password_length', true); scope[form.name + '_form'][fld].$setValidity('password_length', true);
} }
@@ -786,6 +786,10 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
} }
if ((!field.readonly) || (field.readonly && options.mode === 'edit')) { if ((!field.readonly) || (field.readonly && options.mode === 'edit')) {
if((field.excludeMode === undefined || field.excludeMode !== options.mode)) {
html += "<div class='form-group Form-formGroup "; html += "<div class='form-group Form-formGroup ";
html += (field.type === "checkbox") ? "Form-formGroup--checkbox" : ""; html += (field.type === "checkbox") ? "Form-formGroup--checkbox" : "";
html += (field['class']) ? (field['class']) : ""; html += (field['class']) ? (field['class']) : "";
@@ -998,7 +1002,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
html += "<div class='error' id='" + this.form.name + "-" + fld + "-url-error' ng-show='" + this.form.name + "_form." + fld + html += "<div class='error' id='" + this.form.name + "-" + fld + "-url-error' ng-show='" + this.form.name + "_form." + fld +
".$error.awvalidurl'>\nPlease enter a URL that begins with ssh, http or https. The URL may not contain the '@' character.\n</div>\n"; ".$error.awvalidurl'>\nPlease enter a URL that begins with ssh, http or https. The URL may not contain the '@' character.\n</div>\n";
} }
if (field.chkPass) { if (field.chkPass && $AnsibleConfig) {
// password strength // password strength
if ($AnsibleConfig.password_length) { if ($AnsibleConfig.password_length) {
html += "<div class=\"error\" ng-show=\"" + this.form.name + '_form.' + fld + html += "<div class=\"error\" ng-show=\"" + this.form.name + '_form.' + fld +
@@ -1363,7 +1367,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
} }
//lookup type fields //lookup type fields
if (field.type === 'lookup' && (field.excludeMode === undefined || field.excludeMode !== options.mode)) { if (field.type === 'lookup') {
html += label(); html += label();
@@ -1445,6 +1449,7 @@ angular.module('FormGenerator', [GeneratorHelpers.name, 'Utilities', listGenerat
} }
html += "</div>\n"; html += "</div>\n";
} }
}
return html; return html;
}, },