Skip to content

Commit

Permalink
Stop using obsolete form::close()
Browse files Browse the repository at this point in the history
Update the way we include the hidden CSRF field for InPlaceEdit.
  • Loading branch information
bharat committed Jan 29, 2010
1 parent 743fbe7 commit 0d73738
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/digibug/views/digibug_form.html.php
Expand Up @@ -3,7 +3,7 @@
<body>
<?= form::open("http://www.digibug.com/dapi/order.php") ?>
<?= form::hidden($order_parms) ?>
<?= form::close() ?>
</form>
<script type="text/javascript">
document.forms[0].submit();
</script>
Expand Down
1 change: 0 additions & 1 deletion modules/gallery/libraries/InPlaceEdit.php
Expand Up @@ -70,7 +70,6 @@ public function validate() {

public function render() {
$v = new View("in_place_edit.html");
$v->hidden = array("csrf" => access::csrf_token());
$v->action = url::site($this->action);
$v->form = $this->form;
$v->errors = $this->errors;
Expand Down
5 changes: 3 additions & 2 deletions modules/gallery/views/in_place_edit.html.php
@@ -1,5 +1,6 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?= form::open($action, array("method" => "post", "id" => "g-in-place-edit-form", "class" => "g-short-form"), $hidden) ?>
<?= form::open($action, array("method" => "post", "id" => "g-in-place-edit-form", "class" => "g-short-form")) ?>
<?= access::csrf_form_field() ?>
<ul>
<li<? if (!empty($errors["input"])): ?> class="g-error"<? endif ?>>
<?= form::input("input", $form["input"], " class=\"textbox\"") ?>
Expand All @@ -9,7 +10,7 @@
</li>
<li><a href="#" class="g-cancel"><?= t("Cancel") ?></a></li>
</ul>
<?= form::close() ?>
</form>
<? if (!empty($errors["input"])): ?>
<div id="g-in-place-edit-message" class="g-error"><?= $errors["input"] ?></div>
<? endif ?>
Expand Down

0 comments on commit 0d73738

Please sign in to comment.