AC-450 initialize SCM Branch title value when editing a project. Added awValidUrl directive.

This commit is contained in:
chouseknecht
2013-09-11 15:35:45 -04:00
parent 85833914ff
commit 39ceceb18e
5 changed files with 31 additions and 3 deletions

View File

@@ -414,6 +414,7 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += (field.autocomplete !== undefined) ? this.attr(field, 'autocomplete') : "";
html += (field.awRequiredWhen) ? "data-awrequired-init=\"" + field.awRequiredWhen.init + "\" aw-required-when=\"" +
field.awRequiredWhen.variable + "\" " : "";
html += (field.awValidUrl) ? "aw-valid-url " : "";
html += (field.associated && this.form.fields[field.associated].ask) ? "ng-disabled=\"" + field.associated + "_ask\" " : "";
html += " >\n";
}
@@ -450,6 +451,10 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
html += "<div class=\"error\" ng-show=\"" + this.form.name + '_form.' + fld +
".$error.awpassmatch\">Must match Password value</div>\n";
}
if (field.awValidUrl) {
html += "<div class=\"error\" ng-show=\"" + this.form.name + '_form.' + fld +
".$error.awvalidurl\">URL must begin with ssh, http or https and may not contain '@'</div>\n";
}
if (field.chkPass) {
html += "<div class=\"error\" ng-show=\"" + this.form.name + '_form.' + fld +