function churchresource_getAdminForm()
{
    global $config;
    $model = new CTModuleForm("churchresource");
    $model->addField("churchresource_entries_last_days", "", "INPUT_REQUIRED", "Wieviel Tage zurück in ChurchResource-Daten geladen werden");
    $model->fields["churchresource_entries_last_days"]->setValue($config["churchresource_entries_last_days"]);
    return $model;
}
/**
 * form for admin seddings
 * @return CTModuleForm
 */
function churchresource_getAdminForm()
{
    global $config;
    $model = new CTModuleForm("churchresource");
    $model->addField("churchresource_entries_last_days", "", "INPUT_REQUIRED", t('data.from.x.how.many.days.in.the.past.to.load', 'ChurchResource'))->setValue($config["churchresource_entries_last_days"]);
    if (getConf("churchresource_send_emails", null) == null) {
        $config["churchresource_send_emails"] = true;
    }
    $model->addField("churchresource_send_emails", "", "CHECKBOX", t('enable.sending.emails'))->setValue($config["churchresource_send_emails"]);
    return $model;
}
/**
 * get form for churchservice system preferences
 * @return CTModuleForm
 */
function churchservice_getAdminForm()
{
    global $config;
    $model = new CTModuleForm("churchservice");
    $model->addField("churchservice_entries_last_days", "", "INPUT_REQUIRED", t('data.from.x.how.many.days.in.the.past.to.load', 'ChurchService'))->setValue($config["churchservice_entries_last_days"]);
    $model->addField("churchservice_openservice_rememberdays", "", "INPUT_REQUIRED", t('after.how.many.days.service.requests.should.be.repeated'))->setValue($config["churchservice_openservice_rememberdays"]);
    $model->addField("churchservice_reminderhours", "", "INPUT_REQUIRED", t('how.many.hours.before.service.send.remember.email'))->setValue($config["churchservice_reminderhours"]);
    $model->addField("churchservice_songwithcategoryasdir", "", "CHECKBOX", 'Beim Export nach SongBeamer Kategorien als Unterordner hinzufügen')->setValue(getVar("churchservice_songwithcategoryasdir", "0", $config));
    return $model;
}
/**
 * get form for churchservice system preferences  
 * @return CTModuleForm
 */
function churchservice_getAdminForm()
{
    global $config;
    $model = new CTModuleForm("churchservice");
    $model->addField("churchservice_entries_last_days", "", "INPUT_REQUIRED", "Wieviel Tage zur�ck in ChurchService-Daten geladen werden");
    $model->fields["churchservice_entries_last_days"]->setValue($config["churchservice_entries_last_days"]);
    $model->addField("churchservice_openservice_rememberdays", "", "INPUT_REQUIRED", "Nach wieviel Tagen die Dienstanfrage erneut statt findet, wenn sie noch nicht zugesagt oder abgelehnt wurde");
    $model->fields["churchservice_openservice_rememberdays"]->setValue($config["churchservice_openservice_rememberdays"]);
    $model->addField("churchservice_reminderhours", "", "INPUT_REQUIRED", "Wieviele Stunden im Vorfeld eine Erinnerung an den Dienst erfolgen soll");
    $model->fields["churchservice_reminderhours"]->setValue($config["churchservice_reminderhours"]);
    $model->addField("churchservice_songwithcategoryasdir", "", "CHECKBOX", "Kategorie als Verzeichnisangabe nutzen f�r Beamersoftware-Export");
    $model->fields["churchservice_songwithcategoryasdir"]->setValue(readConf("churchservice_songwithcategoryasdir", "0"));
    return $model;
}
function churchcal_getAdminForm()
{
    global $config;
    $model = new CTModuleForm("churchcal");
    if (!isset($config["churchcal_maincalname"])) {
        $config["churchcal_maincalname"] = "Gemeindekalender";
    }
    $model->addField("churchcal_maincalname", "", "INPUT_REQUIRED", "Name des Hauptkalenders");
    $model->fields["churchcal_maincalname"]->setValue($config["churchcal_maincalname"]);
    if (!isset($config["churchcal_css"])) {
        $config["churchcal_css"] = "";
    }
    $model->addField("churchcal_css", "", "TEXTAREA", "CSS für das Einbetten des Kalenders");
    $model->fields["churchcal_css"]->setValue($config["churchcal_css"]);
    return $model;
}
/**
 *
 * @return CTModuleForm
 */
function churchcal_getAdminForm()
{
    global $config;
    $model = new CTModuleForm("churchcal");
    if (!isset($config["churchcal_maincalname"])) {
        $config["churchcal_maincalname"] = "Gemeindekalender";
    }
    $model->addField("churchcal_maincalname", "", "INPUT_REQUIRED", t('name.of.main.calendar'))->setValue($config["churchcal_maincalname"]);
    if (!isset($config["churchcal_firstdayinweek"])) {
        $config["churchcal_firstdayinweek"] = "1";
    }
    $model->addField("churchcal_firstdayinweek", "", "INPUT_REQUIRED", t('first.day.in.week'))->setValue($config["churchcal_firstdayinweek"]);
    if (!isset($config["churchcal_entries_last_days"])) {
        $config["churchcal_entries_last_days"] = "180";
    }
    $model->addField("churchcal_entries_last_days", "", "INPUT_REQUIRED", t('data.from.x.how.many.days.in.the.past.to.load', getConf("churchcal_name")))->setValue($config["churchcal_entries_last_days"]);
    if (!isset($config["churchcal_css"])) {
        $config["churchcal_css"] = "";
    }
    $model->addField("churchcal_css", "", "TEXTAREA", t('css.for.embedded.cal'))->setValue($config["churchcal_css"]);
    return $model;
}
/**
 * TODO - rethink naming - looks like preferences - AdminModel???
 * 
 * @return CTModuleForm
 */
function churchdb_getAdminForm()
{
    global $config;
    $form = new CTModuleForm("churchdb");
    $form->addField("churchdb_maxexporter", "", "INPUT_REQUIRED", t('max.allowed.rows.to.export'));
    $form->fields["churchdb_maxexporter"]->setValue($config["churchdb_maxexporter"]);
    $form->addField("churchdb_home_lat", "", "INPUT_REQUIRED", t('center.coordinates.latitude.best.to.find.by.google.maps'));
    $form->fields["churchdb_home_lat"]->setValue($config["churchdb_home_lat"]);
    $form->addField("churchdb_home_lng", "", "INPUT_REQUIRED", "Koordination-Mittelpunkt Longitudinal (am besten durch Google Maps herauszufinden)");
    $form->fields["churchdb_home_lng"]->setValue($config["churchdb_home_lng"]);
    $form->addField("churchdb_emailseparator", "", "INPUT_REQUIRED", "Standard-Separator für mehrere Empfänger beim ChurchDB-E-Mailer");
    $form->fields["churchdb_emailseparator"]->setValue($config["churchdb_emailseparator"]);
    $form->addField("churchdb_groupnotchoosable", "", "INPUT_REQUIRED", "Wie lange zurück nach Abschlussdatum die Gruppe noch unter Meine Gruppen präsent sein soll");
    $form->fields["churchdb_groupnotchoosable"]->setValue($config["churchdb_groupnotchoosable"]);
    $form->addField("churchdb_birthdaylist_status", "", "INPUT_REQUIRED", "Kommaseparierte Liste mit Status-Ids für Geburtstagsliste");
    $form->fields["churchdb_birthdaylist_status"]->setValue($config["churchdb_birthdaylist_status"]);
    $form->addField("churchdb_birthdaylist_station", "", "INPUT_REQUIRED", "Kommaseparierte Liste mit Station-Ids für Geburtstagsliste");
    $form->fields["churchdb_birthdaylist_station"]->setValue($config["churchdb_birthdaylist_station"]);
    $form->addField("churchdb_mailchimp_apikey", "", "INPUT_OPTIONAL", 'Wenn die Integration von MailChimp.com genutzt werden soll, bitte hier den API-Key angeben. <a target="_clean" href="http://intern.churchtools.de/?q=help&doc=MailChimp-Integration">Weitere Informationen</a>');
    $form->fields["churchdb_mailchimp_apikey"]->setValue($config["churchdb_mailchimp_apikey"]);
    $form->addField("churchdb_smspromote_apikey", "", "INPUT_OPTIONAL", 'Wenn die Integration von smspromote.de genutzt werden soll, bitte hier den API-Key angeben.  <a target="_clean" href="http://intern.churchtools.de/?q=help&doc=smspromote-Integration">Weitere Informationen</a>');
    $form->fields["churchdb_smspromote_apikey"]->setValue($config["churchdb_smspromote_apikey"]);
    $form->addField("churchdb_sendgroupmails", "", "CHECKBOX", "Sende &Auml;nderungen in Gruppen an Leiter, Co-Leiter und Supervisore");
    $form->fields["churchdb_sendgroupmails"]->setValue($config["churchdb_sendgroupmails"]);
    if (!isset($config["churchdb_changeownaddress"])) {
        $config["churchdb_changeownaddress"] = false;
    }
    $form->addField("churchdb_changeownaddress", "", "CHECKBOX", "Jeder Benutzer darf seine eigenen Stammdaten anpassen");
    $form->fields["churchdb_changeownaddress"]->setValue($config["churchdb_changeownaddress"]);
    return $form;
}
Exemple #8
0
/**
 * TODO - rethink naming - looks like preferences - AdminModel???
 *
 * @return CTModuleForm
 */
function churchdb_getAdminForm()
{
    global $config;
    $form = new CTModuleForm("churchdb");
    $form->addField("churchdb_maxexporter", "", "INPUT_REQUIRED", t('max.allowed.rows.to.export'))->setValue($config["churchdb_maxexporter"]);
    $form->addField("churchdb_home_lat", "", "INPUT_REQUIRED", t('center.coordinates.latitude'))->setValue($config["churchdb_home_lat"]);
    $form->addField("churchdb_home_lng", "", "INPUT_REQUIRED", t('center.coordinates.longitude'))->setValue($config["churchdb_home_lng"]);
    $form->addField("churchdb_emailseparator", "", "INPUT_REQUIRED", t('email.default.separator'))->setValue($config["churchdb_emailseparator"]);
    $form->addField("churchdb_groupnotchoosable", "", "INPUT_REQUIRED", t('days.to.show.terminated.groups'))->setValue($config["churchdb_groupnotchoosable"]);
    $form->addField("churchdb_birthdaylist_status", "", "INPUT_REQUIRED", t('xxx.ids.for.birthdaylist.comma.separated', t('status')))->setValue($config["churchdb_birthdaylist_status"]);
    $form->addField("churchdb_birthdaylist_station", "", "INPUT_REQUIRED", t('xxx.ids.for.birthdaylist.comma.separated', t('station')))->setValue($config["churchdb_birthdaylist_station"]);
    $form->addField("churchdb_mailchimp_apikey", "", "INPUT_OPTIONAL", t('api.key.mailchimp.if.used') . ' <a target="_clean" href="http://intern.churchtools.de/?q=help&doc=MailChimp-Integration">' . t('more.information') . '</a>')->setValue($config["churchdb_mailchimp_apikey"]);
    $form->addField("churchdb_smspromote_apikey", "", "INPUT_OPTIONAL", t('api.key.smspromote.if.used') . ' <a target="_clean" href="http://intern.churchtools.de/?q=help&doc=smspromote-Integration">' . t('more.information') . '</a>')->setValue($config["churchdb_smspromote_apikey"]);
    $form->addField("churchdb_sendgroupmails", "", "CHECKBOX", t('send.groupchanges.to.leaders'))->setValue($config["churchdb_sendgroupmails"]);
    if (!isset($config["churchdb_changeownaddress"])) {
        $config["churchdb_changeownaddress"] = false;
    }
    $form->addField("churchdb_changeownaddress", "", "CHECKBOX", t('user.is.allowed.to.change.own.address'))->setValue($config["churchdb_changeownaddress"]);
    $form->addField("churchdb_archivedeletehistory", "", "CHECKBOX", t('delete.history.when.moving.to.archive'))->setValue(getVar("churchdb_archivedeletehistory", false, $config));
    return $form;
}