| @@ 711-725 (lines=15) @@ | ||
| 708 | } |
|
| 709 | ||
| 710 | // Create interface select |
|
| 711 | if (!empty($interfaces)) { |
|
| 712 | $label = Widget::Label(__('Association Interface'), null, 'column'); |
|
| 713 | $label->appendChild(new XMLElement('i', __('Optional'))); |
|
| 714 | ||
| 715 | $options = array( |
|
| 716 | array(null, false, __('None')) |
|
| 717 | ); |
|
| 718 | foreach ($interfaces as $id => $name) { |
|
| 719 | $options[] = array($id, ($association_context['interface'] === $id), $name); |
|
| 720 | } |
|
| 721 | ||
| 722 | $select = Widget::Select('fields[' . $this->get('sortorder') . '][association_ui]', $options); |
|
| 723 | $label->appendChild($select); |
|
| 724 | $group->appendChild($label); |
|
| 725 | } |
|
| 726 | ||
| 727 | // Create editor select |
|
| 728 | if (!empty($editors)) { |
|
| @@ 728-742 (lines=15) @@ | ||
| 725 | } |
|
| 726 | ||
| 727 | // Create editor select |
|
| 728 | if (!empty($editors)) { |
|
| 729 | $label = Widget::Label(__('Association Editor'), null, 'column'); |
|
| 730 | $label->appendChild(new XMLElement('i', __('Optional'))); |
|
| 731 | ||
| 732 | $options = array( |
|
| 733 | array(null, false, __('None')) |
|
| 734 | ); |
|
| 735 | foreach ($editors as $id => $name) { |
|
| 736 | $options[] = array($id, ($association_context['editor'] === $id), $name); |
|
| 737 | } |
|
| 738 | ||
| 739 | $select = Widget::Select('fields[' . $this->get('sortorder') . '][association_editor]', $options); |
|
| 740 | $label->appendChild($select); |
|
| 741 | $group->appendChild($label); |
|
| 742 | } |
|
| 743 | ||
| 744 | $wrapper->appendChild($group); |
|
| 745 | } |
|