| @@ 47-71 (lines=25) @@ | ||
| 44 | protected $quantity_type; |
|
| 45 | ||
| 46 | ||
| 47 | public function __construct(absences_AgentRight $agentright) |
|
| 48 | { |
|
| 49 | $W = bab_Widgets(); |
|
| 50 | ||
| 51 | parent::__construct(null, $W->VBoxLayout()->setVerticalSpacing(1,'em')); |
|
| 52 | ||
| 53 | $this->agentRight = $agentright; |
|
| 54 | ||
| 55 | bab_functionality::includefile('Icons'); |
|
| 56 | ||
| 57 | $this->setName('agent_right'); |
|
| 58 | $this->addClass('widget-bordered'); |
|
| 59 | $this->addClass('BabLoginMenuBackground'); |
|
| 60 | $this->addClass('widget-centered'); |
|
| 61 | $this->addClass(Func_Icons::ICON_LEFT_24); |
|
| 62 | $this->colon(); |
|
| 63 | ||
| 64 | $this->setCanvasOptions($this->Options()->width(70,'em')); |
|
| 65 | ||
| 66 | $this->addFields(); |
|
| 67 | $this->loadFormValues(); |
|
| 68 | ||
| 69 | $this->addButtons(); |
|
| 70 | $this->setSelfPageHiddenFields(); |
|
| 71 | } |
|
| 72 | ||
| 73 | ||
| 74 | protected function addFields() |
|
| @@ 125-148 (lines=24) @@ | ||
| 122 | protected $organization; |
|
| 123 | ||
| 124 | ||
| 125 | public function __construct(absences_Organization $organization) |
|
| 126 | { |
|
| 127 | $W = bab_Widgets(); |
|
| 128 | ||
| 129 | parent::__construct(null, $W->VBoxLayout()->setVerticalSpacing(2,'em')); |
|
| 130 | ||
| 131 | $this->organization = $organization; |
|
| 132 | ||
| 133 | $this->setName('organization'); |
|
| 134 | $this->addClass('widget-bordered'); |
|
| 135 | $this->addClass('BabLoginMenuBackground'); |
|
| 136 | $this->addClass('widget-centered'); |
|
| 137 | $this->addClass(Func_Icons::ICON_LEFT_16); |
|
| 138 | ||
| 139 | $this->colon(); |
|
| 140 | ||
| 141 | $this->setCanvasOptions($this->Options()->width(70,'em')); |
|
| 142 | ||
| 143 | $this->addFields(); |
|
| 144 | $this->setValues($organization->getRow(), array('organization')); |
|
| 145 | ||
| 146 | $this->addButtons(); |
|
| 147 | $this->setSelfPageHiddenFields(); |
|
| 148 | } |
|
| 149 | ||
| 150 | ||
| 151 | ||
| @@ 1304-1328 (lines=25) @@ | ||
| 1301 | ||
| 1302 | ||
| 1303 | ||
| 1304 | public function __construct(absences_Right $right = null) |
|
| 1305 | { |
|
| 1306 | $W = bab_Widgets(); |
|
| 1307 | ||
| 1308 | parent::__construct(null, $W->VBoxLayout()->setVerticalSpacing(1,'em')); |
|
| 1309 | ||
| 1310 | $this->right = $right; |
|
| 1311 | ||
| 1312 | $this->setName('right'); |
|
| 1313 | $this->addClass('widget-bordered'); |
|
| 1314 | $this->addClass('BabLoginMenuBackground'); |
|
| 1315 | $this->addClass('widget-centered'); |
|
| 1316 | $this->colon(); |
|
| 1317 | ||
| 1318 | $this->setCanvasOptions($this->Options()->width(70,'em')); |
|
| 1319 | ||
| 1320 | ||
| 1321 | ||
| 1322 | $this->addFields(); |
|
| 1323 | ||
| 1324 | $this->addButtons(); |
|
| 1325 | $this->setSelfPageHiddenFields(); |
|
| 1326 | ||
| 1327 | $this->setHiddenValue('right[id]', $right->id); |
|
| 1328 | } |
|
| 1329 | ||
| 1330 | ||
| 1331 | protected function addFields() |
|