mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 23:07:42 -02:30
Initial stab URL validation. Adding '*' to label is now done via CSS :before rather than jquery DOM manipulation.
This commit is contained in:
@@ -92,10 +92,9 @@ angular.module('FormGenerator', ['GeneratorHelpers', 'ngCookies'])
|
||||
// Prepend an asterisk to required field label
|
||||
$('.form-control[required]').each(function() {
|
||||
var label = $(this).parent().parent().find('label');
|
||||
var rgx = /^\*/;
|
||||
if ( !rgx.test(label.text()) ) {
|
||||
// required field does not have leading *
|
||||
label.prepend('* ');
|
||||
if (label && !label.hasClass('prepend-asterisk')) {
|
||||
console.log('adding prepend');
|
||||
label.addClass('prepend-asterisk');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user