add translation text in select boxes (fixes bug #87)

if select box is managed by chosen and no match could be found
This commit is contained in:
Uwe Steinmann 2013-09-09 07:16:18 +02:00
parent 9f6cb6453c
commit 91a4c65b6c
6 changed files with 15 additions and 15 deletions

View File

@ -126,7 +126,7 @@ function addFiles()
<tr>
<td><?php printMLText("categories")?>:</td>
<td>
<select class="chzn-select" name="categories[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>">
<select class="chzn-select" name="categories[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>" data-no_results_text="<?php printMLText('unknown_document_category'); ?>">
<?php
$categories = $dms->getDocumentCategories();
foreach($categories as $category) {

View File

@ -106,7 +106,7 @@ function checkForm()
<tr>
<td><?php printMLText("categories")?>:</td>
<td>
<select class="chzn-select" name="categories[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>">
<select class="chzn-select" name="categories[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>" data-no_results_text="<?php printMLText('unknown_document_category'); ?>">
<?php
$categories = $dms->getDocumentCategories();
foreach($categories as $category) {

View File

@ -139,7 +139,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
<tr>
<td><?php printMLText("category");?>:<br />(<?php printMLText('documents_only'); ?>)</td>
<td>
<select class="chzn-select" name="categoryids[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>">
<select class="chzn-select" name="categoryids[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>" data-no_results_text="<?php printMLText('unknown_document_category'); ?>">
<!--
<option value="-1"><?php printMLText("all_categories");?>
-->
@ -172,7 +172,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
<tr>
<td><?php printMLText("owner");?>:</td>
<td>
<select class="chzn-select-deselect" name="ownerid">
<select class="chzn-select-deselect" name="ownerid" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
<option value="-1"></option>
<?php
foreach ($allUsers as $userObj) {
@ -271,7 +271,7 @@ class SeedDMS_View_Search extends SeedDMS_Bootstrap_Style {
<tr>
<td><?php printMLText("category_filter");?>:</td>
<td>
<select class="chzn-select" name="categoryids[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>">
<select class="chzn-select" name="categoryids[]" multiple="multiple" data-placeholder="<?php printMLText('select_category'); ?>" data-no_results_text="<?php printMLText('unknown_document_category'); ?>">
<!--
<option value="-1"><?php printMLText("all_categories");?>
-->

View File

@ -85,7 +85,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
<?php $this->contentSubHeading(getMLText("update_reviewers"));?>
<div class="cbSelectTitle"><?php printMLText("individuals")?>:</div>
<select class="chzn-select span9" name="indReviewers[]" multiple="multiple">
<select class="chzn-select span9" name="indReviewers[]" multiple="multiple" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
<?php
$res=$user->getMandatoryReviewers();
@ -120,7 +120,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
</select>
<div class="cbSelectTitle"><?php printMLText("groups")?>:</div>
<select class="chzn-select span9" name="grpReviewers[]" multiple="multiple">
<select class="chzn-select span9" name="grpReviewers[]" multiple="multiple" data-no_results_text="<?php printMLText('unknown_group'); ?>">
<?php
foreach ($docAccess["groups"] as $group) {
@ -155,7 +155,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
<?php $this->contentSubHeading(getMLText("update_approvers"));?>
<div class="cbSelectTitle cbSelectMargin"><?php printMLText("individuals")?>:</div>
<select class="chzn-select span9" name="indApprovers[]" multiple="multiple">
<select class="chzn-select span9" name="indApprovers[]" multiple="multiple" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
<?php
$res=$user->getMandatoryApprovers();
@ -193,7 +193,7 @@ class SeedDMS_View_SetReviewersApprovers extends SeedDMS_Bootstrap_Style {
</select>
<div class="cbSelectTitle"><?php printMLText("groups")?>:</div>
<select class="chzn-select span9" name="grpApprovers[]" multiple="multiple">
<select class="chzn-select span9" name="grpApprovers[]" multiple="multiple" data-no_results_text="<?php printMLText('unknown_group'); ?>">
<?php
foreach ($docAccess["groups"] as $group) {

View File

@ -185,7 +185,7 @@ function checkForm()
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
</td>
<td>
<select class="chzn-select span9" name="indReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_reviewers'); ?>">
<select class="chzn-select span9" name="indReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_reviewers'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
<?php
$res=$user->getMandatoryReviewers();
foreach ($docAccess["users"] as $usr) {
@ -205,7 +205,7 @@ function checkForm()
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
</td>
<td>
<select class="chzn-select span9" name="grpReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_reviewers'); ?>">
<select class="chzn-select span9" name="grpReviewers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_reviewers'); ?>" data-no_results_text="<?php printMLText('unknown_group'); ?>">
<?php
foreach ($docAccess["groups"] as $grp) {
@ -228,7 +228,7 @@ function checkForm()
<div class="cbSelectTitle"><?php printMLText("individuals");?>:</div>
</td>
<td>
<select class="chzn-select span9" name="indApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_approvers'); ?>">
<select class="chzn-select span9" name="indApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_ind_approvers'); ?>" data-no_results_text="<?php printMLText('unknown_owner'); ?>">
<?php
$res=$user->getMandatoryApprovers();
foreach ($docAccess["users"] as $usr) {
@ -248,7 +248,7 @@ function checkForm()
<div class="cbSelectTitle"><?php printMLText("groups");?>:</div>
</td>
<td>
<select class="chzn-select span9" name="grpApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_approvers'); ?>">
<select class="chzn-select span9" name="grpApprovers[]" multiple="multiple" data-placeholder="<?php printMLText('select_grp_approvers'); ?>" data-no_results_text="<?php printMLText('unknown_group'); ?>">
<?php
foreach ($docAccess["groups"] as $grp) {

View File

@ -306,14 +306,14 @@ function showWorkflow(selectObj) {
echo "</select>";
echo "</td>";
echo "<td>";
echo "<select class=\"chzn-select\" name=\"users[]\" multiple=\"multiple\" data-placeholder=\"".getMLText('select_users')."\">";
echo "<select class=\"chzn-select\" name=\"users[]\" multiple=\"multiple\" data-placeholder=\"".getMLText('select_users')."\" data-no_results_text=\"".getMLText('unknown_user')."\">";
$allusers = $dms->getAllUsers();
foreach($allusers as $usr) {
print "<option value=\"".$usr->getID()."\">". htmlspecialchars($usr->getLogin()." - ".$usr->getFullName())."</option>";
}
echo "</select>";
echo "<br />";
echo "<select class=\"chzn-select\" name=\"groups[]\" multiple=\"multiple\" data-placeholder=\"".getMLText('select_groups')."\">";
echo "<select class=\"chzn-select\" name=\"groups[]\" multiple=\"multiple\" data-placeholder=\"".getMLText('select_groups')."\" data-no_results_text=\"".getMLText('unknown_group')."\">";
$allgroups = $dms->getAllGroups();
foreach($allgroups as $grp) {
print "<option value=\"".$grp->getID()."\">". htmlspecialchars($grp->getName())."</option>";