Skip to content

Commit

Permalink
reworked app edit form to group iOS/Android fields in a fieldset
Browse files Browse the repository at this point in the history
  • Loading branch information
pjay committed Feb 14, 2013
1 parent b52e307 commit 41202d0
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
6 changes: 5 additions & 1 deletion app/assets/stylesheets/application.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ form dl {

form dl#login { .form-dl(80px); }
form dl#users-create { .form-dl(150px); }
form dl#new-app { .form-dl(180px); }
form dl#new-app { .form-dl(170px); }
form dl#app-broadcast { .form-dl(100px); }

/* Apps */
Expand All @@ -69,6 +69,10 @@ h2.app-title * { vertical-align: middle; }
dl#app-details { .dl(200px); }
dl#app-stats { .dl(255px); }

#new-app fieldset { padding: 0; border: 1px solid #dadada; margin: 20px 0; padding: 10px 0; }
#new-app fieldset legend { font-weight: bolder; }
#new-app fieldset dt { padding-left: 5px; }

/* Application broadcast */

#tabs {
Expand Down
24 changes: 15 additions & 9 deletions app/views/apps/_form.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,21 @@
@inputText(appForm("name"), '_label -> "Name")
<dt><label for="app_icon">Icon</label></dt>
<dd><input type="file" name="icon" id="app_icon"></dd>
<dt><label for="app_certificate">iOS P12 certificate</label></dt>
<dd><input type="file" name="certificate" id="app_certificate"></dd>
@if(app.isDefined) {
<dd><i>Leave empty to keep the existing certificate</i></dd>
}
@inputPassword(appForm("iosCertPassword"), '_label -> "iOS certificate password")
@select(field = appForm("appMode"), options = options("0" -> "Development", "1" -> "Production"), '_label -> "iOS application mode")
@checkbox(appForm("debugMode"), '_label -> "iOS debug mode")
@inputText(appForm("gcmApiKey"), '_label -> "Android GCM API key")
<fieldset>
<legend>iOS</legend>
<dt><label for="app_certificate">PKCS#12 certificate</label></dt>
<dd><input type="file" name="certificate" id="app_certificate"></dd>
@if(app.isDefined) {
<dd><i>Leave empty to keep the existing certificate</i></dd>
}
@inputPassword(appForm("iosCertPassword"), '_label -> "Certificate password")
@select(field = appForm("appMode"), options = options("0" -> "Development", "1" -> "Production"), '_label -> "Application mode")
@checkbox(appForm("debugMode"), '_label -> "Debug mode")
</fieldset>
<fieldset>
<legend>Android</legend>
@inputText(appForm("gcmApiKey"), '_label -> "GCM API key")
</fieldset>
<dd><input type="submit" value="@submitLabel"> or <a href="@cancelRoute">Cancel</a></dd>
</dl>
}

0 comments on commit 41202d0

Please sign in to comment.