Permalink
Browse files

Use string template.

  • Loading branch information...
1 parent 5662eaa commit 19903b0cbfd616e7de095cc6fe0f2d41506f6719 @ADmad ADmad committed Feb 18, 2014
Showing with 7 additions and 7 deletions.
  1. +7 −7 src/View/Helper/FormHelper.php
@@ -501,7 +501,7 @@ public function secure($fields = array()) {
$out .= $this->hidden('_Token.unlocked', array(
'value' => urlencode($unlocked),
));
- return $this->Html->useTag('hiddenblock', $out);
+ return $this->formatTemplate('hiddenblock', ['content' => $out]);
}
/**
@@ -1618,8 +1618,8 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag
}
$formName = str_replace('.', '', uniqid('post_', true));
- $formUrl = $this->url($url);
$formOptions = array(
+ 'action' => $this->url($url),
'name' => $formName,
'id' => $formName,
'style' => 'display:none;',
@@ -1630,10 +1630,10 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag
unset($options['target']);
}
- $out = $this->Html->useTag('form', $formUrl, $formOptions);
- $out .= $this->Html->useTag('hidden', '_method', array(
- 'value' => $requestMethod
- ));
+ $out = $this->formatTemplate('formstart', [
+ 'attrs' => $this->_templater->formatAttributes($formOptions)
+ ]);
+ $out .= $this->hidden('_method', ['value' => $requestMethod]);
$out .= $this->_csrfField();
$fields = array();
@@ -1645,7 +1645,7 @@ public function postLink($title, $url = null, $options = array(), $confirmMessag
unset($options['data']);
}
$out .= $this->secure($fields);
- $out .= $this->Html->useTag('formend');
+ $out .= $this->formatTemplate('formend', []);
if ($options['block']) {
$this->_View->append($options['block'], $out);

0 comments on commit 19903b0

Please sign in to comment.