-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathselect_progress.ctp
More file actions
37 lines (32 loc) · 919 Bytes
/
select_progress.ctp
File metadata and controls
37 lines (32 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* TaskContents select progress for view element
*
* @author Yuto Kitatsuji <kitatsuji.yuto@withone.co.jp>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
* @copyright Copyright 2014, NetCommons Project
*/
?>
<?php
$url = array(
'controller' => 'task_progress_rate',
'action' => 'edit',
'content_key' => $taskContent['TaskContent']['key'],
);
echo $this->NetCommonsForm->create(
'TaskProgressRate', array('type' => 'post', 'url' => $url)
);
for ($i = 0; $i <= TasksComponent::TASK_COMPLETION_PROGRESS_RATE;) {
$options[$i] = $i . '%';
$i += TasksComponent::TASK_PROGRESS_RATE_INCREMENTS;
}
echo $this->NetCommonsForm->input('TaskContent.progress_rate', array(
'type' => 'select',
'options' => $options,
'value' => $progressRate,
'onChange' => 'submit();',
$disabled
)
);
echo $this->NetCommonsForm->end();