From 2775fedc79161384754644a725dfc5ac3963ee2e Mon Sep 17 00:00:00 2001 From: Carsten Schmitz Date: Tue, 21 Aug 2012 12:47:10 +0200 Subject: [PATCH] Fixed issue: Several problems when editing a quota --- application/controllers/admin/quotas.php | 15 ++++- .../views/admin/quotas/editquota_view.php | 62 ++++++------------- .../views/admin/quotas/editquotalang_view.php | 33 ++-------- 3 files changed, 35 insertions(+), 75 deletions(-) diff --git a/application/controllers/admin/quotas.php b/application/controllers/admin/quotas.php index a92e79380b7..125e34f120d 100644 --- a/application/controllers/admin/quotas.php +++ b/application/controllers/admin/quotas.php @@ -332,13 +332,22 @@ function editquota($iSurveyId) $aData['quotainfo'] = $aQuotaInfo; $aViewUrls[] = 'editquota_view'; + - foreach ($aLangs as $sLang) + $first=true; + foreach ($aLangs as $sLanguage) { - $aData['langquotainfo'] = Quota_languagesettings::model()->findByAttributes(array('quotals_quota_id' => Yii::app()->request->getPost('quota_id'), 'quotals_language' => $sLang)); - $aData['lang'] = $sLang; + $aTabTitles[$sLanguage] = getLanguageNameFromCode($sLanguage, false); + if ($first) + { + $aTabTitles[$sLanguage].= ' (' . $clang->gT("Base language") . ')'; + $first = false; + } + $aData['langquotainfo'] = Quota_languagesettings::model()->findByAttributes(array('quotals_quota_id' => Yii::app()->request->getPost('quota_id'), 'quotals_language' => $sLanguage)); + $aData['lang'] = $sLanguage; $aViewUrls['editquotalang_view'][] = $aData; } + $aData['aTabTitles']=$aTabTitles; $aViewUrls[] = 'editquotafooter_view'; diff --git a/application/views/admin/quotas/editquota_view.php b/application/views/admin/quotas/editquota_view.php index 2890c8fa118..4cd46a9e01e 100644 --- a/application/views/admin/quotas/editquota_view.php +++ b/application/views/admin/quotas/editquota_view.php @@ -1,44 +1,18 @@ -
" method="post"> -
- - - - -
- - - - - - - - - - - - - - - - - - - - - - -
eT("Edit quota");?>
-

eT("Quota name");?>:

-
-

eT("Quota limit");?>:

-
-

eT("Quota action");?>:

-
-

eT("Autoload URL");?>:

-
/>
-
-
-
\ No newline at end of file +
eT("Edit quota");?>
+" method="post"> +
    +
  • +
  • +
  • +
  • />
  • +
+
+
    + $sTitle){?> +
  • +
\ No newline at end of file diff --git a/application/views/admin/quotas/editquotalang_view.php b/application/views/admin/quotas/editquotalang_view.php index 119217c8d8c..baabe7e45fe 100644 --- a/application/views/admin/quotas/editquotalang_view.php +++ b/application/views/admin/quotas/editquotalang_view.php @@ -1,30 +1,7 @@
- - - - -
- - - - - - - - - - - - - - - -
-

eT("Quota message");?>:

-
-

eT("URL");?>:

-
-

eT("URL description");?>:

-
-
+
    +
  • +
  • +
  • +
\ No newline at end of file