Example #1
0
 public function formMorphologyForThisModelInstance()
 {
     $oMorpho = new \Formal\Form\Morphology();
     $oMorpho->add(new \Formal\Element\Listbox(array("prop" => "PROJECT_TIMEZONE", "label" => "Server Time zone", "validation" => "required", "options" => \Baikal\Core\Tools::timezones())));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_CAL_ENABLED", "label" => "Enable CalDAV")));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_CARD_ENABLED", "label" => "Enable CardDAV")));
     $oMorpho->add(new \Formal\Element\Listbox(array("prop" => "BAIKAL_DAV_AUTH_TYPE", "label" => "WebDAV authentication type", "options" => array("Digest", "Basic", "LDAP-UserBind", "Mail"))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_LDAP_URI", "label" => "LDAP URI", "class" => "auth_ldap-userbind")));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_LDAP_DN_TEMPLATE", "label" => "LDAP DN template", "class" => "auth_ldap-userbind", "popover" => array("title" => "posible placeholder", "content" => "<strong>%n</strong> - username<br /><strong>%u</strong> - user part of username , when it is an email address)<br /><strong>%d</strong> - domain part"))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_LDAP_DISPLAYNAME_ATTR", "label" => "LDAP attribute for DisplayName", "class" => "auth_ldap-userbind")));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_LDAP_EMAIL_ATTR", "label" => "LDAP attribute for eMail", "class" => "auth_ldap-userbind")));
     $oMorpho->add(new \Formal\Element\Listbox(array("prop" => "BAIKAL_DAV_MAIL_PROTOCOL", "label" => "MailAuth Protocol", "class" => "auth_mail", "options" => array("imap" => "imap (unencrypted)", "imaps" => "imaps (SSL)", "imaptls" => "imap (StartTLS)", "pop3" => "pop3 (unencrypted)", "pop3s" => "pop3s (SSL)", "pop3tls" => "pop3 (StartTLS)", "smtp" => "smtp (unencrypted)", "smtps" => "smtps (SSL)", "smtptls" => "smtp (StartTLS)"))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "BAIKAL_DAV_MAIL_SERVER", "label" => "MailAuth Server", "class" => "auth_mail", "popover" => array("title" => "Format", "content" => "host:port"))));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_DAV_MAIL_CHECK_CERT", "label" => "MailAuth Check SSL-Certificate", "class" => "auth_mail auth_mail_ssl", "popover" => array("title" => "Security", "content" => "validate the server certificate"))));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_DAV_AUTO_CREATE_USER", "label" => "Automatic create users", "class" => "auth_mail auth_ldap-userbind")));
     $oMorpho->add(new \Formal\Element\Password(array("prop" => "BAIKAL_ADMIN_PASSWORDHASH", "label" => "Admin password")));
     $oMorpho->add(new \Formal\Element\Password(array("prop" => "BAIKAL_ADMIN_PASSWORDHASH_CONFIRM", "label" => "Admin password, confirmation", "validation" => "sameas:BAIKAL_ADMIN_PASSWORDHASH")));
     if (!defined("BAIKAL_ADMIN_PASSWORDHASH") || trim(BAIKAL_ADMIN_PASSWORDHASH) === "") {
         # No password set (Form is used in install tool), so password is required as it has to be defined
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH")->setOption("validation", "required");
     } else {
         $sNotice = "-- Leave empty to keep current password --";
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH")->setOption("placeholder", $sNotice);
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH_CONFIRM")->setOption("placeholder", $sNotice);
     }
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_ADMIN_ENABLED", "label" => "Enable Web interface (recommended)", "popover" => array("title" => "Warning !", "content" => "If disabled, you'll lose access to this very admin interface !"))));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_ADMIN_AUTOLOCKENABLED", "label" => "Web interface autolock", "popover" => array("title" => "Web admin autolock", "content" => "If enabled, you'll have to create a file named <strong>ENABLE_ADMIN</strong> in the folder <strong>Specific/</strong> prior to every admin use.<br /><br />This enforces security, but might be uncomfortable if you use the admin frequently."))));
     return $oMorpho;
 }
Example #2
0
 public function formMorphologyForThisModelInstance()
 {
     $oMorpho = new \Formal\Form\Morphology();
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "uri", "label" => "Address Book token ID", "validation" => "required,tokenid", "popover" => array("title" => "Address Book token ID", "content" => "The unique identifier for this address book."))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "displayname", "label" => "Display name", "validation" => "required", "popover" => array("title" => "Display name", "content" => "This is the name that will be displayed in your CardDAV client."))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "description", "label" => "Description", "validation" => "required")));
     if ($this->floating()) {
         $oMorpho->element("uri")->setOption("help", "Allowed characters are digits, lowercase letters and the dash symbol '-'.");
     } else {
         $oMorpho->element("uri")->setOption("readonly", TRUE);
     }
     return $oMorpho;
 }
Example #3
0
 function formMorphologyForThisModelInstance()
 {
     $oMorpho = new \Formal\Form\Morphology();
     $oMorpho->add(new \Formal\Element\Listbox(["prop" => "PROJECT_TIMEZONE", "label" => "Server Time zone", "validation" => "required", "options" => \Baikal\Core\Tools::timezones()]));
     $oMorpho->add(new \Formal\Element\Checkbox(["prop" => "BAIKAL_CAL_ENABLED", "label" => "Enable CalDAV"]));
     $oMorpho->add(new \Formal\Element\Checkbox(["prop" => "BAIKAL_CARD_ENABLED", "label" => "Enable CardDAV"]));
     $oMorpho->add(new \Formal\Element\Listbox(["prop" => "BAIKAL_DAV_AUTH_TYPE", "label" => "WebDAV authentication type", "options" => ["Digest", "Basic"]]));
     $oMorpho->add(new \Formal\Element\Password(["prop" => "BAIKAL_ADMIN_PASSWORDHASH", "label" => "Admin password"]));
     $oMorpho->add(new \Formal\Element\Password(["prop" => "BAIKAL_ADMIN_PASSWORDHASH_CONFIRM", "label" => "Admin password, confirmation", "validation" => "sameas:BAIKAL_ADMIN_PASSWORDHASH"]));
     if (!defined("BAIKAL_ADMIN_PASSWORDHASH") || trim(BAIKAL_ADMIN_PASSWORDHASH) === "") {
         # No password set (Form is used in install tool), so password is required as it has to be defined
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH")->setOption("validation", "required");
     } else {
         $sNotice = "-- Leave empty to keep current password --";
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH")->setOption("placeholder", $sNotice);
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH_CONFIRM")->setOption("placeholder", $sNotice);
     }
     return $oMorpho;
 }
Example #4
0
 public function formMorphologyForThisModelInstance()
 {
     $oMorpho = new \Formal\Form\Morphology();
     $oMorpho->add(new \Formal\Element\Listbox(array("prop" => "PROJECT_TIMEZONE", "label" => "Server Time zone", "validation" => "required", "options" => \Baikal\Core\Tools::timezones())));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_CAL_ENABLED", "label" => "Enable CalDAV")));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_CARD_ENABLED", "label" => "Enable CardDAV")));
     $oMorpho->add(new \Formal\Element\Listbox(array("prop" => "BAIKAL_DAV_AUTH_TYPE", "label" => "WebDAV authentication type", "options" => array("Digest", "Basic"))));
     $oMorpho->add(new \Formal\Element\Password(array("prop" => "BAIKAL_ADMIN_PASSWORDHASH", "label" => "Admin password")));
     $oMorpho->add(new \Formal\Element\Password(array("prop" => "BAIKAL_ADMIN_PASSWORDHASH_CONFIRM", "label" => "Admin password, confirmation", "validation" => "sameas:BAIKAL_ADMIN_PASSWORDHASH")));
     if (!defined("BAIKAL_ADMIN_PASSWORDHASH") || trim(BAIKAL_ADMIN_PASSWORDHASH) === "") {
         # No password set (Form is used in install tool), so password is required as it has to be defined
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH")->setOption("validation", "required");
     } else {
         $sNotice = "-- Leave empty to keep current password --";
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH")->setOption("placeholder", $sNotice);
         $oMorpho->element("BAIKAL_ADMIN_PASSWORDHASH_CONFIRM")->setOption("placeholder", $sNotice);
     }
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_ADMIN_ENABLED", "label" => "Enable Web interface (recommended)", "popover" => array("title" => "Warning !", "content" => "If disabled, you'll lose access to this very admin interface !"))));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "BAIKAL_ADMIN_AUTOLOCKENABLED", "label" => "Web interface autolock", "popover" => array("title" => "Web admin autolock", "content" => "If enabled, you'll have to create a file named <strong>ENABLE_ADMIN</strong> in the folder <strong>Specific/</strong> prior to every admin use.<br /><br />This enforces security, but might be uncomfortable if you use the admin frequently."))));
     return $oMorpho;
 }
Example #5
0
 public function formMorphologyForThisModelInstance()
 {
     $oMorpho = new \Formal\Form\Morphology();
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "username", "label" => "Username", "validation" => "required,unique", "popover" => array("title" => "Username", "content" => "The login for this user account.<br />It has to be unique."))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "displayname", "label" => "Display name", "validation" => "required", "popover" => array("title" => "Display name", "content" => "This is the name that will be displayed in your CalDAV/CardDAV clients."))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "email", "label" => "Email", "validation" => "required,email")));
     $oMorpho->add(new \Formal\Element\Password(array("prop" => "password", "label" => "Password")));
     $oMorpho->add(new \Formal\Element\Password(array("prop" => "passwordconfirm", "label" => "Confirm password", "validation" => "sameas:password")));
     if ($this->floating()) {
         $oMorpho->element("username")->setOption("help", "May be an email, but not forcibly.");
         $oMorpho->element("password")->setOption("validation", "required");
     } else {
         $sNotice = "-- Leave empty to keep current password --";
         $oMorpho->element("username")->setOption("readonly", true);
         $oMorpho->element("password")->setOption("popover", array("title" => "Password", "content" => "Write something here only if you want to change the user password."));
         $oMorpho->element("passwordconfirm")->setOption("popover", array("title" => "Confirm password", "content" => "Write something here only if you want to change the user password."));
         $oMorpho->element("password")->setOption("placeholder", $sNotice);
         $oMorpho->element("passwordconfirm")->setOption("placeholder", $sNotice);
     }
     return $oMorpho;
 }
Example #6
0
 public function formMorphologyForThisModelInstance()
 {
     $oMorpho = new \Formal\Form\Morphology();
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "uri", "label" => "Calendar token ID", "validation" => "required,tokenid", "popover" => array("title" => "Calendar token ID", "content" => "The unique identifier for this calendar."))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "displayname", "label" => "Display name", "validation" => "required", "popover" => array("title" => "Display name", "content" => "This is the name that will be displayed in your CalDAV client."))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "calendarcolor", "label" => "Calendar color", "validation" => "color", "popover" => array("title" => "Calendar color", "content" => "This is the color that will be displayed in your CalDAV client.</br>" . "Must be supplied in format '#RRGGBBAA' (alpha channel optional) with hexadecimal values.</br>" . "This value is optional."))));
     $oMorpho->add(new \Formal\Element\Text(array("prop" => "description", "label" => "Description")));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "todos", "label" => "Todos", "help" => "If checked, todos will be enabled on this calendar.")));
     $oMorpho->add(new \Formal\Element\Checkbox(array("prop" => "notes", "label" => "Notes", "help" => "If checked, notes will be enabled on this calendar.")));
     if ($this->floating()) {
         $oMorpho->element("uri")->setOption("help", "Allowed characters are digits, lowercase letters and the dash symbol '-'.");
     } else {
         $oMorpho->element("uri")->setOption("readonly", TRUE);
     }
     return $oMorpho;
 }