From 6518ebbe1241571021e301ca201f3849bf087f35 Mon Sep 17 00:00:00 2001 From: hyzboy Date: Wed, 22 Mar 2017 17:47:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=8C=89=E9=92=AE=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E9=A3=8E=E6=A0=BC=E6=9C=89=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- form/form.php | 11 +++++++++-- tools.php | 30 ++++++++++++++++++++++++++---- tools_button.php | 4 ++-- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/form/form.php b/form/form.php index 1057862..c9d1468 100644 --- a/form/form.php +++ b/form/form.php @@ -104,9 +104,16 @@ $this->add_hidden_value('form_time',$_SESSION["final_submit"]); } - public function submit_end($submit_name) + public function submit_end() { - echo ''; + $submit_name=func_get_arg(0); + + if(func_num_args()>1) + $button_style=func_get_arg(1); + else + $button_style="primary"; + + echo ''; echo ''; if($this->panel_title) diff --git a/tools.php b/tools.php index e430e36..44f69a6 100644 --- a/tools.php +++ b/tools.php @@ -111,14 +111,36 @@ echo get_span_label_html($style,$text); } - function get_icon_html($name) + function get_icon_html() { - return ''; + $name=func_get_arg(0); + + if(func_num_args()>1) + { + $style=func_get_arg(1); + + return ''; + } + else + { + return ''; + } } - function echo_icon($name) + function echo_icon() { - echo get_icon_html($name); + $name=func_get_arg(0); + + if(func_num_args()>1) + { + $style=func_get_arg(1); + + echo get_icon_html($name,$style); + } + else + { + echo get_icon_html($name); + } } function get_badge_html() diff --git a/tools_button.php b/tools_button.php index 177c3d6..f959412 100644 --- a/tools_button.php +++ b/tools_button.php @@ -11,5 +11,5 @@ foreach($value_list as $key=>$value) $ui->add_hidden_value($key,$value); - $ui->submit_end($button_text); - } \ No newline at end of file + $ui->submit_end($button_text,$button_style); + }