mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 12:20:44 +02:00
Plugin Builder: improved handling of decimal fields. Added a 'readonly' checkbox to table field options.
This commit is contained in:
@@ -4573,6 +4573,7 @@ TEMPLATE;
|
|||||||
|
|
||||||
function form($table,$fieldArray)
|
function form($table,$fieldArray)
|
||||||
{
|
{
|
||||||
|
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
|
|
||||||
$modes = array(
|
$modes = array(
|
||||||
@@ -4632,8 +4633,10 @@ TEMPLATE;
|
|||||||
<th class='center'>".EPL_ADLAN_169."</th>
|
<th class='center'>".EPL_ADLAN_169."</th>
|
||||||
<th class='center'>".EPL_ADLAN_170."</th>
|
<th class='center'>".EPL_ADLAN_170."</th>
|
||||||
<th class='center'>".EPL_ADLAN_171."</th>
|
<th class='center'>".EPL_ADLAN_171."</th>
|
||||||
<th class='center e-tip' title='".EPL_ADLAN_177."'>".EPL_ADLAN_172."</th>
|
<th class='center' title='".EPL_ADLAN_177."'>".EPL_ADLAN_172."</th>
|
||||||
<th class='center e-tip' title='".EPL_ADLAN_178."'>".EPL_ADLAN_173."</th>
|
<th class='center' title='".EPL_ADLAN_178."'>".EPL_ADLAN_173."</th>
|
||||||
|
<th class='center' title='".EPL_ADLAN_257."'>R/O</th>
|
||||||
|
|
||||||
<th>".EPL_ADLAN_174."</th>
|
<th>".EPL_ADLAN_174."</th>
|
||||||
<th>".EPL_ADLAN_175."</th>
|
<th>".EPL_ADLAN_175."</th>
|
||||||
<th>".EPL_ADLAN_176."</th>
|
<th>".EPL_ADLAN_176."</th>
|
||||||
@@ -4657,6 +4660,7 @@ TEMPLATE;
|
|||||||
<td class='center'>".$frm->checkbox($this->table."[fields][".$name."][inline]", true, $this->guess($name, $val,'inline'))."</td>
|
<td class='center'>".$frm->checkbox($this->table."[fields][".$name."][inline]", true, $this->guess($name, $val,'inline'))."</td>
|
||||||
<td class='center'>".$frm->checkbox($this->table."[fields][".$name."][validate]", true)."</td>
|
<td class='center'>".$frm->checkbox($this->table."[fields][".$name."][validate]", true)."</td>
|
||||||
<td class='center'>".$frm->checkbox($this->table."[fields][".$name."][fieldpref]", true, $this->guess($name, $val,'fieldpref'))."</td>
|
<td class='center'>".$frm->checkbox($this->table."[fields][".$name."][fieldpref]", true, $this->guess($name, $val,'fieldpref'))."</td>
|
||||||
|
<td class='center'>".$frm->checkbox($this->table."[fields][".$name."][readonly]", true)."</td>
|
||||||
<td>".$frm->text($this->table."[fields][".$name."][help]",'', 50,'size=medium')."</td>
|
<td>".$frm->text($this->table."[fields][".$name."][help]",'', 50,'size=medium')."</td>
|
||||||
<td>".$frm->text($this->table."[fields][".$name."][readParms]",'', 60,'size=small')."</td>
|
<td>".$frm->text($this->table."[fields][".$name."][readParms]",'', 60,'size=small')."</td>
|
||||||
<td>".$frm->text($this->table."[fields][".$name."][writeParms]",'', 60,'size=small').
|
<td>".$frm->text($this->table."[fields][".$name."][writeParms]",'', 60,'size=small').
|
||||||
@@ -4739,8 +4743,9 @@ TEMPLATE;
|
|||||||
case 'decimal':
|
case 'decimal':
|
||||||
case 'double':
|
case 'double':
|
||||||
case 'float':
|
case 'float':
|
||||||
|
|
||||||
$array = array(
|
$array = array(
|
||||||
"number" => EPL_ADLAN_189,
|
"number" => EPL_ADLAN_182,
|
||||||
"dropdown" => EPL_ADLAN_190,
|
"dropdown" => EPL_ADLAN_190,
|
||||||
"method" => EPL_ADLAN_191,
|
"method" => EPL_ADLAN_191,
|
||||||
"hidden" => EPL_ADLAN_192,
|
"hidden" => EPL_ADLAN_192,
|
||||||
@@ -5037,6 +5042,10 @@ TEMPLATE;
|
|||||||
{
|
{
|
||||||
$value = 'safestr';
|
$value = 'safestr';
|
||||||
}
|
}
|
||||||
|
elseif($type === 'decimal' || $type === 'float')
|
||||||
|
{
|
||||||
|
$value = 'float';
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$value = 'int';
|
$value = 'int';
|
||||||
@@ -5611,6 +5620,7 @@ $text .= "
|
|||||||
"'filter' => '0'",
|
"'filter' => '0'",
|
||||||
"'inline' => '1'",
|
"'inline' => '1'",
|
||||||
"'validate' => '1'",
|
"'validate' => '1'",
|
||||||
|
"'readonly' => '1'",
|
||||||
// ", 'fieldpref' => '1'",
|
// ", 'fieldpref' => '1'",
|
||||||
"'type' => ''",
|
"'type' => ''",
|
||||||
"'data' => ''",
|
"'data' => ''",
|
||||||
@@ -5629,6 +5639,7 @@ $text .= "
|
|||||||
"'filter' => false",
|
"'filter' => false",
|
||||||
"'inline' => true",
|
"'inline' => true",
|
||||||
"'validate' => true",
|
"'validate' => true",
|
||||||
|
"'readonly' => true",
|
||||||
// "",
|
// "",
|
||||||
"'type' => null",
|
"'type' => null",
|
||||||
"'data' => null",
|
"'data' => null",
|
||||||
|
@@ -311,4 +311,6 @@ define("EPL_ADLAN_254", "This will check your plugin's language files for errors
|
|||||||
define("EPL_ADLAN_255", "Overwrite Files");
|
define("EPL_ADLAN_255", "Overwrite Files");
|
||||||
define("EPL_ADLAN_256", "Skipped [x] (already exists)");
|
define("EPL_ADLAN_256", "Skipped [x] (already exists)");
|
||||||
|
|
||||||
|
define ("EPL_ADLAN_257","Readonly");
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user