/** * builds the form for adding new facts * * @param string $fact the new fact we are adding */ public static function createAddForm($fact) { global $tags, $WT_TREE; $tags = array(); // handle MARRiage TYPE if (substr($fact, 0, 5) === 'MARR_') { $tags[0] = 'MARR'; self::addSimpleTag('1 MARR'); self::insertMissingSubtags($fact); } else { $tags[0] = $fact; if ($fact === '_UID') { $fact .= ' ' . GedcomTag::createUid(); } // These new level 1 tags need to be turned into links if (in_array($fact, array('ALIA', 'ASSO'))) { $fact .= ' @'; } if (in_array($fact, Config::emptyFacts())) { self::addSimpleTag('1 ' . $fact . ' Y'); } else { self::addSimpleTag('1 ' . $fact); } self::insertMissingSubtags($tags[0]); //-- handle the special SOURce case for level 1 sources [ 1759246 ] if ($fact === 'SOUR') { self::addSimpleTag('2 PAGE'); self::addSimpleTag('3 TEXT'); if ($WT_TREE->getPreference('FULL_SOURCES')) { self::addSimpleTag('3 DATE', '', GedcomTag::getLabel('DATA:DATE')); self::addSimpleTag('2 QUAY'); } } } }