sort field list

This commit is contained in:
Roland Gruber 2008-04-28 18:01:15 +00:00
parent af38b4989b
commit ff7163ac71
1 changed files with 4 additions and 1 deletions

View File

@ -164,7 +164,7 @@ elseif(isset($_GET['add_new_field'])) {
elseif(isset($_GET['change'])) {
$alter = explode('_',$_GET['change']);
$newvalue = $_GET['section_' . $alter[0]];
if($alter[1] == 'item') {
if (isset($alter[1]) && ($alter[1] == 'item')) {
$newvalue = '_' . $newvalue;
}
$_SESSION['currentPDFStructure'][$alter[0]]['attributes']['NAME'] = $newvalue;
@ -638,6 +638,9 @@ foreach($_SESSION['currentPDFStructure'] as $key => $entry) {
<select name="new_field">
<?php
foreach($_SESSION['availablePDFFields'] as $module => $fields) {
if (isset($fields) && is_array($fields)) {
sort($fields);
}
if ($module != 'main') {
$title = getModuleAlias($module, $_GET['type']);
}