* adjust var name and add notes for custom.
This commit is contained in:
@@ -73,6 +73,7 @@ class custom extends control
|
||||
die(js::locate($this->createLink('custom', 'set', "module=$module&field=$field&lang=" . str_replace('-', '_', $lang)), 'parent'));
|
||||
}
|
||||
|
||||
/* Check whether the current language has been customized. */
|
||||
$lang = str_replace('_', '-', $lang);
|
||||
$dbFields = $this->custom->getItems("lang=$lang&module=$module§ion=$field");
|
||||
if(empty($dbFields)) $dbFields = $this->custom->getItems("lang=" . ($lang == $currentLang ? 'all' : $currentLang) . "&module=$module§ion=$field");
|
||||
@@ -96,7 +97,7 @@ class custom extends control
|
||||
$this->view->fieldList = $fieldList;
|
||||
$this->view->dbFields = $dbFields;
|
||||
$this->view->field = $field;
|
||||
$this->view->setLang = str_replace('_', '-', $lang);
|
||||
$this->view->lang2Set = str_replace('_', '-', $lang);
|
||||
$this->view->module = $module;
|
||||
$this->view->currentLang = $currentLang;
|
||||
$this->view->canAdd = strpos($this->config->custom->canAdd[$module], $field) !== false;
|
||||
|
||||
@@ -6,7 +6,7 @@ $lang->custom->restore = 'restore';
|
||||
$lang->custom->key = 'Key';
|
||||
$lang->custom->value = 'Value';
|
||||
$lang->custom->flow = 'Flow';
|
||||
$lang->custom->select = 'Select:';
|
||||
$lang->custom->select = 'Select flow:';
|
||||
|
||||
$lang->custom->object['story'] = 'Story';
|
||||
$lang->custom->object['task'] = 'Task';
|
||||
|
||||
@@ -6,7 +6,7 @@ $lang->custom->restore = '恢复默认';
|
||||
$lang->custom->key = '键';
|
||||
$lang->custom->value = '值';
|
||||
$lang->custom->flow = '流程';
|
||||
$lang->custom->select = '请选择:';
|
||||
$lang->custom->select = '请选择流程:';
|
||||
|
||||
$lang->custom->object['story'] = '需求';
|
||||
$lang->custom->object['task'] = '任务';
|
||||
|
||||
@@ -29,11 +29,17 @@
|
||||
<div class='main'>
|
||||
<form method='post' class='form-condensed' target='hiddenwin'>
|
||||
<table class='table table-form'>
|
||||
<tr><th class='w-100px'><?php echo $lang->custom->select;?></th><th></th><th></th></tr>
|
||||
<?php $checkedKey = isset($config->custom->productproject) ? $config->custom->productproject : '0_0' ?>
|
||||
<?php foreach($lang->custom->productproject->relation as $key => $value):?>
|
||||
<tr>
|
||||
<th class='w-100px'><?php echo $lang->custom->select;?></th>
|
||||
<td class='w-300px'><?php echo html::radio('productproject', $lang->custom->productproject->relation, isset($config->custom->productproject) ? $config->custom->productproject : '0_0');?></td>
|
||||
<td><?php echo html::submitButton()?></td>
|
||||
<td></td>
|
||||
<td class='w-300px'>
|
||||
<label class="radio-inline"><input type="radio" name="productproject" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="productproject<?php echo $key;?>"><?php echo $value;?></label>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
<tr><td></td><td><?php echo html::submitButton()?></td></tr>
|
||||
<tr>
|
||||
<td colspan='3' class='pd-0'>
|
||||
<div class='alert alert-info alert-block'><strong><?php echo $lang->custom->productproject->notice?></strong></div>
|
||||
|
||||
@@ -96,7 +96,7 @@ EOT;
|
||||
<td colspan='<?php $canAdd ? print(3) : print(2);?>' class='text-center'>
|
||||
<?php
|
||||
$appliedTo = array($currentLang => $lang->custom->currentLang, 'all' => $lang->custom->allLang);
|
||||
echo html::radio('lang', $appliedTo, $setLang);
|
||||
echo html::radio('lang', $appliedTo, $lang2Set);
|
||||
echo html::submitButton();
|
||||
if(common::hasPriv('custom', 'restore')) echo html::linkButton($lang->custom->restore, inlink('restore', "module=$module&field=$field"), 'hiddenwin');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user