add some env var form error styles

This commit is contained in:
Lisa Passing 2015-07-15 20:12:13 +02:00
parent 68ea7071e0
commit a7ad2c0a63
4 changed files with 16 additions and 4 deletions

View File

@ -3,6 +3,7 @@
AddEnvVarComponent = Ember.Component.extend
classNames: ['form--envvar']
classNameBindings: ['nameIsBlank:form-error']
store: Ember.inject.service()

View File

@ -172,3 +172,14 @@
height: 1.3em
margin: .2em auto 0
.form-error
.env-name
border: $fail-color 2px solid
.form-error
color: $fail-color
font-size: 14px
margin: 0

View File

@ -44,7 +44,7 @@ textarea
.form--envvar
.form-elem
display: inline-block
vertical-align: middle
vertical-align: top
width: 100%
margin-bottom: 1em

View File

@ -1,9 +1,9 @@
<form {{action "save" on="submit"}}>
{{#if nameIsBlank }}
<p class="form-error">Name cannot be blank</p>
{{/if}}
<div class="form-elem">
{{input value=name class="env-name" on="key-press" action="nameChanged" placeholder="Name"}}
{{#if nameIsBlank }}
<p class="form-error">Name cannot be blank</p>
{{/if}}
</div>
<div class="form-elem">
{{input value=value class="env-value" placeholder="Value"}}