/** Initialize this form. */ public function init() { $this->setName('visualize_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('E7am5Gj3nMLN5ELy2L2tQZ4e'); $csrf->setDecorators(array('ViewHelper')); $temporaryDirectory = new Zend_Form_Element_Text(VISUALIZE_TEMPORARY_DIRECTORY_KEY); $temporaryDirectory->setLabel('Temp Directory'); $temporaryDirectory->addValidator('NotEmpty', true); $useParaViewWeb = new Zend_Form_Element_Checkbox(VISUALIZE_USE_PARAVIEW_WEB_KEY); $useParaViewWeb->setLabel('Use ParaviewWeb Server'); $useWebGl = new Zend_Form_Element_Checkbox(VISUALIZE_USE_WEB_GL_KEY); $useWebGl->setLabel('Use WebGL Viewer'); $useSymlinks = new Zend_Form_Element_Checkbox(VISUALIZE_USE_SYMLINKS_KEY); $useSymlinks->setLabel('Use Symlinks Instead of Copying'); $tomcatRootUrl = new Zend_Form_Element_Text(VISUALIZE_TOMCAT_ROOT_URL_KEY); $tomcatRootUrl->setLabel('Tomcat Root URL'); $tomcatRootUrl->addValidator('NotEmpty', true); $tomcatRootUrl->addValidator('Callback', true, array('callback' => array('Zend_Uri', 'check'))); $pvbatchCommand = new Zend_Form_Element_Text(VISUALIZE_PVBATCH_COMMAND_KEY); $pvbatchCommand->setLabel('pvbatch Command'); $pvbatchCommand->addValidator('NotEmpty', true); $paraViewWebWorkDirectory = new Zend_Form_Element_Text(VISUALIZE_PARAVIEW_WEB_WORK_DIRECTORY_KEY); $paraViewWebWorkDirectory->setLabel('ParaviewWeb Server Work Directory'); $paraViewWebWorkDirectory->addValidator('NotEmpty', true); $this->addDisplayGroup(array($temporaryDirectory, $useParaViewWeb, $useWebGl, $useSymlinks, $tomcatRootUrl, $pvbatchCommand, $paraViewWebWorkDirectory), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $temporaryDirectory, $useParaViewWeb, $useWebGl, $useSymlinks, $tomcatRootUrl, $pvbatchCommand, $paraViewWebWorkDirectory, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('statistics_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('ppvbBRacZJzNAxTPQgGuRZ8Z'); $csrf->setDecorators(array('ViewHelper')); $piwikUrl = new Zend_Form_Element_Text(STATISTICS_PIWIK_URL_KEY); $piwikUrl->setLabel('Piwik URL'); $piwikUrl->setRequired(true); $piwikUrl->addValidator('NotEmpty', true); $piwikUrl->addValidator('Callback', true, array('callback' => array('Zend_Uri', 'check'))); $piwikId = new Zend_Form_Element_Text(STATISTICS_PIWIK_SITE_ID_KEY); $piwikId->setLabel('Piwik Site ID'); $piwikId->setRequired(true); $piwikId->addValidator('NotEmpty', true); $piwikApiKey = new Zend_Form_Element_Text(STATISTICS_PIWIK_API_KEY_KEY); $piwikApiKey->setLabel('Piwik API Key'); $piwikApiKey->setRequired(true); $piwikApiKey->addValidator('NotEmpty', true); $ipInfoDbApiKey = new Zend_Form_Element_Text(STATISTICS_IP_INFO_DB_API_KEY_KEY); $ipInfoDbApiKey->setLabel('IPInfoDB API Key'); $ipInfoDbApiKey->setRequired(true); $ipInfoDbApiKey->addValidator('NotEmpty', true); $sendReports = new Zend_Form_Element_Checkbox(STATISTICS_SEND_DAILY_REPORTS_KEY); $sendReports->setLabel('Send Daily Reports'); $this->addDisplayGroup(array($piwikUrl, $piwikId, $piwikApiKey, $ipInfoDbApiKey, $sendReports), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $piwikUrl, $piwikId, $piwikApiKey, $ipInfoDbApiKey, $sendReports, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('sizequota_folder'); $this->setAction($this->getView()->baseUrl('/sizequota/folder/submit')); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('FDXuUnSDkUE7Anh2kqgca8zv'); $csrf->setDecorators(array('ViewHelper')); $folderId = new Zend_Form_Element_Hidden('folder_id'); $folderId->setDecorators(array('ViewHelper')); $useDefaultFolderQuota = new Zend_Form_Element_Checkbox('use_default_folder_quota'); $useDefaultFolderQuota->setLabel('Use Default Folder Quota'); $folderQuotaValue = new Zend_Form_Element_Text('folder_quota_value'); $folderQuotaValue->setLabel('Quota'); $folderQuotaValue->addValidator('Float', true); $folderQuotaValue->addValidator('Between', true, array('min' => 0, 'max' => PHP_INT_MAX)); $folderQuotaUnit = new Zend_Form_Element_Select('folder_quota_unit'); $folderQuotaUnit->setLabel('Unit'); $folderQuotaUnit->setRequired(true); $folderQuotaUnit->addValidator('NotEmpty', true); $folderQuotaUnit->addMultiOptions(array(MIDAS_SIZE_B => 'B', MIDAS_SIZE_KB => 'KB', MIDAS_SIZE_MB => 'MB', MIDAS_SIZE_GB => 'GB', MIDAS_SIZE_TB => 'TB')); $this->addDisplayGroup(array($useDefaultFolderQuota, $folderQuotaValue, $folderQuotaUnit), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $folderId, $useDefaultFolderQuota, $folderQuotaValue, $folderQuotaUnit, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('sizequota_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('f6g5NzqPWAunkSykbBpmTmpH'); $csrf->setDecorators(array('ViewHelper')); $defaultUserQuotaValue = new Zend_Form_Element_Text(MIDAS_SIZEQUOTA_DEFAULT_USER_QUOTA_VALUE_KEY); $defaultUserQuotaValue->setLabel('Default User Quota'); $defaultUserQuotaValue->addValidator('Float', true); $defaultUserQuotaValue->addValidator('Between', true, array('min' => 0, 'max' => PHP_INT_MAX)); $defaultUserQuotaUnit = new Zend_Form_Element_Select(MIDAS_SIZEQUOTA_DEFAULT_USER_QUOTA_UNIT_KEY); $defaultUserQuotaUnit->setLabel('Unit'); $defaultUserQuotaUnit->setRequired(true); $defaultUserQuotaUnit->addValidator('NotEmpty', true); $defaultUserQuotaUnit->addMultiOptions(array(MIDAS_SIZE_B => 'B', MIDAS_SIZE_KB => 'KB', MIDAS_SIZE_MB => 'MB', MIDAS_SIZE_GB => 'GB', MIDAS_SIZE_TB => 'TB')); $this->addDisplayGroup(array($defaultUserQuotaValue, $defaultUserQuotaUnit), 'default_user_quota'); $defaultCommunityQuotaValue = new Zend_Form_Element_Text(MIDAS_SIZEQUOTA_DEFAULT_COMMUNITY_QUOTA_VALUE_KEY); $defaultCommunityQuotaValue->setLabel('Default Community Quota'); $defaultCommunityQuotaValue->addValidator('Float', true); $defaultCommunityQuotaValue->addValidator('Between', true, array('min' => 0, 'max' => PHP_INT_MAX)); $defaultCommunityQuotaUnit = new Zend_Form_Element_Select(MIDAS_SIZEQUOTA_DEFAULT_COMMUNITY_QUOTA_UNIT_KEY); $defaultCommunityQuotaUnit->setLabel('Unit'); $defaultCommunityQuotaUnit->setRequired(true); $defaultCommunityQuotaUnit->addValidator('NotEmpty', true); $defaultCommunityQuotaUnit->addMultiOptions(array(MIDAS_SIZE_B => 'B', MIDAS_SIZE_KB => 'KB', MIDAS_SIZE_MB => 'MB', MIDAS_SIZE_GB => 'GB', MIDAS_SIZE_TB => 'TB')); $this->addDisplayGroup(array($defaultCommunityQuotaValue, $defaultCommunityQuotaUnit), 'default_community_quota'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $defaultUserQuotaValue, $defaultUserQuotaUnit, $defaultCommunityQuotaValue, $defaultCommunityQuotaUnit, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('dicomextractor_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('49XPMaMZKPVq6uGt3vgMbp7Y'); $csrf->setDecorators(array('ViewHelper')); $dcm2xmlCommand = new Zend_Form_Element_Text(DICOMEXTRACTOR_DCM2XML_COMMAND_KEY); $dcm2xmlCommand->setLabel('dcm2xml Command'); $dcm2xmlCommand->setRequired(true); $dcm2xmlCommand->addValidator('NotEmpty', true); $dcmj2pnmCommand = new Zend_Form_Element_Text(DICOMEXTRACTOR_DCMJ2PNM_COMMAND_KEY); $dcmj2pnmCommand->setLabel('dcmj2pnm Command'); $dcmj2pnmCommand->setRequired(true); $dcmj2pnmCommand->addValidator('NotEmpty', true); $dcmftestCommand = new Zend_Form_Element_Text(DICOMEXTRACTOR_DCMFTEST_COMMAND_KEY); $dcmftestCommand->setLabel('dcmftest Command'); $dcmftestCommand->setRequired(true); $dcmftestCommand->addValidator('NotEmpty', true); $dcmdictpath = new Zend_Form_Element_Text(DICOMEXTRACTOR_DCMDICTPATH_KEY); $dcmdictpath->setLabel('DCMDICTPATH Environment Variable'); $dcmdictpath->setRequired(true); $dcmdictpath->addValidator('NotEmpty', true); $this->addDisplayGroup(array($dcm2xmlCommand, $dcmj2pnmCommand, $dcmftestCommand, $dcmdictpath), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $dcm2xmlCommand, $dcmj2pnmCommand, $dcmftestCommand, $dcmdictpath, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('solr_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('VhyLUG4sRzUwa43P96W7kVM8'); $csrf->setDecorators(array('ViewHelper')); $host = new Zend_Form_Element_Text(SOLR_HOST_KEY); $host->setLabel('Solr Host'); $host->setRequired(true); $host->addValidator('NotEmpty', true); $host->addValidator('Hostname', true, array('allow' => Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false)); $port = new Zend_Form_Element_Text(SOLR_PORT_KEY); $port->setLabel('Solr Port'); $port->setRequired(true); $port->addValidator('NotEmpty', true); $port->addValidator('Digits', true); $port->addValidator('Between', true, array('min' => 1, 'max' => 65535)); $port->setAttrib('maxlength', 5); $webroot = new Zend_Form_Element_Text(SOLR_WEBROOT_KEY); $webroot->setLabel('Solr Webroot'); $webroot->setRequired(true); $webroot->addValidator('NotEmpty', true); $this->addDisplayGroup(array($host, $port, $webroot), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $host, $port, $webroot, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('oai_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('YTVEA8QwsJqFaPfcnEugjKrM'); $csrf->setDecorators(array('ViewHelper')); $repositoryName = new Zend_Form_Element_Text(OAI_REPOSITORY_NAME_KEY); $repositoryName->setLabel('OAI Repository Name'); $repositoryName->setRequired(true); $repositoryName->addValidator('NotEmpty', true); $repositoryIdentifier = new Zend_Form_Element_Text(OAI_REPOSITORY_IDENTIFIER_KEY); $repositoryIdentifier->setLabel('OAI Repository Identifier'); $repositoryIdentifier->setRequired(true); $repositoryIdentifier->addValidator('NotEmpty', true); $adminEmail = new Zend_Form_Element_Text(OAI_ADMIN_EMAIL_KEY); $adminEmail->setLabel('Admin Email Address'); $adminEmail->setRequired(true); $adminEmail->addValidator('NotEmpty', true); $adminEmail->addValidator('EmailAddress', true); $this->addDisplayGroup(array($repositoryName, $repositoryIdentifier, $adminEmail), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $repositoryName, $repositoryIdentifier, $adminEmail, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('ldap_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('pZyCgKUmRGcsxVdNEtJLrAhW'); $csrf->setDecorators(array('ViewHelper')); $hostName = new Zend_Form_Element_Text(LDAP_HOST_NAME_KEY); $hostName->setLabel('LDAP Server Name'); $hostName->setRequired(true); $hostName->addValidator('NotEmpty', true); $hostName->addValidator('Hostname', true, array('allow' => Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false)); $port = new Zend_Form_Element_Text(LDAP_PORT_KEY); $port->setLabel('LDAP Server Port'); $port->setRequired(true); $port->addValidator('NotEmpty', true); $port->addValidator('Digits', true); $port->addValidator('Between', true, array('min' => 1, 'max' => 65535)); $port->setAttrib('maxlength', 5); $backupServer = new Zend_Form_Element_Text(LDAP_BACKUP_SERVER_KEY); $backupServer->setLabel('Backup Server Name'); $backupServer->addValidator('NotEmpty', true); $backupServer->addValidator('Hostname', true, array('allow' => Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false)); $bindRdn = new Zend_Form_Element_Text(LDAP_BIND_RDN_KEY); $bindRdn->setLabel('Bind DN'); $bindRdn->addValidator('NotEmpty', true); $bindPassword = new Zend_Form_Element_Password(LDAP_BIND_PASSWORD_KEY); $bindPassword->setLabel('Bind Password'); $bindPassword->addValidator('NotEmpty', true); $baseDn = new Zend_Form_Element_Text(LDAP_BASE_DN_KEY); $baseDn->setLabel('Base DN'); $baseDn->setRequired(true); $baseDn->addValidator('NotEmpty', true); $protocolVersion = new Zend_Form_Element_Text(LDAP_PROTOCOL_VERSION_KEY); $protocolVersion->setLabel('LDAP Protocol Version'); $protocolVersion->setRequired(true); $protocolVersion->addValidator('NotEmpty', true); $protocolVersion->addValidator('Digits', true); $protocolVersion->addValidator('GreaterThan', true, array('min' => 1)); $protocolVersion->setAttrib('maxlength', 1); $searchTerm = new Zend_Form_Element_Text(LDAP_SEARCH_TERM_KEY); $searchTerm->setLabel('Search Term'); $searchTerm->setRequired(true); $searchTerm->addValidator('NotEmpty', true); $proxyBaseDn = new Zend_Form_Element_Text(LDAP_PROXY_BASE_DN_KEY); $proxyBaseDn->setLabel('Proxy Base DN'); $proxyBaseDn->addValidator('NotEmpty', true); $proxyPassword = new Zend_Form_Element_Password(LDAP_PROXY_PASSWORD_KEY); $proxyPassword->setLabel('Proxy Password'); $proxyPassword->addValidator('NotEmpty', true); $useActiveDirectory = new Zend_Form_Element_Checkbox(LDAP_USE_ACTIVE_DIRECTORY_KEY); $useActiveDirectory->setLabel('Use Active Directory'); $autoAddUnknownUser = new Zend_Form_Element_Checkbox(LDAP_AUTO_ADD_UNKNOWN_USER_KEY); $autoAddUnknownUser->setLabel('Automatically Add Unknown Users'); $this->addDisplayGroup(array($hostName, $port, $backupServer, $bindRdn, $bindPassword, $baseDn, $protocolVersion, $searchTerm, $proxyBaseDn, $proxyPassword, $useActiveDirectory, $autoAddUnknownUser), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $hostName, $port, $backupServer, $bindRdn, $bindPassword, $baseDn, $protocolVersion, $searchTerm, $proxyBaseDn, $proxyPassword, $useActiveDirectory, $autoAddUnknownUser, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('demo_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('25LPjLsarZvkFTK8t5ntWSDF'); $csrf->setDecorators(array('ViewHelper')); $enabled = new Zend_Form_Element_Checkbox(MIDAS_DEMO_ENABLED_KEY); $enabled->setLabel('Enabled'); $this->addDisplayGroup(array($enabled), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $enabled, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('mail_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('5qzSHzCdNuPfYaT99Jq5WcKe'); $csrf->setDecorators(array('ViewHelper')); $provider = new Zend_Form_Element_Select(MAIL_PROVIDER_KEY); $provider->setLabel('Provider'); $provider->setRequired(true); $provider->addValidator('NotEmpty', true); $provider->addMultiOptions(array(MAIL_PROVIDER_APP_ENGINE => 'Google App Engine', MAIL_PROVIDER_MAIL => 'PHP Mail Function', MAIL_PROVIDER_SEND_GRID => 'SendGrid Service', MAIL_PROVIDER_SMTP => 'External SMTP Server')); $fromAddress = new Zend_Form_Element_Text(MAIL_FROM_ADDRESS_KEY); $fromAddress->setLabel('From email address'); $fromAddress->setRequired(true); $fromAddress->addValidator('NotEmpty', true); $fromAddress->addValidator('EmailAddress', true); $addressVerification = new Zend_Form_Element_Checkbox(MAIL_ADDRESS_VERIFICATION_KEY); $addressVerification->setLabel('Require email address verification'); $this->addDisplayGroup(array($provider, $fromAddress, $addressVerification), 'global'); $sendGridUsername = new Zend_Form_Element_Text(MAIL_SEND_GRID_USERNAME_KEY); $sendGridUsername->setLabel('SendGrid User Name'); $sendGridUsername->addValidator('NotEmpty', true); $sendGridPassword = new Zend_Form_Element_Password(MAIL_SEND_GRID_PASSWORD_KEY); $sendGridPassword->setLabel('SendGrid Password'); $sendGridPassword->addValidator('NotEmpty', true); $this->addDisplayGroup(array($sendGridUsername, $sendGridPassword), 'send_grid'); $smtpHost = new Zend_Form_Element_Text(MAIL_SMTP_HOST_KEY); $smtpHost->setLabel('Server name'); $smtpHost->addValidator('NotEmpty', true); $smtpHost->addValidator('Hostname', true, array('allow' => Zend_Validate_Hostname::ALLOW_ALL, 'tld' => false)); $smtpPort = new Zend_Form_Element_Text(MAIL_SMTP_PORT_KEY); $smtpPort->setLabel('Port'); $smtpPort->addValidator('NotEmpty', true); $smtpPort->addValidator('Digits', true); $smtpPort->addValidator('Between', true, array('min' => 1, 'max' => 65535)); $smtpPort->setAttrib('maxlength', 5); $smtpUseSsl = new Zend_Form_Element_Checkbox(MAIL_SMTP_USE_SSL_KEY); $smtpUseSsl->setLabel('Use SSL'); $smtpUsername = new Zend_Form_Element_Text(MAIL_SMTP_USERNAME_KEY); $smtpUsername->setLabel('User name'); $smtpUsername->addValidator('NotEmpty', true); $smtpPassword = new Zend_Form_Element_Password(MAIL_SMTP_PASSWORD_KEY); $smtpPassword->setLabel('Password'); $smtpPassword->addValidator('NotEmpty', true); $this->addDisplayGroup(array($smtpHost, $smtpPort, $smtpUseSsl, $smtpUsername, $smtpPassword), 'smtp'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $provider, $fromAddress, $addressVerification, $sendGridUsername, $sendGridPassword, $smtpHost, $smtpPort, $smtpUseSsl, $smtpUsername, $smtpPassword, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('archive_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('W7cVNWjvC9T4heyd7AyTj52Q'); $csrf->setDecorators(array('ViewHelper')); $unzipCommand = new Zend_Form_Element_Text(ARCHIVE_UNZIP_COMMAND_KEY); $unzipCommand->setLabel('Unzip command'); $unzipCommand->addValidator('NotEmpty', true); $this->addDisplayGroup(array($unzipCommand), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $unzipCommand, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('metadataextractor_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('kKDgxqJDvm6MQLPUrx555H4m'); $csrf->setDecorators(array('ViewHelper')); $hachoirMetadataCommand = new Zend_Form_Element_Text('hachoir_metadata_command'); $hachoirMetadataCommand->setLabel('Hachoir Metadata Command'); $hachoirMetadataCommand->setRequired(true); $hachoirMetadataCommand->addValidator('NotEmpty', true); $this->addDisplayGroup(array($hachoirMetadataCommand), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $hachoirMetadataCommand, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('api_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('7ASBLg59r2KdBHbANpgJ7Vev'); $csrf->setDecorators(array('ViewHelper')); $methodPrefix = new Zend_Form_Element_Text(API_METHOD_PREFIX_KEY); $methodPrefix->setLabel('Method Prefix'); $methodPrefix->setRequired(true); $methodPrefix->addValidator('NotEmpty', true); $this->addDisplayGroup(array($methodPrefix), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $methodPrefix, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('remoteprocessing_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('fwqASktheDxMaZa3Byb4qSV3'); $csrf->setDecorators(array('ViewHelper')); $securityKey = new Zend_Form_Element_Text(MIDAS_REMOTEPROCESSING_SECURITY_KEY_KEY); $securityKey->setLabel('Security Key'); $securityKey->addValidator('NotEmpty', true); $showButton = new Zend_Form_Element_Checkbox(MIDAS_REMOTEPROCESSING_SHOW_BUTTON_KEY); $showButton->setLabel('Show Process Button'); $this->addDisplayGroup(array($securityKey, $showButton), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $securityKey, $showButton, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('tracker_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('APSey8FJpXfDssQU5CqA9qe5'); $csrf->setDecorators(array('ViewHelper')); $tempScalarTtl = new Zend_Form_Element_Text(MIDAS_TRACKER_TEMP_SCALAR_TTL_KEY); $tempScalarTtl->setLabel('Unofficial Scalar TTL'); $tempScalarTtl->setRequired(true); $tempScalarTtl->addValidator('NotEmpty', true); $tempScalarTtl->addValidator('Digits', true); $tempScalarTtl->addValidator('GreaterThan', true, array('min' => 0)); $this->addDisplayGroup(array($tempScalarTtl), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $tempScalarTtl, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('landingpage_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('kUjBumZdEykrY8JHB88uzZjv'); $csrf->setDecorators(array('ViewHelper')); $text = new Zend_Form_Element_Textarea(LANDINGPAGE_TEXT_KEY); $text->setLabel('Landing Page Text'); $text->setRequired(true); $text->addValidator('NotEmpty', true); $text->setAttrib('cols', '80'); $text->setAttrib('rows', '40'); $this->addDisplayGroup(array($text), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $text, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('cleanup_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('BM8CwGYZBs8VqCUvHKsZ85g5'); $csrf->setDecorators(array('ViewHelper')); $daysToKeepPartialFiles = new Zend_Form_Element_Text(CLEANUP_DAYS_TO_KEEP_PARTIAL_FILES_KEY); $daysToKeepPartialFiles->setLabel('Days to Keep Partial Files'); $daysToKeepPartialFiles->setRequired(true); $daysToKeepPartialFiles->addValidator('NotEmpty', true); $daysToKeepPartialFiles->addValidator('Digits', true); $daysToKeepPartialFiles->addValidator('GreaterThan', true, array('min' => 1)); $this->addDisplayGroup(array($daysToKeepPartialFiles), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $daysToKeepPartialFiles, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('googleauth_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('qsJm32258fFFcBRjbSHHu628'); $csrf->setDecorators(array('ViewHelper')); $clientId = new Zend_Form_Element_Text(GOOGLE_AUTH_CLIENT_ID_KEY); $clientId->setLabel('Client ID'); $clientId->setRequired(true); $clientId->addValidator('NotEmpty', true); $clientSecret = new Zend_Form_Element_Text(GOOGLE_AUTH_CLIENT_SECRET_KEY); $clientSecret->setLabel('Client Secret'); $clientSecret->setRequired(true); $clientSecret->addValidator('NotEmpty', true); $this->addDisplayGroup(array($clientId, $clientSecret), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $clientId, $clientSecret, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('thumbnailcreator_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('tKHLsBvnbLVYaWJNhrrafrBz'); $csrf->setDecorators(array('ViewHelper')); $provider = new Zend_Form_Element_Select(MIDAS_THUMBNAILCREATOR_PROVIDER_KEY); $provider->setLabel('Provider'); $provider->setRequired(true); $provider->addValidator('NotEmpty', true); $provider->addMultiOption(MIDAS_THUMBNAILCREATOR_PROVIDER_NONE, 'None'); if (extension_loaded('gd')) { $provider->addMultiOption(MIDAS_THUMBNAILCREATOR_PROVIDER_GD, 'GD PHP Extension'); } if (extension_loaded('imagick')) { $provider->addMultiOption(MIDAS_THUMBNAILCREATOR_PROVIDER_IMAGICK, 'ImageMagick PHP Extension'); } $provider->addMultiOption(MIDAS_THUMBNAILCREATOR_PROVIDER_PHMAGICK, 'ImageMagick Program'); $format = new Zend_Form_Element_Select(MIDAS_THUMBNAILCREATOR_FORMAT_KEY); $format->setLabel('Format'); $format->setRequired(true); $format->addValidator('NotEmpty', true); $format->addMultiOptions(array(MIDAS_THUMBNAILCREATOR_FORMAT_GIF => 'GIF', MIDAS_THUMBNAILCREATOR_FORMAT_JPG => 'JPEG', MIDAS_THUMBNAILCREATOR_FORMAT_PNG => 'PNG')); $this->addDisplayGroup(array($provider, $format), 'global'); $imageMagick = new Zend_Form_Element_Text(MIDAS_THUMBNAILCREATOR_IMAGE_MAGICK_KEY); $imageMagick->setLabel('ImageMagick program location (path)'); $imageMagick->addValidator('NotEmpty', true); $useThumbnailer = new Zend_Form_Element_Checkbox(MIDAS_THUMBNAILCREATOR_USE_THUMBNAILER_KEY); $useThumbnailer->setLabel('Have thumbnailer and want to use it to support more image formats'); $thumbnailer = new Zend_Form_Element_Text(MIDAS_THUMBNAILCREATOR_THUMBNAILER_KEY); $thumbnailer->setLabel('Thumbnailer program location (path)'); $thumbnailer->addValidator('NotEmpty', true); $this->addDisplayGroup(array($imageMagick, $useThumbnailer, $thumbnailer), 'phmagick'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $provider, $format, $imageMagick, $useThumbnailer, $thumbnailer, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('batchmake_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash(MIDAS_BATCHMAKE_CSRF_TOKEN); $csrf->setSalt('KZVfYdsDTzQh5T7eQDXmADfu'); $csrf->setDecorators(array('ViewHelper')); $tmpDirectory = new Zend_Form_Element_Text(MIDAS_BATCHMAKE_TMP_DIR_PROPERTY); $tmpDirectory->setLabel('BatchMake Temporary Directory'); $tmpDirectory->setRequired(true); $tmpDirectory->addValidator('NotEmpty', true); $binDirectory = new Zend_Form_Element_Text(MIDAS_BATCHMAKE_BIN_DIR_PROPERTY); $binDirectory->setLabel('BatchMake Binary Directory'); $binDirectory->setRequired(true); $binDirectory->addValidator('NotEmpty', true); $scriptDirectory = new Zend_Form_Element_Text(MIDAS_BATCHMAKE_SCRIPT_DIR_PROPERTY); $scriptDirectory->setLabel('BatchMake Script Directory'); $scriptDirectory->setRequired(true); $scriptDirectory->addValidator('NotEmpty', true); $appDirectory = new Zend_Form_Element_Text(MIDAS_BATCHMAKE_APP_DIR_PROPERTY); $appDirectory->setLabel('BatchMake Application Directory'); $appDirectory->setRequired(true); $appDirectory->addValidator('NotEmpty', true); $dataDirectory = new Zend_Form_Element_Text(MIDAS_BATCHMAKE_DATA_DIR_PROPERTY); $dataDirectory->setLabel('BatchMake Data Directory'); $dataDirectory->setRequired(true); $dataDirectory->addValidator('NotEmpty', true); $condorBinDirectory = new Zend_Form_Element_Text(MIDAS_BATCHMAKE_CONDOR_BIN_DIR_PROPERTY); $condorBinDirectory->setLabel('Condor Binary Directory'); $condorBinDirectory->setRequired(true); $condorBinDirectory->addValidator('NotEmpty', true); $this->addDisplayGroup(array($tmpDirectory, $binDirectory, $scriptDirectory, $appDirectory, $dataDirectory, $condorBinDirectory), 'global'); $submit = new Zend_Form_Element_Submit(MIDAS_BATCHMAKE_SUBMIT_CONFIG); $submit->setLabel('Save'); $this->addElements(array($csrf, $tmpDirectory, $binDirectory, $scriptDirectory, $appDirectory, $dataDirectory, $condorBinDirectory, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('pvw_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('y9RNWEVLJUWDBhkrbLmGFmZj'); $csrf->setDecorators(array('ViewHelper')); $pvPython = new Zend_Form_Element_Text(MIDAS_PVW_PVPYTHON_KEY); $pvPython->setLabel('pvpython Command'); $pvPython->setRequired(true); $pvPython->addValidator('NotEmpty', true); $ports = new Zend_Form_Element_Text(MIDAS_PVW_PORTS_KEY); $ports->setLabel('Ports'); $ports->setRequired(true); $ports->addValidator('NotEmpty', true); $displayEnv = new Zend_Form_Element_Text(MIDAS_PVW_DISPLAY_ENV_KEY); $displayEnv->setLabel('DISPLAY Environment Variable'); $displayEnv->setRequired(true); $displayEnv->addValidator('NotEmpty', true); $this->addDisplayGroup(array($pvPython, $ports, $displayEnv), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $pvPython, $ports, $displayEnv, $submit)); }
/** Initialize this form. */ public function init() { $this->setName('dicomserver_admin'); $this->setMethod('POST'); $csrf = new Midas_Form_Element_Hash('csrf'); $csrf->setSalt('sAfDFebTDemATWR4gGrYGMSE'); $csrf->setDecorators(array('ViewHelper')); $dcm2xmlCommand = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_DCM2XML_COMMAND_KEY); $dcm2xmlCommand->setLabel('dcm2xml Command'); $dcm2xmlCommand->setRequired(true); $dcm2xmlCommand->addValidator('NotEmpty', true); $storescpCommand = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_STORESCP_COMMAND_KEY); $storescpCommand->setLabel('storescp Command'); $storescpCommand->setRequired(true); $storescpCommand->addValidator('NotEmpty', true); $storescpPort = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_STORESCP_PORT_KEY); $storescpPort->setLabel('storescp Port'); $storescpPort->setRequired(true); $storescpPort->addValidator('NotEmpty', true); $storescpPort->addValidator('Digits', true); $storescpPort->addValidator('Between', true, array('min' => 1, 'max' => 65535)); $storescpPort->setAttrib('maxlength', 5); $storescpStudyTimeout = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_STORESCP_STUDY_TIMEOUT_KEY); $storescpStudyTimeout->setLabel('storescp Study Timeout (in Seconds)'); $storescpStudyTimeout->setRequired(true); $storescpStudyTimeout->addValidator('NotEmpty', true); $storescpStudyTimeout->addValidator('Digits', true); $storescpStudyTimeout->addValidator('GreaterThan', true, array('min' => 0)); $receptionDirectory = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_RECEPTION_DIRECTORY_KEY); $receptionDirectory->setLabel('Reception Directory for DICOM Files'); $receptionDirectory->setRequired(true); $receptionDirectory->addValidator('NotEmpty', true); $destinationFolder = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_DESTINATION_FOLDER_KEY); $destinationFolder->setLabel('Upload Destination Folder'); $destinationFolder->setRequired(true); $destinationFolder->addValidator('NotEmpty', true); $dcmqrscpCommand = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_DCMQRSCP_COMMAND_KEY); $dcmqrscpCommand->setLabel('dcmqrscp Command'); $dcmqrscpCommand->setRequired(true); $dcmqrscpCommand->addValidator('NotEmpty', true); $dcmqrscpPort = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_DCMQRSCP_PORT_KEY); $dcmqrscpPort->setLabel('dcmqrscp Port'); $dcmqrscpPort->setRequired(true); $dcmqrscpPort->addValidator('NotEmpty', true); $dcmqrscpPort->addValidator('Digits', true); $dcmqrscpPort->addValidator('Between', true, array('min' => 1, 'max' => 65535)); $dcmqrscpPort->setAttrib('maxlength', 5); $dcmqridxCommand = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_DCMQRIDX_COMMAND_KEY); $dcmqridxCommand->setLabel('dcmqridx Command'); $dcmqridxCommand->setRequired(true); $dcmqridxCommand->addValidator('NotEmpty', true); $serverAeTitle = new Zend_Form_Element_Text(MIDAS_DICOMSERVER_SERVER_AE_TITLE_KEY); $serverAeTitle->setLabel('Server Application Entity Title'); $serverAeTitle->setRequired(true); $serverAeTitle->addValidator('NotEmpty', true); $peerAes = new Zend_Form_Element_Textarea(MIDAS_DICOMSERVER_PEER_AES_KEY); $peerAes->setLabel('Peer Application Entities Allowed to Use Query/Retrieve Services'); $peerAes->addValidator('NotEmpty', true); $this->addDisplayGroup(array($dcm2xmlCommand, $storescpCommand, $storescpPort, $storescpStudyTimeout, $receptionDirectory, $destinationFolder, $dcmqrscpCommand, $dcmqrscpPort, $dcmqridxCommand, $serverAeTitle, $peerAes), 'global'); $submit = new Zend_Form_Element_Submit('submit'); $submit->setLabel('Save'); $this->addElements(array($csrf, $dcm2xmlCommand, $storescpCommand, $storescpPort, $storescpStudyTimeout, $receptionDirectory, $destinationFolder, $dcmqrscpCommand, $dcmqrscpPort, $dcmqridxCommand, $serverAeTitle, $peerAes, $submit)); }