protected function createComponentConfigurationForm(): Form
	{
		$form = $this->formFactory->create();
		$form->setAjaxRequest();

		$form->addGroup('cms.settings.basic');
		$form->addImageUpload('cmsLogo', 'cms.settings.logo', 'cms.settings.deleteLogo')
			->setNamespace('cms')
			->setPreview('300x100');
		$form->addCheckbox('sendNewUserPassword', 'cms.settings.sendNewUserPassword');
		$form->addCheckbox('sendChangePassword', 'cms.settings.sendChangePassword');
		$form->addCheckbox('dockbarAdvanced', 'cms.settings.dockbarAdvanced');
		$form->addSelectUntranslated('defaultLocale', 'cms.settings.defaultLocale', $this->localeService->fetch())
			->setDefaultValue($this->localeService->defaultLocaleId);
		$form->addMultiSelectUntranslated('allowedLocales', 'cms.settings.allowedLocales', $this->localeService->fetch())
			->setDefaultValue($this->localeService->allowedLocaleIds)
			->setRequired();

		$form->addGroup('cms.settings.development');
		if (!$this->tracy->isEnabled()) {
			$form->addLink('debugOn', 'cms.settings.debugOn')
				->link($this->link('debug!', true))
				->setAjaxRequest()
				->addClass('btn-success')
				->setAttribute('data-ajax-off', 'history');
		} else {
			$form->addLink('debugOff', 'cms.settings.debugOff')
				->link($this->link('debug!', false))
				->setAjaxRequest()
				->addClass('btn-danger')
				->setAttribute('data-ajax-off', 'history');
		}
		$form->addCheckbox('mailPanel', 'cms.settings.mailPanel')
			->setDefaultValue($this->configurator->mailPanel);

		$form->getRenderer()->primaryButton = $form->addSubmit('save', 'form.save');

		$form->onSuccess[] = [$this, 'configurationFormSucseeded'];

		return $form;
	}
protected function createComponentConfigurationForm(): Form
	{
		$form = $this->formFactory->create();
		$form->setAjaxRequest();

		$form->addGroup('cms.settings.basic');
		$form->addImageUpload('cmsLogo', 'cms.settings.logo', 'cms.settings.deleteLogo')
			->setNamespace('cms')
			->setPreview('300x100');
		$form->addCheckbox('sendNewUserPassword', 'cms.settings.sendNewUserPassword');
		$form->addCheckbox('sendChangePassword', 'cms.settings.sendChangePassword');
		$form->addCheckbox('dockbarAdvanced', 'cms.settings.dockbarAdvanced');
		$form->addSelectUntranslated('defaultLocale', 'cms.settings.defaultLocale', $this->localeService->fetch())
			->setDefaultValue($this->localeService->defaultLocaleId);
		$form->addMultiSelectUntranslated('allowedLocales', 'cms.settings.allowedLocales', $this->localeService->fetch())
			->setDefaultValue($this->localeService->allowedLocaleIds)
			->setRequired();

		$form->addGroup('cms.settings.development');
		if (!$this->tracy->isEnabled()) {
			$form->addLink('debugOn', 'cms.settings.debugOn')
				->link($this->link('debug!', true))
				->setAjaxRequest()
				->addClass('btn-success')
				->setAttribute('data-ajax-off', 'history');
		} else {
			$form->addLink('debugOff', 'cms.settings.debugOff')
				->link($this->link('debug!', false))
				->setAjaxRequest()
				->addClass('btn-danger')
				->setAttribute('data-ajax-off', 'history');
		}
		$form->addCheckbox('mailPanel', 'cms.settings.mailPanel')
			->setDefaultValue($this->configurator->mailPanel);

		$form->getRenderer()->primaryButton = $form->addSubmit('save', 'form.save');

		$form->onSuccess[] = [$this, 'configurationFormSucseeded'];

		return $form;
	}
protected function createComponentConfigurationForm ( ) : Form { $ form = $ this -> formFactory -> create ( ) ; $ form -> setAjaxRequest ( ) ; $ form -> addGroup ( 'cms.settings.basic' ) ; $ form -> addImageUpload ( 'cmsLogo' , 'cms.settings.logo' , 'cms.settings.deleteLogo' ) -> setNamespace ( 'cms' ) -> setPreview ( '300x100' ) ; $ form -> addCheckbox ( 'sendNewUserPassword' , 'cms.settings.sendNewUserPassword' ) ; $ form -> addCheckbox ( 'sendChangePassword' , 'cms.settings.sendChangePassword' ) ; $ form -> addCheckbox ( 'dockbarAdvanced' , 'cms.settings.dockbarAdvanced' ) ; $ form -> addSelectUntranslated ( 'defaultLocale' , 'cms.settings.defaultLocale' , $ this -> localeService -> fetch ( ) ) -> setDefaultValue ( $ this -> localeService -> defaultLocaleId ) ; $ form -> addMultiSelectUntranslated ( 'allowedLocales' , 'cms.settings.allowedLocales' , $ this -> localeService -> fetch ( ) ) -> setDefaultValue ( $ this -> localeService -> allowedLocaleIds ) -> setRequired ( ) ; $ form -> addGroup ( 'cms.settings.development' ) ; if ( ! $ this -> tracy -> isEnabled ( ) ) { $ form -> addLink ( 'debugOn' , 'cms.settings.debugOn' ) -> link ( $ this -> link ( 'debug!' , true ) ) -> setAjaxRequest ( ) -> addClass ( 'btn-success' ) -> setAttribute ( 'data-ajax-off' , 'history' ) ; } else { $ form -> addLink ( 'debugOff' , 'cms.settings.debugOff' ) -> link ( $ this -> link ( 'debug!' , false ) ) -> setAjaxRequest ( ) -> addClass ( 'btn-danger' ) -> setAttribute ( 'data-ajax-off' , 'history' ) ; } $ form -> addCheckbox ( 'mailPanel' , 'cms.settings.mailPanel' ) -> setDefaultValue ( $ this -> configurator -> mailPanel ) ; $ form -> getRenderer ( ) -> primaryButton = $ form -> addSubmit ( 'save' , 'form.save' ) ; $ form -> onSuccess [ ] = [ $ this , 'configurationFormSucseeded' ] ; return $ form ; }
Komponenta formulare nastaveni
@return Form
Komponenta formulare nastaveni