public function ajaxGetGroupPrivsByMethod($module, $method) { $groupObjs = $this->kevinlogin->getGroupPrivsByMethod($module, $method); $groupArray = array_keys($groupObjs); $chosenGroupStr = implode(',', $groupArray); die(html::select('groups[]', $this->loadModel('group')->getPairs(), $chosenGroupStr, "multiple='multiple' style='height:200px' class='form-control'")); }
/** * Set the menu. * * @param array $users user pairs * @param string $account current account * @access public * @return void */ public function setMenu($users, $account) { $methodName = $this->app->getMethodName(); $selectHtml = html::select('account', $users, $account, "onchange=\"switchAccount(this.value, '{$methodName}')\""); foreach ($this->lang->user->menu as $key => $value) { $replace = $key == 'account' ? $selectHtml : $account; common::setMenuVars($this->lang->user->menu, $key, $replace); } }
public function ajaxGetBranches($productID) { $product = $this->loadModel('product')->getById($productID); if (empty($product) or $product->type == 'normal') { die; } $branches = $this->branch->getPairs($productID); die(html::select('branch', $branches, '', "class='form-control' onchange='loadBranch()'")); }
/** * Render * * @param object $object * @return string */ public static function render($object) { $input = $object->options['input']; // generating form $table = ['header' => ['column' => i18n(null, 'Column'), 'value' => i18n(null, 'Value')], 'options' => [], 'skip_header' => 1]; $model = new object_content_exports(); $table['options'][0]['column'] = ['value' => i18n(null, 'Format') . ':', 'width' => '1%', 'nowrap' => true, 'class' => 'list_filter_name']; $table['options'][0]['value']['value'] = html::select(['id' => 'export_format', 'name' => 'export[format]', 'options' => $model->options(['i18n' => true]), 'value' => $input['export']['format'] ?? null]); $body = html::table($table); $footer = html::button2(['name' => 'submit_export', 'value' => i18n(null, 'Submit'), 'type' => 'primary', 'onclick' => "if (\$('#export_format').val() == 'html2') { \$('#list_{$object->list_link}_form').attr('target', '_blank'); } else { \$('#list_{$object->list_link}_form').attr('target', '_self'); } \$('#list_{$object->list_link}_form').attr('no_ajax', 1); numbers.modal.hide('list_{$object->list_link}_export'); return true;"]); return html::modal(['id' => "list_{$object->list_link}_export", 'class' => '', 'title' => i18n(null, 'Export/Print'), 'body' => $body, 'footer' => $footer]); }
/** * Set menus * * @param array $libs * @param int $libID * @param string $extra * @access public * @return void */ public function setMenu($libs, $libID, $extra = '') { $currentModule = $this->app->getModuleName(); $currentMethod = $this->app->getMethodName(); $selectHtml = html::select('libID', $libs, $libID, "onchange=\"switchDocLib(this.value, '{$currentModule}', '{$currentMethod}', '{$extra}');\""); common::setMenuVars($this->lang->doc->menu, 'list', $selectHtml . $this->lang->arrow); foreach ($this->lang->doc->menu as $key => $menu) { if ($key != 'list') { common::setMenuVars($this->lang->doc->menu, $key, $libID); } } }
/** * see html::select(); */ public static function select($options = []) { // we do not process readonly selects if (empty($options['readonly'])) { // include js & css files layout::add_js('/numbers/media_submodules/numbers_frontend_components_select_numbers_media_js_base.js', 10000); layout::add_css('/numbers/media_submodules/numbers_frontend_components_select_numbers_media_css_base.css', 10000); // font awesome icons library::add('fontawesome'); // id with name if (empty($options['id']) && !empty($options['name'])) { $options['id'] = $options['name']; } layout::onload('numbers_select(' . json_encode(['id' => $options['id']]) . ');'); } // must gain proper class from previous submodule $options['flag_call_previous_parent'] = true; return html::select($options); }
/** * Render * * @param object $object * @return string */ public static function render($object) { $input = $object->options['input']; if (empty($input['sort'])) { $i = 0; foreach ($object->orderby as $k => $v) { $input['sort'][$i]['column'] = $k; $input['sort'][$i]['order'] = $v; $i++; } } // generating form $table = ['header' => ['row_number' => ' ', 'column' => i18n(null, 'Column'), 'order' => i18n(null, 'Order')], 'options' => []]; $order_model = new object_data_model_order(); $columns = []; // we need to skip certain columns foreach ($object->columns as $k => $v) { if (!in_array($k, ['row_number', 'offset_number', 'action'])) { $v['name'] = i18n(null, $v['name']); $columns[$k] = $v; } } // full text search goes last if (!empty($object->filter['full_text_search'])) { $columns['full_text_search'] = ['name' => i18n(null, 'Text Search')]; } // render 5 rows for ($i = 0; $i < 5; $i++) { if (empty($input['sort'][$i]['column'])) { $input['sort'][$i]['order'] = SORT_ASC; } $column = html::select(['id' => 'sort_' . $i . '_column', 'name' => 'sort[' . $i . '][column]', 'options' => $columns, 'value' => $input['sort'][$i]['column'] ?? null]); $order = html::select(['id' => 'sort_' . $i . '_order', 'name' => 'sort[' . $i . '][order]', 'no_choose' => true, 'options' => $order_model->options(['i18n' => true]), 'value' => $input['sort'][$i]['order'] ?? null]); $table['options'][$i] = ['row_number' => ['value' => format::id($i + 1) . '.', 'width' => '1%', 'align' => 'right'], 'column' => ['value' => $column, 'width' => '25%', 'class' => 'list_sort_name'], 'order' => ['value' => $order, 'width' => '30%']]; } $body = html::table($table); $footer = html::button2(['name' => 'submit_sort', 'value' => i18n(null, 'Submit'), 'type' => 'primary', 'onclick' => "numbers.modal.hide('list_{$object->list_link}_sort'); \$('#list_{$object->list_link}_form').attr('target', '_self'); \$('#list_{$object->list_link}_form').attr('no_ajax', ''); return true;"]); return html::modal(['id' => "list_{$object->list_link}_sort", 'class' => 'large', 'title' => i18n(null, 'Sort'), 'body' => $body, 'footer' => $footer]); }
<th><?php echo $lang->block->showCategory; ?> </th> <td> <div class='input-group'> <span class='input-group-addon'> <input type='checkbox' name='params[showCategory]' <?php if (isset($block->content->showCategory) && $block->content->showCategory) { echo 'checked'; } ?> value='1' /> </span> <?php echo html::select('params[categoryName]', $lang->block->category->showCategoryList, isset($block->content->categoryName) ? $block->content->categoryName : '', "class='form-control'"); ?> </div> </td> </tr> <tr> <th><?php echo $lang->block->showImage; ?> </th> <td><input type='checkbox' name='params[image]' <?php if (isset($block->content->image) && $block->content->image) { echo 'checked'; } ?> value='1' /></td>
<th class='w-100px'><?php echo $lang->product->category; ?> </th> <td class='w-p40'><?php echo html::select("categories[]", $categories, array_keys($product->categories), "multiple='multiple' class='form-control chosen'"); ?> </td><td></td> </tr> <tr> <th><?php echo $lang->product->status; ?> </th> <td><?php echo html::select("status", $lang->product->statusList, $product->status, "class='form-control'"); ?> </td> </tr> <tr> <th><?php echo $lang->product->name; ?> </th> <td colspan='2'> <div class='row order'> <div class='col-sm-10'><?php echo html::input('name', $product->name, "class='form-control'"); ?> </div> <div class='col-sm-2'>
?> <form method='post' action='<?php echo inlink('confirm'); ?> '> <div class='container'> <div class='modal-dialog'> <div class='modal-header'> <h3><?php echo $lang->upgrade->selectVersion; ?> </h3> </div> <div class='modal-body'> <div class='form-group'> <?php echo html::select('fromVersion', $lang->upgrade->fromVersions, $version, "class='form-control single-input'"); echo " <span class='text-danger help-inline'>{$lang->upgrade->versionNote}</span>"; ?> </div> </div> <div class='modal-footer'> <?php echo html::submitButton($lang->upgrade->common); ?> </div> </div> </div> </form> <?php include '../../install/view/footer.html.php';
echo html::input('name', $this->config->site->name, "class='form-control'"); ?> </td><td></td> </tr> <tr> <th> <?php echo $lang->ui->logo; ?> </th> <td><?php echo html::file('files', "class='form-control'"); ?> </td> <td><?php echo html::select('theme', $lang->ui->logoList, '', "class='form-control'"); ?> </td> </tr> <tr> <td></td> <td colspan='2'> <strong class='text-info'> <?php if ($this->device == 'desktop') { printf($lang->ui->suitableLogoSize, '50px-80px', '80px-240px'); } ?> <?php if ($this->device == 'mobile') { printf($lang->ui->suitableLogoSize, '<50px', '50px-200px');
if (isset($config->block->defaultIcons[$type])) { ?> <?php if (!isset($block->content->icon)) { $block->content->icon = $config->block->defaultIcons[$type]; } ?> <tr> <th><?php echo $lang->block->icon; ?> </th> <td> <div class='row'> <div class='col-sm-6'><?php echo html::select('params[icon]', '', '', "class='chosen-icons' data-value='{$block->content->icon}'"); ?> </div> <div class='col-sm-6'> </div> </div> </td> </tr> <?php } ?> <?php echo $this->fetch('block', 'blockForm', 'type=' . $type . '&id=' . $block->id); ?> <?php if (isset($config->block->defaultMoreUrl[$block->type])) {
echo inlink('edit', 'categoryID=' . $category->id); ?> "> <div class='panel'> <div class='panel-heading'><strong><i class="icon-pencil"></i> <?php echo $lang->tree->edit; ?> </strong></div> <div class='panel-body'> <div class='form-group'> <label class='col-md-2 control-label'><?php echo $lang->category->parent; ?> </label> <div class='col-md-4'><?php echo html::select('parent', $optionMenu, $category->parent, "class='chosen form-control'"); ?> </div> </div> <div class='form-group'> <label class='col-md-2 control-label'><?php echo $lang->category->name; ?> </label> <div class='col-md-9 required'> <div class="input-group"> <?php echo html::input('name', $category->name, "class='form-control'"); ?> <?php if ($category->type != 'forum' or $category->parent != 0) {
echo $lang->site->mobileTemplate; ?> </th> <td><?php echo html::radio('mobileTemplate', $lang->site->mobileTemplateList, isset($this->config->site->mobileTemplate) ? $this->config->site->mobileTemplate : 'close', "class='checkbox'"); ?> </td><td></td> </tr> <tr> <th><?php echo $lang->site->requestType; ?> </th> <td> <?php echo html::select('requestType', $lang->site->requestTypeList, isset($this->config->site->requestType) ? $this->config->site->requestType : $this->config->frontRequestType, "class='form-control'"); ?> </td> <td><span id='requestTypeTip' class='hide text-important'><?php echo $lang->site->requestTypeTip; ?> </span></td> </tr> <tr> <th><?php echo $lang->site->name; ?> </th> <td><?php echo html::input('name', $this->config->site->name, "class='form-control'"); ?>
if ($story->closedReason != 'subdivided') { echo "style='display:none'"; } ?> > <?php echo html::input("childStoriesIDList[{$story->id}]", '', "class=w-30px placeholder='{$lang->idAB}'"); ?> </div> </td> <?php } else { ?> <td class='f-left'><?php echo html::select("closedReasons[{$story->id}]", $lang->story->reasonList, $story->closedReason, 'class="w-60px" disabled="disabled"'); ?> </td> <?php } ?> <td><?php echo html::textarea("comments[{$story->id}]", '', "rows='2' class='area-1'"); ?> </td> </tr> <?php } ?> <?php
<td><?php echo html::input("titles[%s]", '', 'class=form-control'); ?> </td> <td> <?php echo html::textarea("stepses[%s]", '', "rows='1' class='form-control autosize'"); ?> </td> <td><?php echo html::select("types[%s]", $lang->bug->typeList, '', "class='form-control'"); ?> </td> <td><?php echo html::select("severities[%s]", $lang->bug->severityList, '', "class='form-control'"); ?> </td> <td><?php echo html::select("oses[%s]", $lang->bug->osList, '', "class='form-control'"); ?> </td> <td><?php echo html::select("browsers[%s]", $lang->bug->browserList, '', "class='form-control'"); ?> </td> </tr> </tbody> </table> <?php include '../../common/view/pastetext.html.php'; include '../../common/view/footer.html.php';
<?php include "header.html.php"; ?> <form method='post' action='<?php echo inlink('fixblock', "page={$layout->page}®ion={$layout->region}&block={$block->id}"); ?> ' class='ve-form mw-800px center-block' enctype='multipart/form-data'> <table class='table table-form'> <tr> <th class='w-100px'><?php echo $lang->block->grid; ?> </th> <td><?php echo html::select("grid", $this->lang->block->gridOptions, $block->grid, "class='form-control'"); ?> </td> <td class='w-100px'> <label> <input type='checkbox' name='titleless' value='1' <?php if (zget($block, 'borderless') == 1) { echo 'checked'; } ?> /> <?php echo $this->lang->block->titleless; ?> <label> </td>
<td class='text-left' style='overflow:visible'><?php echo html::select("plan[%s]", $plans, $planID, "class='form-control'"); ?> </td> <td><?php echo html::input("title[%s]", $storyTitle, "class='form-control'"); ?> </td> <td> <?php echo html::textarea("spec[%s]", $spec, "rows='1' class='form-control'"); ?> </td> <td><?php echo html::select("pri[%s]", (array) $lang->story->priList, $pri, 'class=form-control'); ?> </td> <td><?php echo html::input("estimate[%s]", $estimate, "class='form-control'"); ?> </td> <td><?php echo html::select("needReview[%s]", $lang->story->reviewList, 0, "class='form-control'"); ?> </td> </tr> </tbody> </table> <?php include '../../common/view/pastetext.html.php'; include '../../common/view/footer.html.php';
common::printLink('project', 'task', "project={$project->id}&type=wait", $lang->project->statusWait); echo '</span>'; echo "<span id='doingTab'>"; common::printLink('project', 'task', "project={$project->id}&type=doing", $lang->project->statusDoing); echo '</span>'; echo "<span id='doneTab'>"; common::printLink('project', 'task', "project={$project->id}&type=done", $lang->project->statusDone); echo '</span>'; echo "<span id='closedTab'>"; common::printLink('project', 'task', "project={$project->id}&type=closed", $lang->project->statusClosed); echo '</span>'; echo "<span id='delayedTab'>"; common::printLink('project', 'task', "project={$project->id}&type=delayed", $lang->project->delayed); echo '</span>'; echo "<span id='groupTab'>"; echo html::select('groupBy', $lang->project->groups, isset($groupBy) ? $groupBy : '', "onchange='switchGroup({$project->id}, this.value)'"); echo "</span>"; echo "<span id='needconfirmTab'>"; common::printLink('project', 'task', "project={$project->id}&status=needConfirm", $lang->project->listTaskNeedConfrim); echo '</span>'; echo "<span id='bysearchTab'><a href='#'><span class='icon-search'></span>{$lang->project->byQuery}</a></span> "; ?> </div> <div class='f-right'> <span class="link-button"> <a href="/index.php?m=task&f=reportToMail&project=<?php echo $projectID; ?> " target="_blank" class="">今日报表发送</a> </span> <?php
?> </th> <td><?php echo html::select('status', $lang->todo->statusList, '', "class='form-control'"); ?> </td> </tr> <tr> <th><?php echo $lang->todo->beginAndEnd; ?> </th> <td> <div class='input-group'> <?php echo html::select('begin', $times, $time, 'onchange=selectNext(); class="form-control" style="width: 50%;"') . html::select('end', $times, '', 'class="form-control" style="width: 50%; margin-left:-1px"'); ?> </div> </td> <td><input type='checkbox' id='switchDate' onclick='switchDateFeature(this);'> <?php echo $lang->todo->lblDisableDate; ?> </td> </tr> <tr> <th><?php echo $lang->todo->private; ?> </th> <td><input type='checkbox' name='private' id='private' value='1'></td> </tr>
?> </th> <td><?php echo html::select('pri', $lang->testcase->priList, $pri, "class='form-control'"); ?> </td> </tr> <tr> <th><?php echo $lang->testcase->lblStory; ?> </th> <td colspan='3'> <div class='input-group' id='storyIdBox'> <?php echo html::select('story', $stories, $storyID, 'class="form-control chosen" onchange="setPreview();" data-no_results_text="' . $lang->searchMore . '"'); ?> <span class='input-group-btn' style='width: 0.01%'> <?php if ($storyID == 0) { ?> <a href='' id='preview' class='btn iframe hidden'><?php echo $lang->preview; ?> </a> <?php } else { ?> <?php echo html::a($this->createLink('story', 'view', "storyID={$storyID}", '', true), $lang->preview, '', "class='btn iframe' id='preview'"); ?>
?> <div class='panel'> <div class='panel-heading'><strong><i class='icon-plus'></i> <?php echo $lang->{$type}->create; ?> </strong></div> <div class='panel-body'> <form method='post' role='form' id='ajaxForm'> <table class='table table-form'> <tr> <th class='w-100px'><?php echo $lang->article->category; ?> </th> <td class='w-p40'><?php echo html::select("categories[]", $categories, $currentCategory, "multiple='multiple' class='form-control chosen'"); ?> </td><td></td> </tr> <tr> <th><?php echo $lang->article->title; ?> </th> <td colspan='2'><?php echo html::input('title', '', "class='form-control'"); ?> </td> </tr> <tr> <th><?php
?> <tr> <th><?php echo $key + 1; ?> </th> <td><?php echo nl2br($step->desc); ?> </td> <td><?php echo nl2br($step->expect); ?> </td> <td class='text-center'><?php echo html::select("steps[{$step->id}]", $lang->testcase->resultList, $defaultResult, "class='form-control'"); ?> </td> <td><?php echo html::textarea("reals[{$step->id}]", '', "rows=2 class='form-control'"); ?> </td> </tr> <?php } ?> <tr class='text-center'> <td colspan='5'> <?php if ($preCase) { echo html::a(inlink('runCase', "runID={$preCase['runID']}&caseID={$preCase['caseID']}&version={$preCase['version']}"), $lang->testtask->pre, '', "id='pre' class='btn'");
echo html::input('author', $article->author, "class='form-control'"); ?> </td> </tr> <tr> <th><?php echo $lang->article->source; ?> </th> <?php if ($article->source != 'article') { array_pop($lang->article->sourceList); } ?> <td><?php echo html::select('source', $lang->article->sourceList, $article->source, "class='form-control chosen'"); ?> </td> <td> <div id='copyBox' class='row'> <div class='col-sm-4'><?php echo html::input('copySite', $article->copySite, "class='form-control' placeholder='{$lang->article->copySite}'"); ?> </div> <div class='col-sm-8'><?php echo html::input('copyURL', $article->copyURL, "class='form-control' placeholder='{$lang->article->copyURL}'"); ?> </div> </div> </td> </tr>
/** * AJAX: get stories of a product in html select. * * @param int $productID * @param int $moduleID * @param int $storyID * @param string $onlyOption * @access public * @return void */ public function ajaxGetProductStories($productID, $moduleID = 0, $storyID = 0, $onlyOption = 'false', $status = '') { if ($moduleID) { $moduleID = $this->loadModel('tree')->getStoryModule($moduleID); $moduleID = $this->tree->getAllChildID($moduleID); } $storyStatus = ''; if ($status == 'noclosed') { $storyStatus = $this->lang->story->statusList; unset($storyStatus['closed']); $storyStatus = array_keys($storyStatus); } $stories = $this->story->getProductStoryPairs($productID, $moduleID, $storyStatus); $select = html::select('story', $stories, $storyID, "class='form-control'"); /* If only need options, remove select wrap. */ if ($onlyOption == 'true') { die(substr($select, strpos($select, '>') + 1, -10)); } die($select); }
<td><?php echo html::select("type[%s]", $lang->task->typeList, $type, 'class=form-control'); ?> </td> <td style='overflow:visible'><?php echo html::select("assignedTo[%s]", $members, $member, "class='form-control'"); ?> </td> <td><?php echo html::input("estimate[%s]", '', "class='form-control text-center' autocomplete='off'"); ?> </td> <td><?php echo html::textarea("desc[%s]", '', "rows='1' class='form-control autosize'"); ?> </td> <td><?php echo html::select("pri[%s]", (array) $lang->task->priList, $pri, 'class=form-control'); ?> </td> </tr> </tbody> </table> <?php js::set('mainField', 'name'); js::set('ditto', $lang->task->ditto); ?> <?php include '../../common/view/pastetext.html.php'; include '../../common/view/footer.html.php';
/** /* Create the select list of RecPerPage. * * @access private * @return string */ private function createRecPerPageList() { for ($i = 5; $i <= 50; $i += 5) { $range[$i] = $i; } $range[100] = 100; $range[200] = 200; $range[500] = 500; $range[1000] = 1000; return html::select('_recPerPage', $range, $this->recPerPage, "onchange='submitPage(\"changeRecPerPage\");' class='w-60px'"); }
?> '> <div class='panel'> <div class='panel-heading'><strong><?php echo $lang->company->todoCalendar; ?> </strong></div> <div class='panel-body'> <div class='form-group'> <div class='input-group'> <span class='input-group-addon'><?php echo $lang->company->dept; ?> </span> <?php echo html::select('dept', $mainDepts, $parent, "class='form-control chosen'"); ?> </div> </div> <div class='form-group'> <div class='input-group'> <span class='input-group-addon'><?php echo $lang->company->beginDate; ?> </span> <?php echo html::input('begin', $begin, 'class="form-control form-date"'); ?> </div> </div> <div class='form-group'>
/** * AJAX: get team members of the project. * * @param int $projectID * @access public * @return void */ public function ajaxGetMembers($projectID) { $users = $this->project->getTeamMemberPairs($projectID); die(html::select('assignedTo', $users, '', "class='form-control'")); }
echo $lang->todo->status; ?> </th> <td><?php echo html::select('status', $lang->todo->statusList, $todo->status, 'class=select-3'); ?> </td> </tr> <tr> <th class='rowhead'><?php echo $lang->todo->beginAndEnd; ?> </th> <td> <?php echo html::select('begin', $times, $todo->begin, 'onchange=selectNext(); class=select-2') . html::select('end', $times, $todo->end, 'class=select-2'); ?> <input type='checkbox' id='dateSwitcher' onclick='switchDateFeature(this);' <?php if ($todo->begin == 2400) { echo 'checked'; } ?> ><?php echo $lang->todo->lblDisableDate; ?> </td> </tr> <tr> <th class='rowhead'><?php echo $lang->todo->private; ?>