/** * 列表页面,matrix界面中的a标签按钮样式 * @param array $attrs a标签属性 * @param string $btn_css 按钮样式 * @param string $other_css 其它按钮样式 * @return string */ function matrix_a_btn($attrs, $btn_css = 'primary', $other_css = 'mr5') { $attrs = _matrix_widget_class($attrs, $btn_css, $other_css, 'btn'); return form_a($attrs, $attrs['text']); }
<?php theme::form_start($controller_path . '/forgot'); theme::header_start('Forgot Password'); theme::header_end(); hr(0, 12); /* 4px padding top and bottom */ theme::hero_copy('In order to receive your access code by email, please enter the email address you provided during the registration process.'); theme::start_form_section('Email', true, 5); text('email'); theme::end_form_section(); hr(0, 12); /* 4px padding top and bottom */ theme::footer_start(); theme::footer_button('submit'); theme::footer_required(); theme::footer_end(); echo '<p class="text-right"><br><br><br>'; form_a($login_page_url, 'Return to Login Page'); echo '</p>'; theme::form_end();
/** * moduleadd页面的view代码 */ function moduleadd_view($module, $files, $id) { $key_value = form_set_defaultvalue($module, 'module_key'); if ($id > 0) { //修改的时候是不需要下拉框的 $key = form_format_field_widget('选择模块', $key_value); } else { $key_attrs = array('name' => 'key', 'class' => 'span2', 'data-value-not-equals' => '', 'data-value-not-equals-message' => '请选择模块'); $key = matrix_select_attrs($files, $key_attrs, $key_value); $key = form_format_widget('选择模块', $key, true); } $name_value = form_set_defaultvalue($module, 'module_name'); $name_attr = array('name' => 'name', 'class' => 'span4', 'data-required' => 'true', 'data-required-message' => '请输入模块名'); $name = form_input($name_attr, $name_value); $name = form_format_widget('模块名称', $name, true); $sort_value = form_set_defaultvalue($module, 'sort'); $sort_attr = array('name' => 'sort', 'class' => 'span2', 'data-digits' => 'true', 'data-digits-message' => '请输入正确的排序数字'); $sort = form_input($sort_attr, $sort_value); $sort = form_format_widget('排序', $sort); $action_value = form_set_defaultvalue($module, 'action'); $action_attr = array('name' => 'action', 'class' => 'span2'); $action = form_input($action_attr, $action_value); $action = form_format_widget('默认功能', $action); $icon_value = form_set_defaultvalue($module, 'icon'); $icon_attr = array('name' => 'icon', 'class' => 'span2'); $icon = form_input($icon_attr, $icon_value); $icon_a_attr = array('target' => '_blank', 'href' => 'http://matrix.pwstrick.com/buttons.html'); $icon_prompt = '显示在左边菜单栏中的小icon,' . form_a($icon_a_attr, '查询icon名') . ',将“icon-”前缀去掉就是名字'; $icon = form_format_widget('默认icon', $icon, false, $icon_prompt); //form内容拼接 $forms = array(); $widget = array($key, $name, $sort, $action, $icon); //控件数组 $forms[] = form_detail_container($widget); $forms[] = form_detail_actions(); return form_implode($forms); }
<?php theme::form_start($controller_path . '/password'); theme::header_start('Forgot Password'); theme::header_end(); hr(0, 12); /* 4px padding top and bottom */ theme::start_form_section('New Password', true, 5); password('password'); theme::end_form_section(); theme::start_form_section('Confirm New Password', true, 5); password('confirm_password'); theme::end_form_section(); theme::start_form_section(''); echo $password_format; theme::end_form_section(); hidden('a', $hmac); hidden('b', $key); hr(0, 12); /* 4px padding top and bottom */ theme::footer_start(); theme::footer_button('submit'); theme::footer_required(); theme::footer_end(); echo '<p class="text-right"><br><br><br>'; form_a($login_page_url, 'Return to Home Page'); echo '</p>'; theme::form_end();