Skip to content

Commit

Permalink
Merge pull request #1184 from ushahidi/master
Browse files Browse the repository at this point in the history
Master to production - hotfix for saved searches
  • Loading branch information
rowasc authored Jun 20, 2018
2 parents 4115dc4 + 3a1310e commit 3a3e14c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion app/main/posts/savedsearches/editor-directive.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
module.exports = [
'$q',
'$filter',
'$location',
'$rootScope',
'$translate',
Expand All @@ -11,6 +12,7 @@ module.exports = [
'PostFilters',
function (
$q,
$filter,
$location,
$rootScope,
$translate,
Expand Down Expand Up @@ -44,7 +46,9 @@ function (
$scope.views = ViewHelper.views();

$scope.cpySavedSearch = _.clone($scope.savedSearch);

// translate the description and name if they have a translation available (ie the "My posts" search)
$scope.cpySavedSearch.description = $filter('translate')($scope.cpySavedSearch.description);
$scope.cpySavedSearch.name = $filter('translate')($scope.cpySavedSearch.name);
$scope.save = function (savedSearch) {
$scope.isSaving = true;
var persist = savedSearch.id ? SavedSearchEndpoint.update : SavedSearchEndpoint.save;
Expand Down
4 changes: 2 additions & 2 deletions app/main/posts/savedsearches/savedsearch-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

<div class="form-field title">
<label translate>set.name_savedsearch</label>
<input type="text" placeholder="Name your Saved Search..." ng-model="cpySavedSearch.name | translate" translate/>
<input type="text" placeholder="Name your Saved Search..." ng-model="cpySavedSearch.name" translate/>
</div>

<div class="form-field">
<label class="input-label" translate>set.description</label>
<textarea ng-model="cpySavedSearch.description | translate" />
<textarea ng-model="cpySavedSearch.description" />
</div>

<div class="form-field switch" ng-if="featuredEnabled()">
Expand Down

0 comments on commit 3a3e14c

Please sign in to comment.