Browse Source

DIV-970: Fixed alias fields not validated correctly.

pull/160/head
Charles Shin 6 years ago
parent
commit
c5b74b9c6e
4 changed files with 15 additions and 4 deletions
  1. +1
    -1
      edivorce/apps/core/static/css/main.css
  2. +1
    -0
      edivorce/apps/core/static/css/main.scss
  3. +9
    -0
      edivorce/apps/core/static/js/ajax.js
  4. +4
    -3
      edivorce/apps/core/templates/partials/alias_field.html

+ 1
- 1
edivorce/apps/core/static/css/main.css
File diff suppressed because it is too large
View File


+ 1
- 0
edivorce/apps/core/static/css/main.scss View File

@ -1011,6 +1011,7 @@ textarea {
-webkit-box-flex: 1;
-ms-flex: 1;
flex: 1;
width: 99%;
}
input.btn {


+ 9
- 0
edivorce/apps/core/static/js/ajax.js View File

@ -22,6 +22,15 @@ var ajaxOnChange = function () {
isValid = validateName(el);
}
// All alias fields must be validated as they are treated as a response to the one question.
if (el.is(".alias-names")) {
var aliasFields = $('.alias-names');
aliasFields.each(function(){
isValid = validateName($(this));
return isValid;
});
}
var skipAjax = el.attr('data-skip_ajax');
if (skipAjax !== undefined && skipAjax === "true") {
return;


+ 4
- 3
edivorce/apps/core/templates/partials/alias_field.html View File

@ -10,8 +10,9 @@
{% endcomment %}
<label>Also known as</label>
<span class="form-group">
{% input_field type="text" name=name value=value multiple="true" class="form-control response-textbox name" %}
</span>
<span class="form-group">
{% input_field type="text" name=name value=value multiple="true" class="form-control response-textbox alias-names" %}
</span>
<input type="button" class="btn btn-danger btn-delete-name form-control" value="Delete" />
</div>

Loading…
Cancel
Save