# HG changeset patch # User Tomas Zeman # Date 1334220762 -7200 # Node ID 366e1f8d93bb2f97dd48d45aef7057f6b866db31 # Parent cb88ced8aadf6e313bf85ea49ba54ba18a51498b Twitter bootstrap forms diff -r cb88ced8aadf -r 366e1f8d93bb src/main/scala/fis/base/ui/screen.scala --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/scala/fis/base/ui/screen.scala Thu Apr 12 10:52:42 2012 +0200 @@ -0,0 +1,46 @@ +/* + * Copyright 2012 Tomas Zeman + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package fis.base.ui + +import net.liftweb.http.LiftScreen +import net.tz.lift.model._ +import scala.xml.{Elem, Text, UnprefixedAttribute} + +trait SaveButton { self: LiftScreen => + override def finishButton: Elem = + +} + +trait DeleteButton { self: LiftScreen => + override def finishButton: Elem = + +} + +trait CancelButton { self: LiftScreen => + override def cancelButton: Elem = + +} + +trait HorizontalScreen extends LiftScreen { + override def additionalAttributes = new UnprefixedAttribute("class", + Text("form-horizontal"), super.additionalAttributes) +} + +// vim: set ts=2 sw=2 et: diff -r cb88ced8aadf -r 366e1f8d93bb src/main/scala/fis/crm/ui/ContactSnippet.scala --- a/src/main/scala/fis/crm/ui/ContactSnippet.scala Tue Mar 06 14:07:04 2012 +0100 +++ b/src/main/scala/fis/crm/ui/ContactSnippet.scala Thu Apr 12 10:52:42 2012 +0200 @@ -67,7 +67,8 @@ def view: Contact => Box[String] = (viewLoc.calcHref _) andThen (Box !! _) } - object form extends LiftScreen { + object form extends HorizontalScreen with CancelButton with SaveButton { + object c extends ScreenVar[Contact](Contact.createRecord) override def screenFields: List[BaseField] = ContactPanel.fields(c) diff -r cb88ced8aadf -r 366e1f8d93bb src/main/webapp/css/base.css --- a/src/main/webapp/css/base.css Tue Mar 06 14:07:04 2012 +0100 +++ b/src/main/webapp/css/base.css Thu Apr 12 10:52:42 2012 +0200 @@ -52,6 +52,10 @@ text-align: right; } +.control-label { + font-weight: bold; +} + /* fix for active sf-menu item in span tag */ .sf-menu span { padding: 0.75em 1em; diff -r cb88ced8aadf -r 366e1f8d93bb src/main/webapp/templates-hidden/form-panel.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/main/webapp/templates-hidden/form-panel.html Thu Apr 12 10:52:42 2012 +0200 @@ -0,0 +1,10 @@ +
+ +
+ +
+ + Supporting help text +
+
+
diff -r cb88ced8aadf -r 366e1f8d93bb src/main/webapp/templates-hidden/wizard-all.html --- a/src/main/webapp/templates-hidden/wizard-all.html Tue Mar 06 14:07:04 2012 +0100 +++ b/src/main/webapp/templates-hidden/wizard-all.html Thu Apr 12 10:52:42 2012 +0200 @@ -5,55 +5,40 @@
-
-
    -
  • -
-
+
-
+
+ - - - - - -
- - - - - - - - - +
+ + + +
+ + + + + +
-
-
- -
+ + +
+ - -
- - - - - - -
-
- -
-
- -
-
+
+
+ + + +
+
+ +
+