Skip to content

Commit

Permalink
Merge pull request #74 from ushahidi/ui-fixes
Browse files Browse the repository at this point in the history
Select Post Type page title markup/spacing issues
  • Loading branch information
willdoran committed Feb 9, 2016
2 parents bd56fbb + 57a1a6c commit 42a2354
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
9 changes: 6 additions & 3 deletions server/www/templates/posts/choose-form.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
<div class="post-create-choose-form clearfix">
<div class="page-header">
<h1 class="inline" translate translate-values="{ type: activeForm.name }" ng-if="! post.id">post.modify.add_a_post</h1>
<h1 class="inline" translate translate-values="{ title: post.title }" ng-if="!! post.id">post.modify.edit_post</h1>
<a ng-href="/settings/forms" class="cta edit" ng-if="isAdmin()">Edit Post Types</a>
<div class="page-header-body">
<h1 class="page-title" translate translate-values="{ type: activeForm.name }" ng-if="! post.id">post.modify.add_a_post</h1>
<h1 class="page-title" translate translate-values="{ title: post.title }" ng-if="!! post.id">post.modify.edit_post</h1>

<a ng-href="/settings/forms" class="cta edit" ng-if="isAdmin()">Edit Post Types</a>
</div>
</div>

<div class="main-col">
Expand Down
15 changes: 10 additions & 5 deletions server/www/templates/settings/datasources.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<main class="page-content" role="main">
<main class="page-content data-sources" role="main">
<div class="page-header">
<ul class="breadcrumb">
<li><a ng-href="/settings" translate>nav.settings</a></li>
Expand All @@ -7,8 +7,9 @@
<h1 class="inline">{{title}}</h1>
</div>
<div class="main-col">
<p><em translate>settings.data_sources.hint_turn_on_off</em></p>

<div class="alert">
<p><em translate>settings.data_sources.hint_turn_on_off</em></p>
</div>
<div class="settings-listing" ng-repeat="provider in providers.results | orderBy:'name'" dropdown auto-close="disabled" is-open="panelVisible[provider.id]">
<div ng-if="forms[provider.id].$valid" class="toggle-switch">
<input class="tgl" id="{{provider.id}}_enable" ng-model="settings.providers[provider.id]" type="checkbox" ng-change="saveProviderSettings(provider.id)" ng-disabled="saving">
Expand All @@ -23,7 +24,9 @@ <h3>{{provider.name}}</h3>
</button>

<form name="forms.{{provider.id}}" ng-submit="saveProviderSettings(provider.id)" class="toggle-content init" dropdown-menu>
<p class="alert error" ng-if="forms[provider.id].$invalid" translate>settings.data_sources.hint_plugin_needs_configuring</p>
<div class="alert error">
<p ng-if="forms[provider.id].$invalid" translate>settings.data_sources.hint_plugin_needs_configuring</p>
</div>

<div ng-repeat="(option_key, option) in provider.options track by option_key" ng-class="{ error : formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid, 'form-field' : option.input !== 'radio', 'required' : option.rules.indexOf('required') > -1 }">

Expand Down Expand Up @@ -61,7 +64,9 @@ <h3>{{provider.name}}</h3>
</div>
</fieldset>

<p ng-if="formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid" class="alert error" translate>settings.generic_field_error</p>
<div class="alert error">
<p ng-if="formsSubmitted[provider.id] && forms[provider.id][option_key].$invalid" translate>settings.generic_field_error</p>
</div>
</div>

<button type="submit" class="button-primary" ng-disabled="saving">
Expand Down

0 comments on commit 42a2354

Please sign in to comment.