forked from pollen8/fabrik
/
default.php
99 lines (94 loc) · 2.88 KB
/
default.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<?php
/**
* F3 Form Template
*
* @package Joomla
* @subpackage Fabrik
* @copyright Copyright (C) 2005 Fabrik. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* @since 3.0
*/
?>
<?php if ($this->params->get('show_page_title', 1)) { ?>
<div class="componentheading<?php echo $this->params->get('pageclass_sfx')?>"><?php echo $this->escape($this->params->get('page_title')); ?></div>
<?php } ?>
<?php $form = $this->form;
//echo $form->startTag;
if ($this->params->get('show-title', 1)) {?>
<h1><?php echo JRequest::getVar('rowid', 0) == '0' ? 'Add ' : 'Edit ';
echo $form->label;?></h1>
<?php }
echo $form->intro;
echo $form->startTag;
echo $this->plugintop;
$active = ($form->error != '') ? '' : ' fabrikHide';
echo "<div class=\"fabrikMainError fabrikError$active\">";
echo FabrikHelperHTML::image('alert.png', 'form', 'f3');
echo "$form->error</div>";?>
<?php
if ($this->showEmail) {
echo $this->emailLink;
}
if ($this->showPDF) {
echo $this->pdfLink;
}
if ($this->showPrint) {
echo $this->printLink;
}
echo $this->loadTemplate('relateddata');
foreach ($this->groups as $group) {
?>
<fieldset class="fabrikGroup" id="group<?php echo $group->id;?>" style="<?php echo $group->css;?>">
<?php if (trim($group->title) !== '') {?>
<legend><?php echo $group->title;?></legend>
<?php }?>
<?php if ($group->intro !== '') {?>
<div class="groupintro"><?php echo $group->intro ?></div>
<?php }?>
<?php if ($group->canRepeat) {
foreach ($group->subgroups as $subgroup) {
?>
<div class="fabrikSubGroup">
<div class="fabrikSubGroupElements">
<?php
$this->elements = $subgroup;
echo $this->loadTemplate('group');
?>
</div>
<?php if ($group->editable) { ?>
<div class="fabrikGroupRepeater">
<?php if ($group->canAddRepeat) {?>
<a class="addGroup" href="#">
<?php echo FabrikHelperHTML::image('add.png', 'form', $this->tmpl, JText::_('COM_FABRIK_ADD_GROUP'));?>
</a>
<?php }?>
<?php if ($group->canDeleteRepeat) {?>
<a class="deleteGroup" href="#">
<?php echo FabrikHelperHTML::image('del.png', 'form', $this->tmpl, JText::_('COM_FABRIK_DELETE_GROUP'));?>
</a>
<?php }?>
</div>
<?php } ?>
</div>
<?php
}
} else {
$this->elements = $group->elements;
echo $this->loadTemplate('group');
}?>
</fieldset>
<?php
}
echo $this->hiddenFields;
?>
<?php echo $this->pluginbottom; ?>
<div class="fabrikActions"><?php echo $form->resetButton;?> <?php echo $form->submitButton;?>
<?php echo $form->prevButton?> <?php echo $form->nextButton?>
<?php echo $form->applyButton;?>
<?php echo $form->copyButton . " " . $form->gobackButton . ' ' . $form->deleteButton . ' ' . $this->message ?>
</div>
<?php
echo $form->endTag;
echo $form->outro;
echo $this->pluginend;
echo FabrikHelperHTML::keepalive();?>