* Finish task#8730.
This commit is contained in:
@@ -22,8 +22,8 @@ $config->program->list->exportFields = 'id,name,code,template,product,status,beg
|
||||
|
||||
$config->program->PGMCreate = new stdclass();
|
||||
$config->program->PGMEdit = new stdclass();
|
||||
$config->program->PGMCreate->requiredFields = 'name,code,begin,end';
|
||||
$config->program->PGMEdit->requiredFields = 'name,code,begin,end';
|
||||
$config->program->PGMCreate->requiredFields = 'name,begin,end';
|
||||
$config->program->PGMEdit->requiredFields = 'name,begin,end';
|
||||
|
||||
$config->program->PRJCreate = new stdclass();
|
||||
$config->program->PRJEdit = new stdclass();
|
||||
|
||||
@@ -260,3 +260,24 @@ $(function()
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
/**
|
||||
* Change budget input.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
$(function()
|
||||
{
|
||||
$('#future').on('change', function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$('#budget').val('').attr('disabled', 'disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#budget').removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
@@ -11,15 +11,3 @@ function setAclList(programID)
|
||||
$('.aclBox').html($('#PGMAcl').html());
|
||||
}
|
||||
}
|
||||
|
||||
$('#future').on('change', function()
|
||||
{
|
||||
if($(this).prop('checked'))
|
||||
{
|
||||
$('#budget').val('').attr('disabled', 'disabled');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#budget').removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
@@ -222,9 +222,10 @@ class programModel extends model
|
||||
->setIF($this->post->end == '0000-00-00', 'end', '')
|
||||
->setIF($this->post->acl == 'open', 'whitelist', '')
|
||||
->setIF($this->post->delta == 999, 'end', LONG_TIME)
|
||||
->setIF($this->post->future, 'budget', 0)
|
||||
->join('whitelist', ',')
|
||||
->stripTags($this->config->program->editor->pgmedit['id'], $this->config->allowedTags)
|
||||
->remove('uid,delta')
|
||||
->remove('uid,delta,future')
|
||||
->get();
|
||||
|
||||
$program = $this->loadModel('file')->processImgURL($program, $this->config->program->editor->pgmedit['id'], $this->post->uid);
|
||||
|
||||
@@ -32,22 +32,25 @@
|
||||
<th class='w-120px'><?php echo $lang->program->PGMName;?></th>
|
||||
<td class="col-main"><?php echo html::input('name', $program->name, "class='form-control' required");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PGMCode;?></th>
|
||||
<td><?php echo html::input('code', $program->code, "class='form-control' required");?></td><td></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PGMPM;?></th>
|
||||
<td><?php echo html::select('PM', $pmUsers, $program->PM, "class='form-control chosen'" . (strpos($requiredFields, 'PM') !== false ? ' required' : ''));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PO;?></th>
|
||||
<td><?php echo html::select('PO', $poUsers, $program->PO, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PGMBudget;?></th>
|
||||
<td><?php echo html::input('budget', $program->budget ? $program->budget : '', "class='form-control'" . (strpos($requiredFields, 'budget') !== false ? ' required' : ''));?></td>
|
||||
<td style='float:left'><?php echo html::select('budgetUnit', $lang->program->unitList, $program->budgetUnit, "class='form-control'");?></td><td></td>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('budget', $program->budget ? $program->budget : '', "class='form-control'" . (strpos($requiredFields, 'budget') !== false ? ' required' : '') . ($program->budget == 0 ? 'disabled' : ''));?>
|
||||
<span class='input-group-addon'></span>
|
||||
<?php echo html::select('budgetUnit', $lang->program->unitList, $program->budgetUnit, "class='form-control'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class='checkbox-primary'>
|
||||
<input type='checkbox' id='future' name='future' value='1' <?php if($program->budget == 0) echo 'checked';?> />
|
||||
<label for='future'><?php echo $lang->program->future;?></label>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->dateRange;?></th>
|
||||
@@ -72,7 +75,6 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PGMDesc;?></th>
|
||||
<td colspan='3'>
|
||||
<?php echo $this->fetch('user', 'ajaxPrintTemplates', 'type=program&link=desc');?>
|
||||
<?php echo html::textarea('desc', $program->desc, "rows='6' class='form-control kindeditor' hidefocus='true'" . (strpos($requiredFields, 'desc') !== false ? ' required' : ''));?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user