Browse Source

Fix title and paragraph formating

pull/199/merge
Timothée Jaussoin 10 years ago
parent
commit
98d260848e
  1. 31
      lib/XMPPtoForm.php

31
lib/XMPPtoForm.php

@ -110,29 +110,13 @@ class XMPPtoForm{
$div->appendChild($label);
}
private function outTitle($s){
$ul = $this->html->createElement('ul');
$ul->setAttribute('class', 'list thin');
$this->html->appendChild($ul);
$li = $this->html->createElement('li');
$title = $this->html->createElement('p', $s);
$title->setAttribute('class', 'normal line');
$li->appendChild($title);
$ul->appendChild($li);
$title = $this->html->createElement('h3', $s);
$this->html->appendChild($title);
}
private function outP($s){
$ul = $this->html->createElement('ul');
$ul->setAttribute('class', 'list thin');
$this->html->appendChild($ul);
$li = $this->html->createElement('li');
$ul->appendChild($li);
$title = $this->html->createElement('p', $s);
$title->setAttribute('class', 'normal line');
$li->appendChild($title);
$this->html->appendChild($title);
}
private function outUrl($s) {
@ -215,7 +199,7 @@ class XMPPtoForm{
$container->appendChild($label);
}
private function outInput($s, $type, $multiple){
private function outInput($s, $type = false, $multiple){
$container = $this->html->createElement('div');
$this->html->appendChild($container);
@ -224,7 +208,12 @@ class XMPPtoForm{
$input->setAttribute('name', $s['var']);
$input->setAttribute('type', $type);
$input->setAttribute('title', $s->desc);
$input->setAttribute('type', $s['type']);
if($type) {
$input->setAttribute('type', $type);
} else {
$input->setAttribute('type', $s['type']);
}
$input->setAttribute('label', $s['label']);
if($s->required)

Loading…
Cancel
Save