Revision: 2539
https://sourceforge.net/p/mrbs/code/2539/
Author: cimorrison
Date: 2012-10-29 15:44:45 +0000 (Mon, 29 Oct 2012)
Log Message:
-----------
Extended support of $datalist_options to the same fields as $select_options
Modified Paths:
--------------
mrbs/trunk/web/edit_entry.php
mrbs/trunk/web/edit_users.php
mrbs/trunk/web/functions.inc
mrbs/trunk/web/report.php
mrbs/trunk/web/systemdefaults.inc.php
Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php 2012-10-29 12:07:23 UTC (rev 2538)
+++ mrbs/trunk/web/edit_entry.php 2012-10-29 15:44:45 UTC (rev 2539)
@@ -179,41 +179,30 @@
function create_field_entry_name($disabled=FALSE)
{
- global $name, $select_options, $datalist_options, $maxlength,
$is_mandatory_field;
+ global $name, $maxlength, $is_mandatory_field;
echo "<div id=\"div_name\">\n";
- $params = array('label' => get_vocab("namebooker") . ":",
- 'name' => 'name',
- 'value' => $name,
- 'disabled' => $disabled,
- 'mandatory' => TRUE);
+ // 'mandatory' is there to prevent null input (pattern doesn't seem to be
triggered until
+ // there is something there).
+ $params = array('label' => get_vocab("namebooker") . ":",
+ 'name' => 'name',
+ 'field' => 'entry.name',
+ 'value' => $name,
+ 'disabled' => $disabled,
+ 'mandatory' => TRUE,
+ 'maxlength' => $maxlength['entry.name'],
+ 'attributes' => 'type="text" pattern="' . REGEX_TEXT_POS .
'"');
- if (!empty($select_options['entry.name']))
- {
- $params['options'] = $select_options['entry.name'];
- generate_select($params);
- }
- elseif (!empty($datalist_options['entry.name']))
- {
- $params['options'] = $datalist_options['entry.name'];
- generate_datalist($params);
- }
- else
- {
- // 'mandatory' is there to prevent null input (pattern doesn't seem to be
triggered until
- // there is something there).
- $params['maxlength'] = $maxlength['entry.name'];
- $params['attributes'] = 'type="text" pattern="' . REGEX_TEXT_POS . '"';
- generate_input($params);
- }
+ generate_input($params);
+
echo "</div>\n";
}
function create_field_entry_description($disabled=FALSE)
{
- global $description, $select_options, $is_mandatory_field;
+ global $description, $select_options, $datalist_options, $is_mandatory_field;
echo "<div id=\"div_description\">\n";
@@ -223,10 +212,11 @@
'disabled' => $disabled,
'mandatory' =>
isset($is_mandatory_field['entry.description']) &&
$is_mandatory_field['entry.description']);
- if (!empty($select_options['entry.description']))
+ if (isset($select_options['entry.description']) ||
+ isset($datalist_options['entry.description']) )
{
- $params['options'] = $select_options['entry.description'];
- generate_select($params);
+ $params['field'] = 'entry.description';
+ generate_input($params);
}
else
{
@@ -615,7 +605,7 @@
function create_field_entry_custom_field($field, $key, $disabled=FALSE)
{
- global $custom_fields, $tbl_entry, $select_options;
+ global $custom_fields, $tbl_entry;
global $is_mandatory_field, $text_input_max;
echo "<div>\n";
@@ -631,12 +621,6 @@ ry_field,
$text_input_max; ions; $disabled=FALSE) tion']) &&
$is_mandatory_field['entry.description']); ��� ����� u
K`^+ �*L`^+ %l`^+ �ha^+ ����� �0�a^+ ����� `���� k
K`^+ 6
� �! �! 0���� ����� x�ga^+ ����� �K`^+ �
K`^+ 0���� `K`^+ o���� ���a^+ u
K`^+ ��a^+ ���a^+ ���a^+ �*L`^+ x�ga^+ ����� `���� k
K`^+ �! �! 0���� ����� H�Ga^+ p���� �K`^+ �
K`^+ 0���� `K`^+ o���� `���� X���� 8+l`^+ �p� ����� u
K`^+ �*L`^+ p���� @���� k
K`^+ G H I J K M N O P 0���� ����� HUa^+ ���� �K`^+ �
K`^+ 0���� 0��a^+ u
K`^+ �ga^+ ���`^+ ��a^+ ���a^+ ���a^+ �*L`^+ HUa^+ ���� P���� k
K`^+ 8Ua^+ ���� ����� k
K`^+ (Ua^+ ���� ����� k
K`^+ Ua^+ ���� ����� k K`^+ ���a^+ u
K`^+ ���a^+ `���� ���`^+ e
K`^+ ���a^+ ����� y��`^+ e
K`^+ ��a^+ ����� Z��`^+ e
K`^+ �`^+ �ga^+ ���`^+ ��a^+ ��ga^+ ���a^+ ���a^+ �*L`^+ 8+l`^+ M�`^+ ����� p�`^+ `���� 0���� k
K`^+ 5 6 7 8 : <