Skip to content

Commit

Permalink
Cleanup some form related code
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Feb 6, 2014
1 parent 5035ca0 commit e145da4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ingo/js/rule.js
Expand Up @@ -7,9 +7,9 @@ var IngoRule = {

delete_condition: function(num)
{
document.rule.actionID.value = 'rule_delete';
document.rule.conditionnumber.value = num;
document.rule.submit();
$('actionID').setValue('rule_delete');
$('conditionnumber').setValue(num);
$('rule').submit();
return true;
},

Expand Down
8 changes: 4 additions & 4 deletions ingo/templates/basic/rule/rule.html.php
@@ -1,11 +1,11 @@
<form method="post" id="rule" name="rule" action="<?php echo $this->formurl ?>">
<input type="hidden" name="actionID" id="actionID" value="" />
<input type="hidden" name="conditionnumber" value="-1" />
<?php echo $this->hiddenFieldTag('actionID') ?>
<?php echo $this->hiddenFieldTag('conditionnumber', -1) ?>
<?php if (!is_null($this->edit)): ?>
<input type="hidden" name="edit" value="<?php echo $this->edit ?>" />
<?php echo $this->hiddenFieldTag('edit', $this->edit) ?>
<?php endif; ?>
<?php if (isset($this->rule['id'])): ?>
<input type="hidden" name="id" value="<?php echo $this->rule['id'] ?>" />
<?php echo $this->hiddenFieldTag('id', $this->rule['id']) ?>
<?php endif; ?>

<div class="header">
Expand Down

0 comments on commit e145da4

Please sign in to comment.