diff --git a/com_connect.php b/com_connect.php
index 59c4916..63ece49 100644
--- a/com_connect.php
+++ b/com_connect.php
@@ -329,6 +329,8 @@ function com_connect($atts, $thing = '')
'thanks_form' => ''
), $atts));
+ $doctype = get_pref('doctype', 'xhtml');
+
if (!empty($lang)) {
$strings = com_connect_load_lang($lang);
$current = Txp::get('\Textpattern\L10n\Lang')->getStrings();
@@ -430,12 +432,13 @@ function com_connect($atts, $thing = '')
$form = ($form) ? fetch_form($form) : $thing;
if (empty($form)) {
+ $br = ($doctype === 'xhtml') ? '
' : '
';
$form = '
-
-
'.
-($send_article ? '
' : '').
-'
-
+'.$br.
+''.$br.
+($send_article ? ''.$br : '').
+''.$br.
+'
';
}
@@ -618,8 +621,8 @@ function com_connect($atts, $thing = '')
($label ? n . '
') : '') .
@@ -841,7 +844,7 @@ function com_connect_text($atts)
$labelStr = ($label) ? '' : '';
return ($labelStr && $label_position === 'before' ? $labelStr . $break : '') .
- '' .
+ '' : '>') .
($labelStr && $label_position === 'after' ? $break . $labelStr : '');
}
@@ -1317,7 +1320,7 @@ function com_connect_checkbox($atts)
return ($labelStr && $label_position === 'before' ? $labelStr . $break : '') .
'' .
+ ($theValue ? ' checked' . (($doctype === 'xhtml') ? '="checked"' : '') : '') . ($attr ? ' ' . implode(' ', $attr) : '') . (($doctype === 'xhtml') ? ' />' : '>') .
($labelStr && $label_position === 'after' ? $break . $labelStr : '');
}
@@ -1439,7 +1442,7 @@ function com_connect_radio($atts)
return ($labelStr && $label_position === 'before' ? $labelStr . $break : '') .
'' : ' />') .
+ ( $is_checked ? ' checked' . (($doctype === 'xhtml') ? '="checked"' : '') : '') . (($doctype === 'xhtml') ? ' />' : '>') .
($labelStr && $label_position === 'after' ? $break . $labelStr : '');
}
@@ -1541,7 +1544,7 @@ function com_connect_submit($atts, $thing = '')
if ($thing) {
return '';
} else {
- return '';
+ return '' : '>');
}
}
@@ -1677,7 +1680,7 @@ function com_connect_lAtts($pairs, $atts)
}
if (isset($atts['break']) && $atts['break'] === 'br') {
- $atts['break'] = '
';
+ $atts['break'] = ($doctype === 'xhtml') ? '
' : '
';
}
$com_connect_globals = array(