This doesn't seem to break anything and probably fixes Dan's problem.

This commit is contained in:
James Taylor
2007-10-09 23:17:26 +00:00
parent 5de7853b81
commit 2471f3222f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -604,7 +604,7 @@ class Tool:
any_group_errors = False
# Check any removals before updating state
for i in range( len( group_state ) ):
if input.name + "_" + str(i) + "_remove" in incoming:
if key + "_" + str(i) + "_remove" in incoming:
del group_state[i]
# Update state
for i in range( len( group_state ) ):
@@ -621,7 +621,7 @@ class Tool:
else:
group_errors.append( {} )
# Check for addition
if input.name + "_add" in incoming:
if key + "_add" in incoming:
new_state = {}
self.fill_in_new_state( trans, input.inputs, new_state, context )
group_state.append( new_state )
+2 -2
View File
@@ -34,10 +34,10 @@
#end if
<div class="form-title-row"><b>${input.title} ${i + 1}</b></div>
$do_inputs( $input.inputs, $repeat_state[$i], $rep_errors, $prefix + $input.name + "_" + str(i) + "|", $context )
<div class="form-row"><input type="submit" name="${input.name}_${i}_remove" value="Remove ${input.title} ${i+1}"></div>
<div class="form-row"><input type="submit" name="${prefix}${input.name}_${i}_remove" value="Remove ${input.title} ${i+1}"></div>
</div>
#end for
<div class="form-row"><input type="submit" name="${input.name}_add" value="Add new ${input.title}"></div>
<div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div>
</div>
#elif $input.type == "conditional"
#set group_state = $tool_state[$input.name]