Fix from Ole Laursen for the javascript managing status-change document relationships. Fixes #1899.

- Legacy-Id: 10757
This commit is contained in:
Robert Sparks 2016-01-29 16:58:29 +00:00
parent a9abd3c2cd
commit 3b4ae894f4
2 changed files with 6 additions and 6 deletions

View file

@ -1,6 +1,6 @@
$(function () {
var form = $(".content-wrapper form");
var newRowHtml = form.find(".new-row").get(0).outerHTML;
var form = $(".new-relation-row").closest("form");
var newRowHtml = form.find(".new-relation-row").get(0).outerHTML;
var counter = 1;
form.on("click", ".delete", function (e) {
@ -8,9 +8,9 @@ $(function () {
$(this).closest(".row").remove();
});
form.on("keydown", ".new-row input[type=text]", function () {
var top = $(this).closest(".new-row");
top.removeClass("new-row");
form.on("keydown", ".new-relation-row input[type=text]", function () {
var top = $(this).closest(".new-relation-row");
top.removeClass("new-relation-row");
top.find(".help-block").remove();
top.find(".delete").show();
top.find("input,select").each(function () {

View file

@ -20,7 +20,7 @@
</div>
{% endfor %}
<div class="form-group new-row">
<div class="form-group new-relation-row">
<div class="row">
<div class="col-md-5">
<input name="new_relation_row_" type="text" class="form-control" placeholder="rfc...">