* Finish task #70571.
This commit is contained in:
@@ -632,7 +632,8 @@ class custom extends control
|
||||
{
|
||||
$mode = fixer::input('post')->get('mode');
|
||||
$program = isset($_POST['program']) ? $_POST['program'] : 0;
|
||||
if($mode == 'lean' and empty($program)) return $this->send(array('result' => 'fail', 'message' => array('program' => $this->lang->custom->switchModeHelper)));
|
||||
|
||||
if($mode == 'lean' and empty($program)) $program = $this->loadModel('program')->createDefaultProgram();
|
||||
|
||||
$this->loadModel('setting')->setItem('system.common.global.mode', $mode);
|
||||
$this->loadModel('setting')->setItem('system.common.global.defaultProgram', $program);
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
#program_chosen {max-width: 170px;}
|
||||
.table-form>tbody>tr>th {width: 130px;}
|
||||
@@ -58,7 +58,6 @@ $lang->custom->code = $lang->code;
|
||||
$lang->custom->setCode = 'Enable or Disable Code';
|
||||
$lang->custom->execution = 'Execution';
|
||||
$lang->custom->defaultProgram = 'Default program';
|
||||
$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set';
|
||||
|
||||
$lang->custom->unitList['efficiency'] = 'Working Hours/';
|
||||
$lang->custom->unitList['manhour'] = 'Man-hour/';
|
||||
@@ -296,4 +295,4 @@ $lang->custom->scrum = new stdclass();
|
||||
$lang->custom->scrum->setConcept = 'Set concept';
|
||||
|
||||
$lang->custom->reviewRules['allpass'] = 'All passed';
|
||||
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
|
||||
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
|
||||
|
||||
@@ -58,7 +58,6 @@ $lang->custom->code = $lang->code;
|
||||
$lang->custom->setCode = 'Enable or Disable Code';
|
||||
$lang->custom->execution = 'Execution';
|
||||
$lang->custom->defaultProgram = 'Default program';
|
||||
$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set';
|
||||
|
||||
$lang->custom->unitList['efficiency'] = 'Working Hours/';
|
||||
$lang->custom->unitList['manhour'] = 'Man-hour/';
|
||||
@@ -296,4 +295,4 @@ $lang->custom->scrum = new stdclass();
|
||||
$lang->custom->scrum->setConcept = 'Set concept';
|
||||
|
||||
$lang->custom->reviewRules['allpass'] = 'All passed';
|
||||
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
|
||||
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
|
||||
|
||||
@@ -58,7 +58,6 @@ $lang->custom->code = $lang->code;
|
||||
$lang->custom->setCode = 'Activer ou Désactiver le Code';
|
||||
$lang->custom->execution = 'Execution';
|
||||
$lang->custom->defaultProgram = 'Default program';
|
||||
$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set';
|
||||
|
||||
$lang->custom->unitList['efficiency'] = 'Working Hours/';
|
||||
$lang->custom->unitList['manhour'] = 'Man-hour/';
|
||||
@@ -296,4 +295,4 @@ $lang->custom->scrum = new stdclass();
|
||||
$lang->custom->scrum->setConcept = 'Set concept';
|
||||
|
||||
$lang->custom->reviewRules['allpass'] = 'All passed';
|
||||
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
|
||||
$lang->custom->reviewRules['halfpass'] = 'More than half passed';
|
||||
|
||||
@@ -51,7 +51,6 @@ $lang->custom->convertRelationTitle = "Please firstly set the conversion factor
|
||||
if($config->systemMode == 'new') $lang->custom->execution = 'Execution';
|
||||
if($config->systemMode == 'classic' || !$config->systemMode) $lang->custom->execution = $lang->executionCommon;
|
||||
$lang->custom->defaultProgram = 'Default program';
|
||||
$lang->custom->switchModeHelper = 'Select a default item set. Subsequent data added in the system will be associated with the default item set';
|
||||
|
||||
$lang->custom->unitList['efficiency'] = 'Working Hours/';
|
||||
$lang->custom->unitList['manhour'] = 'Man-hour/';
|
||||
|
||||
@@ -58,7 +58,6 @@ $lang->custom->code = $lang->code;
|
||||
$lang->custom->setCode = '是否启用代号';
|
||||
$lang->custom->execution = '执行';
|
||||
$lang->custom->defaultProgram = '选择默认项目集';
|
||||
$lang->custom->switchModeHelper = '请选择一个默认项目集,后续在系统中新增的数据将关联在默认项目集下';
|
||||
|
||||
$lang->custom->unitList['efficiency'] = '工时/';
|
||||
$lang->custom->unitList['manhour'] = '人时/';
|
||||
@@ -296,4 +295,4 @@ $lang->custom->scrum = new stdclass();
|
||||
$lang->custom->scrum->setConcept = '设置项目概念';
|
||||
|
||||
$lang->custom->reviewRules['allpass'] = '全部通过通过';
|
||||
$lang->custom->reviewRules['halfpass'] = '半数以上通过通过';
|
||||
$lang->custom->reviewRules['halfpass'] = '半数以上通过通过';
|
||||
|
||||
@@ -24,13 +24,15 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='text-top w-120px'><?php echo $lang->custom->mode;?></th>
|
||||
<td>
|
||||
<td class='w-200px'>
|
||||
<p>
|
||||
<label class="radio-inline"><input type="radio" name="mode" value="lean" <?php echo $mode == 'lean'? "checked='checked'" : '';?> id="modelean"><?php echo $lang->upgrade->to18Mode['lean'];?></label>
|
||||
<label class="radio-inline"><input type="radio" name="mode" value="new" <?php echo $mode == 'new'? "checked='checked'" : '';?> id="modenew"><?php echo $lang->upgrade->to18Mode['new'];?></label>
|
||||
</p>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php if($program):?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->custom->defaultProgram;?></th>
|
||||
<td>
|
||||
@@ -38,9 +40,9 @@
|
||||
$disabled = $mode == 'lean' ? "disabled" : '';
|
||||
echo html::select('program', $program, $programID, "class='form-control chosen' $disabled" );
|
||||
?>
|
||||
<div class="text-danger help-text"><?php echo $lang->custom->switchModeHelper ?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><?php echo html::submitButton($lang->custom->switch, 'disabled');?></td>
|
||||
|
||||
@@ -1601,9 +1601,8 @@ class programModel extends model
|
||||
$defaultProgram = $this->loadModel('setting')->getItem('owner=system&module=common§ion=global&key=defaultProgram');
|
||||
if($defaultProgram)
|
||||
{
|
||||
$programID = $defaultProgram->value;
|
||||
$program = $this->dao->select('id')->from(TABLE_PROGRAM)->where('id')->eq($programID)->andWhere('deleted')->eq(0)->fetch();
|
||||
if($program) return $programID;
|
||||
$program = $this->dao->select('id')->from(TABLE_PROGRAM)->where('id')->eq($defaultProgram)->andWhere('deleted')->eq(0)->fetch();
|
||||
if($program) return $defaultProgram;
|
||||
}
|
||||
|
||||
$program = $this->dao->select('id')->from(TABLE_PROGRAM)->where('name')->eq($this->lang->program->defaultProgram)->andWhere('deleted')->eq(0)->fetch();
|
||||
|
||||
Reference in New Issue
Block a user