Webアプリケーションフレームワーク Ethna の git向けリポジトリ
Revisión | bd72207257a0d1616f9a6dfe3df724e4e76dd1de (tree) |
---|---|
Tiempo | 2009-10-06 07:29:33 |
Autor | Yoshinari Takaoka <mumumu@mumu...> |
Commiter | Yoshinari Takaoka |
- fixed bug could not set "name" attribute of form tag. (thanks: shutta)
@@ -36,13 +36,14 @@ | ||
36 | 36 | - Ethna_Plugin::includePlugin メソッドの実装が動作するものではなかったので変更 |
37 | 37 | - Ethna_Plugin_Cachemanager のクラスのプロパティに指定する $namespace が意味をなしていなかったので修正 (#17753) |
38 | 38 | - PROJECT_DIR/lib/Ethna/extlib 以下にファイルを設置するタイプのプラグインを pear-local などでインストールすると、それ以後 |
39 | - ethnaコマンドが使えなくな問題を修正 | |
39 | + ethnaコマンドが使えなくなる問題を修正 | |
40 | 40 | - 新しいプラグインの命名規則に従っていない古いプラグインを別物として読み込もうとしてクラス名がかぶる問題を修正(#17875) thanks: id:okonomi |
41 | 41 | - 存在しない(or 削除された) ethnaコマンドを指定すると Fatal Error が起きるバグを修正 (thanks:kondo_) |
42 | 42 | -- http://sourceforge.jp/ticket/browse.php?group_id=1343&tid=17894 |
43 | 43 | - Ethna_Plugin_Logwriter の debug_backtrace の一部が取得できず、E_NOTICE が出るバグを修正 (thanks: http://www.remix.gr.jp/) |
44 | 44 | - cli 環境で Ethna_Session::start を叩いたときに $_SERVER 変数がないために E_NOTICE が出る問題を修正 |
45 | 45 | - Smartyのデリミタを変更している場合にi18nコマンドが機能しないバグを修正 (#18668) |
46 | +- formタグのname属性が設定できなくなっていたバグを修正 (thanks: shutta) (#19037) | |
46 | 47 | |
47 | 48 | ** 2.5.0-preview5 |
48 | 49 |
@@ -64,8 +64,10 @@ function smarty_block_form($params, $content, &$smarty, &$repeat) | ||
64 | 64 | // {form name=... } |
65 | 65 | // 指定された場合は、submitされた {form}を識別する |
66 | 66 | // id をhiddenタグで指定する |
67 | + // | |
68 | + // $params['name'] は formタグのnameタグになるため | |
69 | + // unset してはいけない | |
67 | 70 | $name = $params['name']; |
68 | - unset($params['name']); | |
69 | 71 | if ($name != 'default') { |
70 | 72 | $name_hidden = sprintf('<input type="hidden" name="ethna_fid" value="%s" />', |
71 | 73 | htmlspecialchars($name, ENT_QUOTES) |
@@ -88,5 +88,30 @@ class Ethna_ViewClass_FormHelper_Test extends Ethna_UnitTestBase | ||
88 | 88 | $this->assertPattern('#<textarea name="textarea_setactval">input</textarea>#', $result); |
89 | 89 | $this->assertPattern('#<textarea value="foo" name="textarea_settplval">foo</textarea>#', $result); |
90 | 90 | } |
91 | + | |
92 | + function test_formhelper_FormName() | |
93 | + { | |
94 | + $action_name = $tpl_name = 'formnametest'; | |
95 | + $action_skel = ETHNA_TEST_SKELDIR . 'skel.action.formhelper.php'; | |
96 | + $this->project->runCmd('add-action', | |
97 | + array( | |
98 | + '-s', | |
99 | + $action_skel, | |
100 | + $action_name, | |
101 | + ) | |
102 | + ); | |
103 | + $tpl_skel = ETHNA_TEST_SKELTPLDIR . 'skel.template.blockform.tpl'; | |
104 | + $this->project->runCmd('add-template', | |
105 | + array( | |
106 | + '-s', | |
107 | + $tpl_skel, | |
108 | + $tpl_name, | |
109 | + ) | |
110 | + ); | |
111 | + $result = $this->project->runMain($action_name, array()); | |
112 | + | |
113 | + $this->assertPattern('#<form name="hoge" method="post"><input type="hidden" name="ethna_fid" value="hoge" />#', $result); | |
114 | + } | |
115 | + | |
91 | 116 | } |
92 | 117 |
@@ -0,0 +1,3 @@ | ||
1 | +{form name="hoge" ethna_action="formnametest"} | |
2 | + {form_submit} | |
3 | +{/form} |