sort available types
This commit is contained in:
parent
cc4db6d9c7
commit
bbe9f616bd
|
@ -69,16 +69,21 @@ if(isset($_POST['createNewTemplate'])) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$scopes = $_SESSION['config']->get_ActiveTypes();
|
$scopes = $_SESSION['config']->get_ActiveTypes();
|
||||||
|
$sortedScopes = array();
|
||||||
|
for ($i = 0; $i < sizeof($scopes); $i++) {
|
||||||
|
$sortedScopes[$scopes[$i]] = getTypeAlias($scopes[$i]);
|
||||||
|
}
|
||||||
|
natcasesort($sortedScopes);
|
||||||
|
|
||||||
// get list of account types
|
// get list of account types
|
||||||
$availableScopes = '';
|
$availableScopes = '';
|
||||||
$templateClasses = array();
|
$templateClasses = array();
|
||||||
for ($i = 0; $i < sizeof($scopes); $i++) {
|
foreach ($sortedScopes as $scope => $title) {
|
||||||
$templateClasses[] = array(
|
$templateClasses[] = array(
|
||||||
'scope' => $scopes[$i],
|
'scope' => $scope,
|
||||||
'title' => getTypeAlias($scopes[$i]),
|
'title' => $title,
|
||||||
'templates' => "");
|
'templates' => "");
|
||||||
$availableScopes .= '<option value="' . $scopes[$i] . '">' . getTypeAlias($scopes[$i]) . "</option>\n";
|
$availableScopes .= '<option value="' . $scope . '">' . $title . "</option>\n";
|
||||||
}
|
}
|
||||||
// get list of templates for each account type
|
// get list of templates for each account type
|
||||||
for ($i = 0; $i < sizeof($templateClasses); $i++) {
|
for ($i = 0; $i < sizeof($templateClasses); $i++) {
|
||||||
|
|
Loading…
Reference in New Issue