Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
ContactForm.inc.php
1 <?php
2 
16 import('lib.pkp.classes.controllers.tab.settings.form.ContextSettingsForm');
17 
19 
23  function ContactForm($wizardMode = false) {
24  $settings = array(
25  'contactName' => 'string',
26  'contactTitle' => 'string',
27  'contactAffiliation' => 'string',
28  'contactEmail' => 'string',
29  'contactPhone' => 'string',
30  'contactMailingAddress' => 'string',
31  'contactFax' => 'string',
32  'supportName' => 'string',
33  'supportEmail' => 'string',
34  'supportPhone' => 'string'
35  );
36 
37  parent::ContextSettingsForm($settings, 'controllers/tab/settings/contact/form/contactForm.tpl', $wizardMode);
38 
39  $this->addCheck(new FormValidator($this, 'contactName', 'required', 'manager.setup.form.contactNameRequired'));
40  $this->addCheck(new FormValidatorEmail($this, 'contactEmail', 'required', 'manager.setup.form.contactEmailRequired'));
41  if (!$this->getWizardMode()) {
42  $this->addCheck(new FormValidator($this, 'supportName', 'required', 'manager.setup.form.supportNameRequired'));
43  $this->addCheck(new FormValidatorEmail($this, 'supportEmail', 'required', 'manager.setup.form.supportEmailRequired'));
44  }
45  }
46 
47 
48  //
49  // Implement template methods from Form.
50  //
54  function getLocaleFieldNames() {
55  return array('contactTitle', 'contactAffiliation', 'contactMailingAddress');
56  }
57 }
58 
59 ?>
addCheck($formValidator)
Definition: Form.inc.php:396
Form to edit contact settings.
Form validation check for email addresses.
Base class for forms that manage context settings data.
Class to represent a form validation check.
ContactForm($wizardMode=false)