protected function createControls() { $this->setPostback('user', 'endEditUser', array('id' => $this->controller->user->id)); $panel = new CaptionedPanelControl($this, 'panel'); $panel->setCaption('Benutzer » bearbeiten'); $lookupSprache = new DataControls\LookupBoxControl(null, 'us_sprache'); $lookupSprache->setLookupEntity(new Sprache())->setTextfield('sp_bezeichnung')->setValuefield('sp_id')->showNull(0, '-- bitte wählen --')->preSelect($this->controller->user->us_sprache); $anreden = new FormControls\InputSelectControl(null, 'us_anrede'); $anreden->addOption(0, '-- bitte wählen --'); $anreden->addOption('Firma', 'Firma'); $anreden->addOption('Frau', 'Frau'); $anreden->addOption('Herr', 'Herr'); $edit = new DataControls\EditControl($panel, 'edit'); $edit->setEntity($this->controller->user)->setHeader('Stammdaten bearbeiten')->addRow('us_benutzername')->addRow('us_aktiv')->addRow('Anrede', $anreden)->addRow('us_vorname')->addRow('us_name')->addRow('us_profilbild')->addRow('us_email')->addRow('Sprache', $lookupSprache)->addRow('us_anonymous')->addRow('us_passwort'); $button = new SaveButtonControl($panel, 'btnSave'); if ($this->request->action != 'newUser') { $pnlRolle = new CaptionedPanelControl($this, 'pnlRolle'); $pnlRolle->setCaption('Rollenzuweisung'); $lookupRolle = new DataControls\LookupBoxControl(null, 'ro_id'); $lookupRolle->setLookupEntity(new Rolle())->setTextfield('ro_bezeichnung')->setValuefield('ro_id')->showNull(0, '-- bitte wählen --'); $sbmRolle = new ExtControls\SubmitDataControl($pnlRolle, 'sbmRolle'); $sbmRolle->setModule('user')->setAction('insertRolle')->setNotify('grid')->setHiddenValue('user', $this->controller->user->id)->add($lookupRolle); $grid = new GridControl($pnlRolle, 'grid'); $grid->setEntity(new UserRolle(), $this->request); $grid->setDeleteAction('removeRolle'); $grid->createColumn(GridColumn::FIELD, 'us_name', '{us_vorname} {us_name}'); $grid->createColumn(GridColumn::FIELD, 'ro_bezeichnung'); $grid->createColumn(GridColumn::DELETELINK); } }
protected function createControls() { $this->relation = $this->controller->relation; $this->setPostback('modView', 'endEditRelation', array('current' => $this->request->current, 'entity' => $this->request->entity, 'initPanel' => 2)); $panel = new CaptionedPanelControl($this, 'panel'); $panel->setCaption('Relation » bearbeiten'); // Felder festlegen $inputName = new InputTextboxControl(null, 'name'); $inputName->setValue($this->controller->relation->name); $inputName->addCssClass('required'); $selectField = new InputSelectControl(null, 'field'); foreach ($this->controller->entity->fields as $field) { $selectField->addOption($field->name, $field->name); } $selectField->preSelect($this->controller->relation->field); $inputForeignEntity = new InputTextboxControl(null, 'foreignEntity'); $inputForeignEntity->setValue($this->controller->relation->foreignEntity); $inputForeignEntity->addCssClass('required'); $inputForeignField = new InputTextboxControl(null, 'foreignField'); $inputForeignField->setValue($this->controller->relation->foreignField); $inputForeignField->addCssClass('required'); $inputJoinCriteria = new InputTextboxControl(null, 'joinCriteria'); $inputJoinCriteria->setValue($this->controller->relation->joinCriteria); $selectJoin = new InputSelectControl(null, 'join'); $selectJoin->addOption('inner', 'inner')->addOption('left outer', 'left outer')->addOption('right outer', 'right outer')->preSelect($this->controller->relation->join); // Felder darstellen $edit = new EditControl($panel, 'edit'); $edit->addRow('Name', $inputName)->addRow('Feld in lokaler Entität', $selectField)->addRow('Fremdentität', $inputForeignEntity)->addRow('Feld in Fremdentität', $inputForeignField)->addRow('Join', $selectJoin)->addRow('On-Bedingung', $inputJoinCriteria)->addRow('Implementierende Klasse', InputTextboxControl::create(null, 'foreignClass')->setValue($this->relation->foreignClass)); $button = new ButtonControl($panel, 'button'); $button->setCaption('Speichern')->setIsSubmit('true'); }
protected function createControls() { $this->setPostback('modView', 'endEditFeld', array('current' => $this->request->current, 'entity' => $this->request->entity, 'initPanel' => 2)); $panel = new CaptionedPanelControl($this, 'panel'); $panel->setCaption('Feld » bearbeiten'); $inputName = new InputTextboxControl(null, 'name'); $inputName->setValue($this->controller->feld->name); $inputName->addCssClass('required'); $inputDescription = new InputTextboxControl(null, 'description'); $inputDescription->setValue($this->controller->feld->description); $inputMax = new InputTextboxControl(null, 'maxLength'); $inputMax->setValue($this->controller->feld->maxLength); $inputValidation = new InputTextboxControl(null, 'validation'); $inputValidation->setValue($this->controller->feld->validation); $inputFormel = new InputTextboxControl(null, 'formula'); $inputFormel->setValue($this->controller->feld->getFormula()); $inputIndex = new InputCheckboxControl(null, 'index'); $inputIndex->setValue(1); $inputIndex->setChecked($this->controller->feld->getIndex() == 1); $typ = new InputSelectControl(null, 'type'); $typ->addOption(ModelField::TYPE_IMAGE, 'Bild')->addOption(ModelField::TYPE_BOOLEAN, 'Boolean')->addOption(ModelField::TYPE_DATE, 'Date')->addOption(ModelField::TYPE_DATETIME, 'Datetime')->addOption(ModelField::TYPE_FLOAT, 'Float')->addOption(ModelField::TYPE_HTML, 'Html')->addOption(ModelField::TYPE_INTEGER, 'Integer')->addOption(ModelField::TYPE_PASSWORD, 'Password')->addOption(ModelField::TYPE_STRING, 'String')->addOption(ModelField::TYPE_TEXT, 'Text')->addOption(ModelField::TYPE_TIME, 'Time')->addOption(ModelField::TYPE_FILE, 'Datei')->addOption(ModelField::TYPE_MARKDOWN, 'Markdown')->addOption(ModelField::TYPE_LABEL, 'Label')->preSelect($this->controller->feld->getType()); $edit = new EditControl($panel, 'edit'); $edit->setHeader('Stammdaten bearbeiten')->addRow('Name', $inputName)->addRow('Beschreibung', $inputDescription)->addRow('Datentyp', $typ)->addRow('Länge', $inputMax)->addRow('Validierung', $inputValidation)->addRow('Formel', $inputFormel)->addRow('Index', $inputIndex); $button = new ButtonControl($panel, 'button'); $button->setCaption('Speichern')->setIsSubmit('true'); }
protected function createControls() { $this->setPostback('modView', 'endEditLookup', array('current' => $this->request->current, 'entity' => $this->request->entity, 'initPanel' => 2)); $panel = new CaptionedPanelControl($this, 'panel'); $panel->setCaption('Lookup » bearbeiten'); // Felder festlegen $inputName = new InputTextboxControl(null, 'name'); $inputName->setValue($this->controller->lookup->name); $inputName->addCssClass('required'); $inputDescription = new InputTextboxControl(null, 'description'); $inputDescription->setValue($this->controller->lookup->description); $inputDescription->addCssClass('required'); $selectRelation = new InputSelectControl(null, 'relation'); foreach ($this->controller->entity->relations as $relation) { $selectRelation->addOption($relation->name, $relation->name); } $selectRelation->preSelect($this->controller->lookup->relation); $inputField = new InputTextboxControl(null, 'field'); $inputField->setValue($this->controller->lookup->field); $inputField->addCssClass('required'); // Felder darstellen $edit = new EditControl($panel, 'edit'); $edit->addRow('Name', $inputName)->addRow('Beschreibung', $inputDescription)->addRow('Relation', $selectRelation)->addRow('Feld in Relation', $inputField); $button = new ButtonControl($panel, 'button'); $button->setCaption('Speichern')->setIsSubmit('true'); }
protected function createControls() { $this->setPostback('medien', 'endEditKollektion', array('id' => $this->controller->kollektion->id, 'ko_parent' => $this->controller->kollektion->ko_parent, 'projekt' => $this->request->projekt)); $panel = new CaptionedPanelControl($this, 'panel'); $panel->setCaption('Ordner » bearbeiten'); $selectTyp = new InputSelectControl(null, 'ko_typ'); $selectTyp->addOption(0, '-- beliebig --')->addOption(1, 'Bilder')->addOption(2, 'Video')->addOption(3, 'Audio')->addOption(4, 'Dateien (z.B. PDF)')->preSelect($this->controller->kollektion->ko_typ); $edit = new EditControl($panel, 'edit'); $edit->setEntity($this->controller->kollektion)->setHeader('Stammdaten bearbeiten')->addRow('ko_bezeichnung')->addRow('Typ', $selectTyp); $button = new ButtonControl($panel, 'button'); $button->setCaption('Speichern')->setIsSubmit('true'); }
protected function createControls() { $this->setPostback('modView', 'endEditAktion', array('current' => $this->request->current, 'initPanel' => $this->request->initPanel)); $panel = new CaptionedPanelControl($this, 'panel'); $panel->setCaption('Aktion » bearbeiten'); $inputName = new InputTextboxControl(null, 'name'); $inputName->setValue($this->controller->action->name); $inputName->addCssClass('required'); $inputDescription = new InputTextboxControl(null, 'description'); $inputDescription->setValue($this->controller->action->description); $inputNextItem = new InputTextboxControl(null, 'nextItem'); $inputNextItem->setValue($this->controller->action->nextItem); $addToMenu = new InputCheckboxControl(null, 'addToMenu'); $addToMenu->setChecked($this->controller->action->addToMenu); $security = new InputSelectControl(null, 'securityLevel'); $security->addOption(Action::LEVEL_ALL, 'Alle')->addOption(Action::LEVEL_LOGGEDIN, 'Angemeldete Benutzer')->addOption(Action::LEVEL_CONFIG, 'Rechtevergabe')->preSelect($this->controller->action->securityLevel); $next = new InputSelectControl(null, 'next'); $next->addOption(Action::NEXT_NOTHING, 'Nichts')->addOption(Action::NEXT_ACTION, 'Aktion ausführen')->addOption(Action::NEXT_VIEW, 'View anzeigen')->preSelect($this->controller->action->next); $edit = new EditControl($panel, 'edit'); $edit->setHeader('Stammdaten bearbeiten')->addRow('Name', $inputName)->addRow('Beschreibung', $inputDescription)->addRow('In Menü?', $addToMenu)->addRow('Berechtigung', $security)->addRow('Folgeaktion', $next)->addRow('Folgeelement', $inputNextItem); $button = new ButtonControl($panel, 'button'); $button->setCaption('Speichern')->setIsSubmit('true'); }