From: <ma...@us...> - 2012-05-06 20:37:40
|
Revision: 9442 http://xoops.svn.sourceforge.net/xoops/?rev=9442&view=rev Author: mageg Date: 2012-05-06 20:37:34 +0000 (Sun, 06 May 2012) Log Message: ----------- add template for xoops confirm Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_confirm.html Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-05-06 11:09:46 UTC (rev 9441) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoops.php 2012-05-06 20:37:34 UTC (rev 9442) @@ -1158,25 +1158,25 @@ public function confirm($hiddens, $action, $msg, $submit = '', $addtoken = true) { $submit = ($submit != '') ? trim($submit) : _SUBMIT; - echo '<div class="confirmMsg">' . $msg . '<br /> - <form method="post" action="' . $action . '">'; + $this->tpl->assign('msg', $msg); + $this->tpl->assign('action', $action); + $this->tpl->assign('submit', $submit); + $str_hiddens = ''; foreach ($hiddens as $name => $value) { if (is_array($value)) { foreach ($value as $caption => $newvalue) { - echo '<input type="radio" name="' . $name . '" value="' . htmlspecialchars($newvalue) . '" /> ' . $caption; + $str_hiddens .= '<input type="radio" name="' . $name . '" value="' . htmlspecialchars($newvalue) . '" > ' . $caption . NWLINE; } - echo '<br />'; + $str_hiddens .= '<br />' . NWLINE; } else { - echo '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />'; + $str_hiddens .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />' . NWLINE; } } if ($addtoken != false) { - echo $this->security->getTokenHTML(); + $this->tpl->assign('token', $this->security->getTokenHTML()); } - echo '<input type="submit" name="confirm_submit" value="' . $submit . '" title="' . $submit . '"/> - <input type="button" name="confirm_back" value="' . _CANCEL . '" onclick="javascript:history.go(-1);" title="' . _CANCEL . '" /> - </form> - </div>'; + $this->tpl->assign('hiddens', $str_hiddens); + $this->tpl->display('module:system|system_confirm.html'); } /** Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_confirm.html =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_confirm.html (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/templates/system_confirm.html 2012-05-06 20:37:34 UTC (rev 9442) @@ -0,0 +1,11 @@ +<div class="confirmMsg"> + <{$msg}> + <br /> + <form name="confirm" id="confirm" action="<{$action}>" method="post"> + <{$hiddens}> + <{$token}> + <input class="btn btn-danger" type="submit" name="confirm_submit" value="<{$submit}>" title="<{$submit}>"> + <input class="btn" type="button" name="confirm_back" value="<{$smarty.const._CANCEL}>" onclick="javascript:history.go(-1);" title="<{$smarty.const._CANCEL}>"> + + </form> +</div> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-05-06 11:09:46 UTC (rev 9441) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/xoops_version.php 2012-05-06 20:37:34 UTC (rev 9442) @@ -76,6 +76,7 @@ $modversion['templates'][] = array('file' => 'system_block_dummy.html', 'description' => ''); $modversion['templates'][] = array('file' => 'system_homepage.html', 'description' => ''); $modversion['templates'][] = array('file' => 'system_form.html', 'description' => ''); +$modversion['templates'][] = array('file' => 'system_confirm.html', 'description' => ''); // Admin Templates /*$modversion['templates'][] = array('file' => 'system_header.html', 'description' => '', 'type' => 'admin'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |