protected function createControls()
 {
     $this->setPostback('modView', 'endEditEntity', array('current' => $this->request->current, 'initPanel' => 2));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Entität » bearbeiten');
     $inputKlasse = new InputTextboxControl(null, 'klasse');
     $inputKlasse->addCssClass('required');
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->entity->name);
     $inputName->addCssClass('required');
     $inputPrimary = new InputTextboxControl(null, 'primary');
     $inputPrimary->setValue($this->controller->entity->primaryKey);
     $inputPrimary->addCssClass('required');
     $inputExtends = new InputTextboxControl(null, 'extends');
     $inputExtends->setValue($this->controller->entity->extends);
     $inputMatch = new InputTextboxControl(null, 'match');
     $inputMatch->setValue($this->controller->entity->match);
     $edit = new EditControl($panel, 'edit');
     $edit->addRow('Tabellenname', $inputName)->addRow('Primärschlüssel', $inputPrimary)->addRow('Basis-Entität (bei Vererbung)', $inputExtends)->addRow('Match (abweichend von der Tabelle bei Vererbung)', $inputMatch);
     if ($this->request->action == 'newEntity') {
         $edit->addRow('Klassename', $inputKlasse);
     }
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 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()
 {
     $kommentare = $this->controller->kommentare;
     $anzahl = count($kommentare);
     if (!$this->request->ajax) {
         $panel = new CaptionedPanelControl($this, 'pnlKommentare');
         $panel->setCaption('Kommentare (' . $anzahl . ')')->setCollapsed(true);
         $container = new ControlContainer($panel, 'ctnrKommentare');
         $container->setSkin('<div id="ctnrKommentare">{controls}</div>');
     } else {
         $container = $this;
     }
     foreach ($this->controller->kommentare as $kommentar) {
         $control = new KommentarControl($container, 'k' . $kommentar->id);
         $control->setKommentar($kommentar);
     }
     if (!$this->request->ajax) {
         $submit = new SubmitDataControl($panel, 'sbmKommentare');
         $submit->setTarget('ctnrKommentare')->setInline(false)->setModule('Kommentare')->setAction('endEditKommentar')->setHiddenValue('ko_element_tabelle', $this->request->entity)->setHiddenValue('ko_element_id', $this->request->id);
         // Möglichkeit neuen Kommentar zu schreiben
         $edit = new EditControl($submit, 'edtKommentar');
         $edit->setEntity(new Kommentar());
         $edit->addRow('ko_kommentar');
     }
 }
 public function setupControls()
 {
     $panel = new CaptionedTabPanelControl($this, $this->id);
     $panel->setCaption($this->caption);
     $sprachen = Model\Sprache::filter(['aktiv' => 1]);
     foreach ($sprachen as $sprache) {
         $tab = $panel->tabs->addTab($sprache->sp_bezeichnung);
         if ($this->text != null) {
             $text = $this->text;
         } else {
             $text = Model\Text::get($this->element, $sprache->id);
             $text = $text->te_text;
         }
         if (!$this->WYSIWYG) {
             $input = new FormControls\InputTextboxControl(null, $this->id . '[' . $sprache->id . ']');
             $input->setValue(htmlentities($text, ENT_QUOTES, 'UTF-8'));
             $content = new DataControls\EditControl($tab, '');
             $content->addRow('angezeigter Text', $input);
         } else {
             $input = new FormControls\InputEditorControl($tab, $this->id . '_' . $sprache->id);
             $input->setName($this->id . '[' . $sprache->id . ']');
             $input->setValue($text);
         }
     }
 }
 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 &raquo; 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 &raquo; 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->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 &raquo; 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('DefaultMod', 'doAnmeldenAls');
     $edit = new EditControl($this, 'editAnmelden');
     $edit->addRow('Benutzer', new InputTextboxControl(null, 'benutzer'));
     $submit = new ButtonControl($this, 'submit');
     $submit->setCaption('Anmelden')->setIsSubmit(true);
 }
 protected function createControls()
 {
     $this->setPostbackUrl(EntityLinks::update($this->controller->importtyp));
     $panel = new StdControls\CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Importtype &raquo; bearbeiten');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->importtyp)->addRow('it_bezeichnung')->addRow('it_klasse');
     $button = new StdControls\SaveButtonControl($panel, 'btnSave');
 }
 protected function createControls()
 {
     $this->setPostbackUrl(EntityLinks::update($this->controller->import));
     $panel = new StdControls\CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Einträge &raquo; bearbeiten');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->import)->addRow('im_bezeichnung')->addRow('it_bezeichnung')->addRow('im_dateiname')->addRow('*FTP')->addRow('im_ftp_host')->addRow('im_ftp_port')->addRow('im_ftp_user')->addRow('im_ftp_pass');
     $button = new StdControls\SaveButtonControl($panel, 'btnSave');
 }
 /**
  * Erzeugt die Controls für den Edit-View. Die Controls werden entweder
  * untereinander oder gemäß dem Template-File angeordnet
  */
 protected function createControls()
 {
     $this->historie = $this->controller->historie;
     $this->setPostbackUrl(EntityLinks::update($this->historie));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Historie &raquo; bearbeiten');
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->historie);
     $button = new SaveButtonControl($panel, 'btnSave');
 }
 protected function createControls()
 {
     $this->setPostback('medien', 'endEditMedien', array('id' => $this->controller->medien->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Medien &raquo; bearbeiten');
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->medien)->addRow('me_titel');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endNewCRUD', array('current' => $this->request->current));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Aktionen &raquo; CRUD anlegen');
     $edit = new EditControl($panel, 'edit');
     $edit->setHeader('Details angeben')->addRow('Entität (logisch)', new InputTextboxControl(null, 'entity'));
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 /**
  *
  */
 protected function createControls()
 {
     $this->page = $this->controller->page;
     $this->setPostback('site', 'endEditPage', array('id' => $this->page->id, 'pa_site' => $this->page->pa_site, 'pa_module' => 'site', 'pa_action' => $this->page->pa_action, 'initPanel' => $this->request->initPanel));
     $panel = new CaptionedTabPanelControl($this, 'panel');
     $panel->setCaption('Seite &raquo; bearbeiten');
     $tabStammdaten = $panel->tabs->addTab('Stammdaten');
     $tabLayout = $panel->tabs->addTab('Layout');
     $lookup = new LookupBoxControl(null, 'pa_parent');
     $lookup->setLookupEntity(new Page())->setTextfield('pa_bezeichnung')->setValuefield('pa_id')->setGroupfield('parent')->setFilter(array('site' => $this->page->pa_site))->showNull(0, '-- Kein Parent --')->preSelect($this->page->pa_parent);
     $edit = new EditControl($tabStammdaten, 'edit');
     $edit->setEntity($this->page)->addRow('pa_ausblenden')->addRow('pa_bezeichnung')->addRow('Parent-Page', $lookup)->addRow('pa_css')->addRow('-')->addRow('pa_link')->addRow('pa_description')->addRow('pa_keywords')->addRow('pa_icon');
     $button = new SaveButtonControl($tabStammdaten, 'button');
     // region Texte
     $texte = new TranslatedTextControl($tabStammdaten, 'texte');
     $texte->setCaption('Angezeiger Text im Menü');
     $texte->setElement($this->page->getElementId());
     if ($this->request->action === 'newPage' && isset($this->request->text)) {
         $texte->setText($this->request->text);
     }
     // endregion
     // region Rechte
     $panelRechte = new CaptionedPanelControl($tabStammdaten, 'panelRechte');
     $panelRechte->setCaption('Seiten &raquo; Berechtigungen');
     $security = new SecurityCheckboxControl($panelRechte, 'berechtigung');
     $security->setElement($this->page->getElementId());
     // endregion
     // region Layout (Neu)
     if ($this->page->pa_action == 'composePage') {
         $rootRegions = Region::loadByPageAndParent($this->page->id, 0);
         foreach ($rootRegions as $region) {
             $block = $region->getBlock();
             if ($block !== null) {
                 $control = $block->toDesignModeHtml();
                 $tabLayout->add($control);
             }
         }
         $addRegion = new Controls\ChooseLayoutBlockControl($tabLayout, 'choose');
         $addRegion->setPage($this->page);
     }
     // endregion
     // region Layout (alt)
     if ($this->page->pa_action == 'useInnerTemplate') {
         $choose = new Controls\ChooseTemplateControl($tabLayout, 'pa_innertemplate');
         $choose->setChosenTemplate($this->page->pa_innertemplate);
         $choose->setOuterTemplate(Template::load($this->controller->site->si_template));
         $edit = new Controls\EditRegionsControl($tabLayout, 'editInPlace');
         $edit->setPageId($this->page->id);
         $edit->setRegions($this->page->getRegions());
         $edit->setTemplate($this->page->pa_innertemplate);
         $button = new ButtonControl($tabLayout, 'button2');
         $button->setCaption('Speichern')->setOnClick("\$('#initPanel').val(1); \$('#postback').submit();");
     }
     // endregion
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endEditModule');
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Neues Modul anlegen');
     $fqn = new InputTextboxControl(null, 'namespace');
     $fqn->setPlaceholder('Namespace z.B. MyApp\\MyModule')->addCssClass('required');
     $edit = new EditControl($panel, 'edit');
     $edit->addRow('Fully Qualified Name', $fqn)->addRow('Beschreibung', new InputTextboxControl(null, 'description'))->addRow('Autor', new InputTextboxControl(null, 'author'))->addRow('Version', new InputTextboxControl(null, 'version'));
     new SaveButtonControl($this, 'btnSpeichern');
 }
 protected function createControls()
 {
     $this->setPostback('site', 'endEditSite', array('id' => $this->controller->site->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Sitemaps &raquo; bearbeiten');
     $selTemplate = new InputSelectControl(null, 'si_template');
     $selTemplate->addOptions(Template::listTemplates());
     $selTemplate->preSelect($this->controller->site->si_template);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->site)->setHeader('Stammdaten bearbeiten')->addRow('si_bezeichnung')->addRow('si_name')->addRow('Template', $selTemplate)->addRow('si_urlpattern');
     $button = new SaveButtonControl($panel, 'button');
 }
 protected function createControls()
 {
     $this->setPostback('DefaultMod', 'doPassword');
     $text = new HilfstextControl($this, 'hilfe');
     $text->setText('USER_KENNWORT_ANFORDERN');
     $input = new InputTextboxControl(null, 'user');
     $input->addCssClass('required');
     $edit = new EditControl($this, 'edt');
     $edit->setMode(EditControl::MODE_VERTICAL)->addRow('ID-Nummer oder Benutzerkennung', $input);
     $submit = new ButtonControl($this, 'submit');
     $submit->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setCaption('Kennwort zurücksetzen')->setIsSubmit(true);
 }
 protected function createControls()
 {
     $this->setPostback('user', 'endEditRolle', array('id' => $this->controller->rolle->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Rollen &raquo; bearbeiten');
     $lobRolle = new DataControls\LookupBoxControl(null, 'ro_parent');
     $lobRolle->setLookupEntity(new Rolle())->setTextfield('ro_bezeichnung')->setTextfield2('parent')->setGroupfield('parent')->setValuefield('ro_id')->preSelect($this->controller->rolle->ro_parent)->showNull(0, '-- keine --');
     $edit = new DataControls\EditControl($panel, 'edit');
     $edit->setEntity($this->controller->rolle)->addRow('ro_bezeichnung')->addRow('ro_schluessel')->addRow('ro_aktiv')->addRow('ro_neuebenutzer')->addRow('Parent-Rolle', $lobRolle);
     $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 &raquo; 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');
 }
 /**
  * @throws \Exception
  */
 protected function createControls()
 {
     $this->setPostback('DefaultMod', 'doReset', ['token' => $this->request->token]);
     $text = new HilfstextControl($this, 'hilfe');
     $text->setText('USER_KENNWORT_FESTLEGEN');
     $input = new InputPasswordControl(null, 'pw1');
     $input->addCssClass('required');
     $input2 = new InputPasswordControl(null, 'pw2');
     $input2->addCssClass('required');
     $edit = new EditControl($this, 'edt');
     $edit->setMode(EditControl::MODE_VERTICAL)->addRow('Kennwort', $input)->addRow('Wiederholen', $input2);
     $submit = new ButtonControl($this, 'submit');
     $submit->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setCaption('Kennwort setzen')->setIsSubmit(true);
 }
 protected function createControls()
 {
     $this->setPostbackUrl(EntityLinks::update($this->controller->kategorie));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Kategorien &raquo; bearbeiten');
     $lookup = new LookupBoxControl(null, 'ck_parent');
     $lookup->setLookupEntity(new Model\CmsKategorie())->setTextfield('ck_bezeichnung')->setValuefield('ck_id')->setGroupfield('parent')->showNull(0, '-- Kein Parent --')->preSelect($this->controller->kategorie->ck_parent);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->kategorie)->setHeader('Stammdaten bearbeiten')->addRow('ck_bezeichnung')->addRow('Parent', $lookup);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
     $texte = new TranslatedTextControl($this, 'texte');
     $texte->setCaption('Angezeiger Text');
     $texte->setElement($this->controller->kategorie->getElementId());
 }
 protected function createControls()
 {
     $this->setPostback('DefaultMod', 'doUsername');
     $wrapper = new WrapperControl($this, 'wrapperIntro');
     $wrapper->setModule('cms')->setAction('show')->addParam('id', 12);
     $panel = new CaptionedPanelControl($this, 'pnl');
     $panel->setCaption('E-Mail-Adresse eingeben');
     $input = new InputTextboxControl(null, 'email');
     $input->addCssClass('required validate-email');
     $edit = new EditControl($panel, 'edt');
     $edit->setEntity(new User());
     $edit->addRow('Ihre Adresse', $input);
     $submit = new ButtonControl($this, 'submit');
     $submit->setCaption('Senden')->setIsSubmit(true)->setAddArrows(false);
 }
 protected function createControls()
 {
     $this->setPostback('site', 'endEditRegion', array('id' => $this->controller->region->id, 're_page' => $this->controller->region->re_page, 're_parent' => $this->controller->region->re_parent, 're_name' => $this->controller->region->re_name));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Region &raquo; bearbeiten');
     $modules = new Controls\ListModuleControl(null, 're_module');
     $modules->setNameOfActionBox('re_action');
     $modules->preSelect($this->controller->region->re_module);
     $actions = new Controls\ListActionControl(null, 're_action');
     $actions->setModule($this->controller->region->re_module);
     $actions->preSelect($this->controller->region->re_action);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->region)->addRow('Modul', $modules)->addRow('Action', $actions)->addRow('re_parameter');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
예제 #24
0
 protected function createControls()
 {
     if (isset($this->request->projekt)) {
         $projekt = $this->request->projekt;
     } else {
         $projekt = 0;
     }
     $this->setPostback('medien', 'doUpload', array('kollektion' => $this->request->kollektion, 'projekt' => $projekt), 'multipart/form-data');
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Upload');
     $fileUpload = new InputFileControl(null, 'Filedata');
     $title = new \NewFrontiers\Controls\FormControls\InputTextboxControl(null, 'titel');
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->kollektion)->setHeader('Datei hochladen')->addRow('Datei', $fileUpload)->addRow('Titel', $title);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
 }
 protected function createControls()
 {
     $this->setPostback('medien', 'endEditShare', array('id' => $this->controller->medien->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Eigenschaften bearbeiten');
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->medien);
     $edit->addRow('me_titel');
     $edit->addRow('me_valid_until');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIcon('floppy-disk')->setIsSubmit('true');
     $panelZugriffe = new CaptionedPanelControl($this, 'panel2');
     $panelZugriffe->setCaption('Zugriffe');
     $zugriffe = new GridControl($panelZugriffe, 'zugriffe');
     $zugriffe->setEntity(new Download(), array('medium' => $this->controller->medien->id));
     $zugriffe->createColumn(GridColumn::FIELD, 'do_download_am');
     $zugriffe->createColumn(GridColumn::FIELD, 'do_ip');
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endEditAktion', array('current' => $this->request->current, 'initPanel' => $this->request->initPanel));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Aktion &raquo; 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');
 }
 protected function createControls()
 {
     $this->setPostback('cms', 'endEditArtikel', array('id' => $this->controller->artikel->id));
     $panel = new CaptionedPanelControl($this, 'panel');
     $panel->setCaption('Artikel &raquo; bearbeiten');
     $lookup = new LookupBoxControl(null, 'ca_kategorie');
     $lookup->setLookupEntity(new Model\CmsKategorie())->setTextfield('ck_bezeichnung')->setValuefield('ck_id')->showNull(0, '-- bitte wählen --')->preSelect($this->controller->artikel->ca_kategorie);
     $edit = new EditControl($panel, 'edit');
     $edit->setEntity($this->controller->artikel)->setHeader('Stammdaten bearbeiten')->addRow('ca_bezeichnung')->addRow('Kategorie', $lookup)->addRow('ca_aktiv')->addRow('ca_geschrieben_am')->addRow('ca_anzeigen_ab_dem')->addRow('ca_anzeigen_bis_zum');
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
     $texte = new Controls\TranslatedTextControl($this, 'titel');
     $texte->setCaption('Titel');
     $texte->setElement($this->controller->artikel->getElementId() . '.titel');
     $texte = new Controls\TranslatedTextControl($this, 'intro');
     $texte->setCaption('Text');
     $texte->setElement($this->controller->artikel->getElementId() . '.intro');
     $texte->setWYSIWYG(true);
     // Bilder
     if ($this->request->action != 'newArtikel') {
         $wrapper = new WrapperControl($this, 'wrapGalerie');
         $wrapper->setModule('medien')->setAction('galerie')->addParam('showDrehen', true)->addParam('showSave', true)->addParam('showDelete', true)->addParam('upload', true)->addParam('id', $this->controller->artikel->ca_kollektion);
     }
 }
 protected function createControls()
 {
     $this->setPostback('modView', 'endEditModule', array('initPanel' => $this->request->initPanel));
     $panel = new CaptionedTabPanelControl($this, 'pnlStammdaten');
     $panel->setCaption('Details zu Modul ' . $this->controller->current->name);
     $tabStamm = $panel->tabs->addTab('Stammdaten');
     $tabAction = $panel->tabs->addTab('Actions');
     $tabEntity = $panel->tabs->addTab('Entitäten');
     $panel->tabs->setInitPanel($this->request->initPanel);
     $inputName = new InputTextboxControl(null, 'name');
     $inputName->setValue($this->controller->current->name)->setReadOnly(true);
     $inputQualifiedName = new InputTextboxControl(null, 'qualifiedName');
     $inputQualifiedName->setValue($this->controller->current->qualifiedName)->setReadOnly(true);
     $inputNamespace = new InputTextboxControl(null, 'name');
     $inputNamespace->setValue($this->controller->current->namespace)->setReadOnly(true);
     $inputDescription = new InputTextboxControl(null, 'description');
     $inputDescription->setValue($this->controller->current->description);
     $inputAuthor = new InputTextboxControl(null, 'author');
     $inputAuthor->setValue($this->controller->current->author);
     $inputVersion = new InputTextboxControl(null, 'version');
     $inputVersion->setValue($this->controller->current->version);
     $panel = $tabStamm;
     $btnGroup = new ButtonGroupControl($panel, 'btnGroup');
     $btnForward = new ButtonControl($btnGroup, 'btnInstall');
     $btnForward->setCaption('Installieren')->setButtonClass(ButtonControl::BUTTON_WARNING)->setLink('modView', 'install', array('id' => $this->request->id))->setIcon('arrow-right');
     $btnForward = new ButtonControl($btnGroup, 'btnBerechtigungen');
     $btnForward->setCaption('Berechtigungen')->setButtonClass(ButtonControl::BUTTON_DANGER)->setLink('modView', 'berechtigungen', array('id' => $this->request->id))->setIcon('lock');
     $edit = new EditControl($panel, 'edit');
     $edit->setHeader('Stammdaten bearbeiten')->addRow('Name', $inputName)->addRow('Namespace', $inputNamespace)->addRow('Qualified-Name', $inputQualifiedName)->addRow('Beschreibung', $inputDescription)->addRow('Autor', $inputAuthor)->addRow('Version', $inputVersion);
     $button = new ButtonControl($panel, 'button');
     $button->setCaption('Speichern')->setIsSubmit('true');
     // --------------------------------------------------------------------------------------------------
     $panel = $tabAction;
     $btnGroupAction = new ButtonGroupControl($panel, 'btnGroupAction');
     $btnNeu = new ButtonControl($btnGroupAction, 'btnNeu');
     $btnNeu->setCaption('Neue Aktion anlegen')->setIcon('plus')->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setLink('modView', 'newAktion', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $btnCRUD = new ButtonControl($btnGroupAction, 'btnCRUD');
     $btnCRUD->setCaption('CRUD Aktionen anlegen')->setIcon('plus')->setLink('modView', 'newCRUD', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $listView = new ListViewControl($panel, 'lv');
     $listView->setSkinFile(__DIR__ . '/ModuleListView.skin');
     $listView->setItemSkinFile(__DIR__ . '/AktionListItem.skin');
     $listView->setVar('header', '<th>Name</th><th>Beschreibung</th><th>Menü</th><th>Sec-Level</th><th>Next-Typ</th><th>Next-Item</th><th>&nbsp;</th>');
     $listView->addItems($this->controller->aktionen);
     $panelEnt = $tabEntity;
     $panel = $panelEnt;
     $btnGroup = new ButtonGroupControl($panel, 'btnGroupEntity');
     $btnNeu = new ButtonControl($btnGroup, 'btnNeuEntity');
     $btnNeu->setCaption('Neue Entität anlegen')->setIcon('plus')->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setLink('modView', 'newEntity', array('current' => $this->request->id))->addCssClass('nfs-modal');
     $btnForward = new ButtonControl($btnGroup, 'btnForward');
     $btnForward->setCaption('DB aktualisieren')->setLink('modView', 'forwardEngineerAll', array('id' => $this->request->id))->setIcon('arrow-right');
     foreach ($this->controller->entities as $name => $entity) {
         $btnEdit = new ButtonControl(null, 'btnEdit');
         $btnEdit->setLink('ModView', 'editEntity', ['current' => $this->request->id, 'id' => $name])->setIcon('pencil')->setCaption('Bearbeiten')->setSize(ButtonControl::SIZE_EXTRASMALL)->addCssClass('nfs-modal');
         $btnDelete = new ButtonControl(null, 'btnDelete');
         $btnDelete->setLink('ModView', 'deleteEntity', ['current' => $this->request->id, 'id' => $name])->setIcon('trash')->setCaption('Löschen')->setButtonClass(ButtonControl::BUTTON_DANGER)->setSize(ButtonControl::SIZE_EXTRASMALL);
         $panel = new CaptionedPanelControl($panelEnt, '');
         if ($this->request->hash == 'entity_' . $name) {
             $panel->setCaption('<a data-toggle="collapse" href="#entity_' . $name . '"><b>' . $name . '</b> ' . $entity['extends'] . '</a>
             <div class="pull-right">' . $btnEdit->toHtml() . $btnDelete->toHtml() . '</div>');
             $panel->setSkin('<div class="panel panel-default {css}">
               <div class="panel-heading">
                 <h3 class="panel-title">{caption}</h3>
               </div>
               <div id="entity_' . $name . '" class="panel-collapse collapse in">
                   <div class="panel-body">
                     {controls}
                   </div>
               </div>
             </div>');
         } else {
             $panel->setCaption('<a class="collapsed" data-toggle="collapse" href="#entity_' . $name . '"><b>' . $name . '</b> ' . $entity['extends'] . '</a>
             <div class="pull-right">' . $btnEdit->toHtml() . $btnDelete->toHtml() . '</div>');
             $panel->setSkin('<div class="panel panel-default {css}">
               <div class="panel-heading">
                 <h3 class="panel-title">{caption}</h3>
               </div>
               <div id="entity_' . $name . '" class="panel-collapse collapse">
                   <div class="panel-body">
                     {controls}
                   </div>
               </div>
             </div>');
         }
         $btnGroup = new ButtonGroupControl($panel, '');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu');
         $btnNeu->setCaption('Neues Feld')->setIcon('plus')->setLink('modView', 'newFeld', array('current' => $this->request->id, 'entity' => $name))->setButtonClass(ButtonControl::BUTTON_PRIMARY)->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu2');
         $btnNeu->setCaption('Neue Relation')->setIcon('plus')->setLink('modView', 'newRelation', array('current' => $this->request->id, 'entity' => $name))->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnNeu3');
         $btnNeu->setCaption('Neues Lookup')->setIcon('plus')->setLink('modView', 'newLookup', array('current' => $this->request->id, 'entity' => $name))->setSize(ButtonControl::SIZE_SMALL)->addCssClass('nfs-modal');
         $btnNeu = new ButtonControl($btnGroup, 'btnForward');
         $btnNeu->setCaption('In DB anlegen')->setIcon('arrow-right')->setLink('modView', 'forwardEngineer', array('current' => $this->request->id, 'id' => $name))->setSize(ButtonControl::SIZE_SMALL);
         $btnCRUD = new ButtonControl($btnGroup, 'btnBackward');
         $btnCRUD->setCaption('XML erzeugen')->setIcon('arrow-left')->setLink('modView', 'backwardEngineer', array('current' => $this->request->id, 'id' => $name))->setSize(ButtonControl::SIZE_SMALL);
         $listView = new ListViewControl($panel, '');
         $listView->setSkinfile(__DIR__ . '/FeldListView.template.html');
         $listView->setItemSkinFile(__DIR__ . '/FeldListItem.skin');
         $listView->setVar('moduleName', $this->request->id);
         $listView->setVar('entityName', $name);
         $listView->addItems($entity['felder']);
     }
 }