FAS UDF tab

This commit is contained in:
Paolo
2017-07-18 12:48:47 +02:00
parent de2c9703de
commit b9c846f18f
6 changed files with 202 additions and 66 deletions
+101 -20
View File
@@ -1,28 +1,109 @@
<?php $this->load->view("templates/header", array("title" => "UDF")); ?>
<body>
<body style="background-color: #eff0f1;">
<form action="/core/index.ci.php/api/v1/system/UDF/UDF" method="POST">
<?php
if ($result != null)
{
if (isSuccess($result))
{
?>
<div style="color: black;">
Saved!
</div>
<div>
<?php
echo $this->widgetlib->UDFWidget(
array(
UDFWidgetTpl::SCHEMA_ARG_NAME => 'public',
UDFWidgetTpl::TABLE_ARG_NAME => 'tbl_person',
UDFWidgetTpl::UDFS_ARG_NAME => $udfs
)
);
?>
</div>
<br>
<?php
}
else
{
?>
<div style="color: red;">
Error while saving!
</div>
<br>
<div style="color: red;">
<?php
$errors = $result->retval;
foreach($errors as $error)
{
foreach($error as $fieldError)
{
echo $fieldError->msg . ' -> ' . $fieldError->retval . '<br>';
}
}
?>
</div>
<br>
<br>
<br>
<?php
}
}
?>
<form action="/core/index.ci.php/system/UDF/saveUDF" method="POST">
<table>
<tr>
<td>
Person
</td>
<td width="30px">
&nbsp;
</td>
<td>
Prestudent
</td>
</tr>
<tr>
<td colspan="3">
&nbsp;
</td>
</tr>
<tr>
<td>
<?php
echo $this->widgetlib->UDFWidget(
array(
UDFWidgetTpl::SCHEMA_ARG_NAME => 'public',
UDFWidgetTpl::TABLE_ARG_NAME => 'tbl_person',
UDFWidgetTpl::UDFS_ARG_NAME => $personUdfs
)
);
?>
</td>
<td width="30px">
&nbsp;
</td>
<td>
<?php
echo $this->widgetlib->UDFWidget(
array(
UDFWidgetTpl::SCHEMA_ARG_NAME => 'public',
UDFWidgetTpl::TABLE_ARG_NAME => 'tbl_prestudent',
UDFWidgetTpl::UDFS_ARG_NAME => $prestudentUdfs
)
);
?>
</td>
</tr>
<tr>
<td colspan="3">
&nbsp;
</td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="submit" value="Save">
</td>
</tr>
</table>
<div>
<input type="submit" value="Save">
</div>
<input type="hidden" name="person_id" value="<?php echo $udfs['person_id']; ?>">
<input type="hidden" name="caller" value="<?php echo $udfs['caller']; ?>">
<!-- <input type="hidden" name="prestudent_id" value="<?php echo $udfs['prestudent_id']; ?>"> -->
<input type="hidden" name="person_id" value="<?php echo $personUdfs['person_id']; ?>">
<input type="hidden" name="prestudent_id" value="<?php echo $prestudentUdfs['prestudent_id']; ?>">
</form>
</body>