Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
wangyidong
2018-04-17 15:16:28 +08:00
2 changed files with 110 additions and 104 deletions
+54 -48
View File
@@ -10,55 +10,61 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['product']);?></span>
<strong><small class='text-muted'><?php echo html::icon($lang->icons['batchEdit']);?></small> <?php echo $lang->product->batchEdit;?></strong>
<div class='actions'>
<button type="button" class="btn btn-default" data-toggle="customModal"><i class='icon icon-cog'></i> </button>
<div id="mainContent" class="main-content">
<div class="main-header">
<h2><?php echo $lang->product->batchEdit;?></h2>
<div class="pull-right btn-toolbar">
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=product&section=custom&key=batchEditFields')?>
<?php include '../../common/view/dropdowncustomfield.html.php';?>
</div>
</div>
<?php
$visibleFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
?>
<form method='post' class='load-indicator main-form' enctype='multipart/form-data' target='hiddenwin' id="batchEditForm">
<table class="table table-form">
<thead>
<tr>
<th class='w-60px'><?php echo $lang->idAB;?></th>
<th class='required'><?php echo $lang->product->name;?></th>
<th class='w-150px required'><?php echo $lang->product->code;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden')?>'><?php echo $lang->product->PO;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'QD', ' hidden')?>'><?php echo $lang->product->QD;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'RD', ' hidden')?>'><?php echo $lang->product->RD;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->product->type;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->product->status;?></th>
<th class='w-200px<?php echo zget($visibleFields, 'desc', ' hidden')?>'><?php echo $lang->product->desc;?></th>
<th class='w-80px'><?php echo $lang->product->order;?></th>
</tr>
</thead>
<tbody>
<?php foreach($productIDList as $productID):?>
<tr>
<td><?php echo sprintf('%03d', $productID) . html::hidden("productIDList[$productID]", $productID);?></td>
<td title='<?php echo $products[$productID]->name?>'><?php echo html::input("names[$productID]", $products[$productID]->name, "class='form-control' autocomplete='off'");?></td>
<td><?php echo html::input("codes[$productID]", $products[$productID]->code, "class='form-control' autocomplete='off'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$productID]", $poUsers, $products[$productID]->PO, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$productID]", $qdUsers, $products[$productID]->QD, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$productID]", $rdUsers, $products[$productID]->RD, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>'><?php echo html::select("types[$productID]", $lang->product->typeList, $products[$productID]->type, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'status', 'hidden')?>'><?php echo html::select("statuses[$productID]", $lang->product->statusList, $products[$productID]->status, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'desc', 'hidden')?>'><?php echo html::textarea("descs[$productID]", htmlspecialchars($products[$productID]->desc), "rows='1' class='form-control autosize'");?></td>
<td><?php echo html::input("orders[$productID]", $products[$productID]->order, "class='form-control' autocomplete='off'");?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan="<?php echo count($visibleFields) + 4?>" class="text-center">
<?php echo html::submitButton($lang->save, '', 'btn btn-wide btn-primary') . '&nbsp;' . html::backButton('', '', "btn btn-wide");?>
</td>
</tr>
</tfoot>
</table>
</form>
</div>
<?php
$visibleFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
}
?>
<form class='form-condensed' method='post' target='hiddenwin' action='<?php echo inLink('batchEdit');?>'>
<table class='table table-form table-fixed'>
<thead>
<tr>
<th class='w-id'> <?php echo $lang->idAB;?></th>
<th><?php echo $lang->product->name;?> <span class='required'></span></th>
<th class='w-150px'><?php echo $lang->product->code;?> <span class='required'></span></th>
<th class='w-150px<?php echo zget($visibleFields, 'PO', ' hidden')?>'><?php echo $lang->product->PO;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'QD', ' hidden')?>'><?php echo $lang->product->QD;?></th>
<th class='w-150px<?php echo zget($visibleFields, 'RD', ' hidden')?>'><?php echo $lang->product->RD;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'type', ' hidden')?>'><?php echo $lang->product->type;?></th>
<th class='w-100px<?php echo zget($visibleFields, 'status', ' hidden')?>'><?php echo $lang->product->status;?></th>
<th class='w-200px<?php echo zget($visibleFields, 'desc', ' hidden')?>'><?php echo $lang->product->desc;?></th>
<th class='w-80px'><?php echo $lang->product->order;?></th>
</tr>
</thead>
<?php foreach($productIDList as $productID):?>
<tr class='text-center'>
<td><?php echo sprintf('%03d', $productID) . html::hidden("productIDList[$productID]", $productID);?></td>
<td title='<?php echo $products[$productID]->name?>'><?php echo html::input("names[$productID]", $products[$productID]->name, "class='form-control' autocomplete='off'");?></td>
<td><?php echo html::input("codes[$productID]", $products[$productID]->code, "class='form-control' autocomplete='off'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$productID]", $poUsers, $products[$productID]->PO, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$productID]", $qdUsers, $products[$productID]->QD, "class='form-control chosen'");?></td>
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$productID]", $rdUsers, $products[$productID]->RD, "class='form-control chosen'");?></td>
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>'><?php echo html::select("types[$productID]", $lang->product->typeList, $products[$productID]->type, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'status', 'hidden')?>'><?php echo html::select("statuses[$productID]", $lang->product->statusList, $products[$productID]->status, "class='form-control'");?></td>
<td class='<?php echo zget($visibleFields, 'desc', 'hidden')?>'><?php echo html::textarea("descs[$productID]", htmlspecialchars($products[$productID]->desc), "rows='1' class='form-control autosize'");?></td>
<td><?php echo html::input("orders[$productID]", $products[$productID]->order, "class='form-control' autocomplete='off'");?></td>
</tr>
<?php endforeach;?>
<tr><td colspan='<?php echo count($visibleFields) + 4?>' class='text-center'><?php echo html::submitButton();?></td></tr>
</table>
</form>
<?php $customLink = $this->createLink('custom', 'ajaxSaveCustomFields', 'module=product&section=custom&key=batchEditFields')?>
<?php include '../../common/view/customfield.html.php';?>
<?php include '../../common/view/footer.html.php';?>
+56 -56
View File
@@ -13,63 +13,63 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('noProject', ($config->global->flow == 'onlyStory' or $config->global->flow == 'onlyTest') ? true : false);?>
<div class='container mw-1400px'>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['product']);?> <strong><?php echo $product->id;?></strong></span>
<strong><?php echo html::a($this->createLink('product', 'view', 'product=' . $product->id), $product->name);?></strong>
<small class='text-muted'> <?php echo $lang->product->edit;?> <i class='icon icon-pencil'></i></small>
<div id="mainContent" class="main-content">
<div class="center-block">
<div class="main-header">
<h2><?php echo $lang->product->edit;?></h2>
</div>
<form class="load-indicator main-form form-ajax" id="createForm" method="post" target='hiddenwin'>
<table class="table table-form">
<tbody>
<tr>
<th class='w-120px'><?php echo $lang->product->name;?></th>
<td class='w-p25-f'><?php echo html::input('name', $product->name, "class='form-control' autocomplete='off'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->code;?></th>
<td><?php echo html::input('code', $product->code, "class='form-control' autocomplete='off'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->line;?></th>
<td><?php echo html::select('line', $lines, $product->line, "class='form-control chosen'");?></td>
<td><?php if(!$lines) common::printLink('tree', 'browse', 'rootID=&view=line', $lang->tree->manageLine);?></td>
</tr>
<tr>
<th><?php echo $lang->product->PO;?></th>
<td><?php echo html::select('PO', $poUsers, $product->PO, "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->QD;?></th>
<td><?php echo html::select('QD', $qdUsers, $product->QD, "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->RD;?></th>
<td><?php echo html::select('RD', $rdUsers, $product->RD, "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->type;?></th>
<td><?php echo html::select('type', $lang->product->typeList, $product->type, "class='form-control'");?></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><td></td>
</tr>
<tr>
<th><?php echo $lang->product->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($product->desc), "rows='8' class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->product->acl;?></th>
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->product->aclList, $product->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr id='whitelistBox' <?php if($product->acl != 'custom') echo "class='hidden'";?>>
<th><?php echo $lang->product->whitelist;?></th>
<td colspan='2'><?php echo html::checkbox('whitelist', $groups, $product->whitelist);?></td>
</tr>
<tr><td></td><td colspan='2'><?php echo html::submitButton();?></td></tr>
</tbody>
</table>
</form>
</div>
<form class='form-condensed' method='post' target='hiddenwin' id='dataform'>
<table align='center' class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->product->name;?></th>
<td class='w-p25-f'><?php echo html::input('name', $product->name, "class='form-control' autocomplete='off'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->code;?></th>
<td><?php echo html::input('code', $product->code, "class='form-control' autocomplete='off'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->line;?></th>
<td><?php echo html::select('line', $lines, $product->line, "class='form-control chosen'");?></td>
<td><?php if(!$lines) common::printLink('tree', 'browse', 'rootID=&view=line', $lang->tree->manageLine);?></td>
</tr>
<tr>
<th><?php echo $lang->product->PO;?></th>
<td><?php echo html::select('PO', $poUsers, $product->PO, "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->QD;?></th>
<td><?php echo html::select('QD', $qdUsers, $product->QD, "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->RD;?></th>
<td><?php echo html::select('RD', $rdUsers, $product->RD, "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->product->type;?></th>
<td><?php echo html::select('type', $lang->product->typeList, $product->type, "class='form-control'");?></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><td></td>
</tr>
<tr>
<th><?php echo $lang->product->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($product->desc), "rows='8' class='form-control'");?></td>
</tr>
<tr>
<th><?php echo $lang->product->acl;?></th>
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->product->aclList, $product->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
</tr>
<tr id='whitelistBox' <?php if($product->acl != 'custom') echo "class='hidden'";?>>
<th><?php echo $lang->product->whitelist;?></th>
<td colspan='2'><?php echo html::checkbox('whitelist', $groups, $product->whitelist);?></td>
</tr>
<tr><td></td><td colspan='2'><?php echo html::submitButton();?></td></tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.html.php';?>