msgtplui - Edit - Display "Locale" in pretty format
authorTim Otten <totten@civicrm.org>
Sat, 19 Jun 2021 05:25:06 +0000 (22:25 -0700)
committerCiviCRM <info@civicrm.org>
Fri, 24 Sep 2021 04:04:29 +0000 (21:04 -0700)
ext/msgtplui/ang/msgtplui/Edit.html
ext/msgtplui/ang/msgtplui/Edit.js

index 32c7ff00930aa60134e46e08ffd185da5426cca5..5309046077e2823c4f8f6121c0f72e639ad816cd 100644 (file)
@@ -16,7 +16,7 @@
       <label for="msgtpl_language">
         {{:: ts('Locale') }} <span class="crm-marker">*</span>
       </label>
-      <input ng-model="$ctrl.lang" class="form-control" id="msgtpl_language" required title="{{:: ts('Required') }}" ng-disabled="true" />
+      <input ng-model="$ctrl.locales[$ctrl.lang] || $ctrl.lang" class="form-control" id="msgtpl_language" required title="{{:: ts('Required') }}" ng-disabled="true" />
       <!-- TODO: Pretty name -->
     </div>
 
index 14c56051afa0ce1d4e21b43ea19518b76ad085df..0abcca57aa49c3d35679b31fafec692f18f9d2da 100644 (file)
     var $ctrl = this;
     var args = $location.search();
 
+    $ctrl.locales = CRM.msgtplui.uiLanguages;
     $ctrl.records = prefetch;
     if (args.lang) {
       $ctrl.lang = args.lang;