Index: trunk/extensions/SemanticForms/specials/SF_CreateForm.php |
— | — | @@ -43,18 +43,18 @@ |
44 | 44 | if ($action == "template") { |
45 | 45 | # if the button was pressed to remove this template, just don't |
46 | 46 | # add it to the array |
47 | | - if ($wgRequest->getVal("del_$id") != "Remove template") { |
| 47 | + if ($wgRequest->getVal("del_$id") != null) { |
| 48 | + $deleted_template_loc = $id; |
| 49 | + } else { |
48 | 50 | $form_template = SFTemplateInForm::create($val, |
49 | 51 | $wgRequest->getVal("label_$id"), |
50 | 52 | $wgRequest->getVal("allow_multiple_$id")); |
51 | 53 | $form_templates[] = $form_template; |
52 | | - } else { |
53 | | - $deleted_template_loc = $id; |
54 | 54 | } |
55 | 55 | } |
56 | 56 | } |
57 | 57 | } |
58 | | - if ($wgRequest->getVal('add_field') == wfMsg('sf_createform_add')) { |
| 58 | + if ($wgRequest->getVal('add_field') != null) { |
59 | 59 | $form_template = SFTemplateInForm::create($wgRequest->getVal('new_template'), "", false); |
60 | 60 | $new_template_loc = $wgRequest->getVal('before_template'); |
61 | 61 | # hack - array_splice() doesn't work for objects, so we have to |