* use actual idvalue name for todo create/edit, bug #19011.

This commit is contained in:
Wenrui LI
2022-02-23 08:27:02 +08:00
parent 2f548dce80
commit 11d3afd565
3 changed files with 16 additions and 2 deletions
+12
View File
@@ -49,6 +49,18 @@ function loadList(type, id)
{
$(divClass).html($(divID).html());
}
if(nameBoxLabel)
{
if(type == 'custom')
{
$('#nameBoxLabel').text(nameBoxLabel.custom);
}
else
{
$('#nameBoxLabel').text(nameBoxLabel.idvalue);
}
}
}
function selectNext()
+2 -1
View File
@@ -16,6 +16,7 @@
<?php js::set('noTodo', $lang->todo->noTodo);?>
<?php js::set('moduleList', $config->todo->moduleList)?>
<?php js::set('objectsMethod', $config->todo->getUserObjectsMethod)?>
<?php js::set('nameBoxLabel', array('custom' => $lang->todo->name, 'idvalue' => $lang->todo->idvalue));?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
@@ -115,7 +116,7 @@
<td><?php echo html::select('type', $lang->todo->typeList, '', 'onchange="loadList(this.value);" class="form-control"');?></td>
</tr>
<tr>
<th><?php echo $lang->todo->name;?></th>
<th id='nameBoxLabel'><?php echo $lang->todo->name;?></th>
<td colspan='2'>
<div id='nameBox' class='hidden'><?php echo html::input('name', '', "class='form-control'");?></div>
<div class='input-group title-group required'>
+2 -1
View File
@@ -16,6 +16,7 @@
<?php js::set('moduleList', $config->todo->moduleList)?>
<?php js::set('objectsMethod', $config->todo->getUserObjectsMethod)?>
<?php js::set('idvalue', $todo->idvalue);?>
<?php js::set('nameBoxLabel', array('custom' => $lang->todo->name, 'idvalue' => $lang->todo->idvalue));?>
<?php if(common::checkNotCN()):?>
<style> label.col-sm-1{width:100px;} </style>
<?php endif;?>
@@ -127,7 +128,7 @@
</div>
<?php endif;?>
<div class="row form-group">
<label class="col-sm-1"><?php echo $lang->todo->name;?></label>
<label id='nameBoxLabel' class="col-sm-1"><?php echo $todo->type == 'custom' ? $lang->todo->name : $lang->todo->idvalue;?></label>
<div class="col-sm-10">
<div id='nameBox' class='hidden'><?php echo html::input('name', $todo->name, "class='form-control'");?></div>
<div class='input-group title-group required'>