Make the hip chat setup field show more help information if the user enters a room name instead of a number
This commit is contained in:
parent
258e879d11
commit
d8048b09d2
4 changed files with 48 additions and 6 deletions
|
@ -38,6 +38,23 @@ angular.module('quay').directive('createExternalNotificationDialog', function ()
|
|||
$scope.unauthorizedEmail = false;
|
||||
};
|
||||
|
||||
$scope.hasRegexMismatch = function(err, fieldName) {
|
||||
if (!err.pattern) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0; i < err.pattern.length; ++i) {
|
||||
var current = err.pattern[i];
|
||||
var value = current.$viewValue;
|
||||
var elem = $element.find('#' + fieldName);
|
||||
if (value == elem[0].value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
$scope.createNotification = function() {
|
||||
if (!$scope.currentConfig.email) {
|
||||
$scope.performCreateNotification();
|
||||
|
|
Reference in a new issue