cleanup bootstrap classes and markup
authorDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 9 Jan 2013 23:21:08 +0000 (00:21 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Wed, 9 Jan 2013 23:21:08 +0000 (00:21 +0100)
app/css/app.css
app/partials/registration.html.ep

index 6771d84..ad39d4e 100644 (file)
@@ -43,18 +43,3 @@ input.ng-valid-required {
 }
 */
 
-/* delete person button */
-div.controls-row > a.btn-danger {
-       margin-top: 25px;
-       margin-left: 2em;
-}
-
-/* Twitter bootstrap specific */
-
-div.controls > input {
-       width: 100%; /* match outher span class */
-}
-
-div.my-input {
-       margin-left: 0;
-}
index e371dc2..33d47da 100644 (file)
@@ -7,7 +7,7 @@
 %= include( "drzb2013/intro.$lang" );
 </div>
 
-<form ng-controller="RegistrationCtrl" name="RegistrationForm">
+<form ng-controller="RegistrationCtrl" name="RegistrationForm" class="span12">
 
 <fieldset class="controls">
 
@@ -55,33 +55,31 @@ hr => 'Registracija - kontakt podaci'
 % my $Organization = locale( en => 'Organization', hr => 'Organizacija' );
 % my $Email = locale( en => 'E-mail', hr => 'E-pošta' );
 
-<div class="controls controls-row">
+<div class="controls-row">
  <input class="my-input span5" ng-model="user.firstname" placeholder="<%= $Name %>" ng-required="true" />
  <input class="my-input span5" ng-model="user.surname"   placeholder="<%= $Surname %>" ng-required="true" />
 </div>
 
-<div class="controls controls-row">
+<div class="controls-row">
  <input class="my-input span10" ng-model="user.organization" placeholder="<%= $Organization %>" bs-typeahead="organizations" data-items="10" >
 </div>
 
 % my $Address = locale en => 'Address', hr => 'Adresa';
-<div class="controls controls-row">
+<div class="controls-row">
  <input class="my-input span10" ng-model="user.address" placeholder="<%= $Address %>" >
 </div>
 
-<div class="controls controls-row">
+<div class="controls-row">
  <input class="my-input span3" ng-model="user.city" placeholder="<%= locale en => 'City', hr => 'Grad' %>" ng-required="true" >
  <input class="my-input span3" ng-model="user.zip_code" placeholder="<%= locale en => 'ZIP', hr => 'Poštanski br.' %>" >
  <input class="my-input span4" ng-model="user.country" placeholder="<%= locale en => 'Country', hr => 'Zemlja' %>" >
 </div>
 
-<div class="controls controls-row">
+<div class="controls-row">
  <input class="my-input span5" ng-model="user.email" type="email" placeholder="<%= $Email %>" ng-required="true" />
  <input class="my-input span5" ng-model="user.phone" placeholder="<%= locale en => 'Phone number', hr => 'Tel. broj' %>" />
 </div>
 
-<legend>
-</legend>
 <label class="checkbox">
  <input ng-model="user.student" type="checkbox" ng-change="change_student()">
  <%= locale 
@@ -157,8 +155,7 @@ hr => 'Večera je uključena u kotizaciju.' %>
 
 </fieldset><!-- selected registration_type -->
 
-
-<div ng-show="has_work">
+<fieldset ng-show="has_work">
 
 <div ng-switch on="work.type">
 <h2 ng-switch-when="lecture"><%= locale en=>'Oral presentation submission', hr=>'Prijava usmenog izlaganja' %></h2>
@@ -172,8 +169,8 @@ hr => 'Večera je uključena u kotizaciju.' %>
 
 % my $WorkTemplate = begin
        % my $has_h3_note = shift;
-<div class="controls controls-row">
- <input class="span10 my-input" ng-model="work.title" placeholder="<%= $Title %>" ng-required="has_work" >
+<div class="controls-row">
+ <input class="span10 my-input" ng-model="work.title" placeholder="<%= $Title %>" ng-required="has_work" />
 </div>
 
 % if ( $has_h3_note ) {
@@ -185,28 +182,34 @@ hr => 'Organizator simpozija' %>
 % }
 
 
-<div ng-repeat="person in work.persons" class="controls controls-row">
+<div ng-repeat="person in work.persons" class="controls-row">
        <input class="span2 my-input" ng-model="person.firstname" placeholder="<%= $Name %>" ng-required="has_work" />
        <input class="span2 my-input" ng-model="person.surname"   placeholder="<%= $Surname %>" ng-required="has_work" />
-       <input class="span2 my-input" ng-model="person.organization" placeholder="<%= $Organization %>" bs-typeahead="organizations" >
+       <input class="span4 my-input" ng-model="person.organization" placeholder="<%= $Organization %>" bs-typeahead="organizations" />
        <input class="span2 my-input" ng-model="person.email" type="email" placeholder="<%= $Email %>" ng-required="has_work" />
-       <a class="controls span1 btn btn-danger" href="" ng-click="removePerson(work.persons,person)"><%= locale en => 'delete', hr => 'obriši' %></a>
+       <div class="span1"><label>&nbsp;</label>
+     <input type="button" class="btn btn-danger" ng-click="removePerson(work.persons,person)" value="<%= locale en => 'delete', hr => 'obriši' %>" />
+    </div>
+</div>
+<div class="controls-row">
+<input type="button" class="btn" ng-click="addPerson(work.persons)" value="<%= locale en=>'add person',hr=>'dodaj osobu' %>" />
 </div>
-<a class="btn" href="" ng-click="addPerson(work.persons)"><%= locale en=>'add person',hr=>'dodaj osobu' %></a>
-<div class="controls">
- <label>
+
+<div class="controls-row">
+<label>
 <%= locale
 en => 'Abstract ({{work.abstract.length || 0}}  from max. 2000 characters with spaces)',
 hr => 'Sažetak ({{work.abstract.length || 0}}  od maks. 2000 znakova s razmacima)'
 %>
- </label>
- <textarea class="span10" ng-model="work.abstract" ng-maxlength="2000" rows="10" cols="80" ng-required="has_work" ></textarea>
+</label>
+<textarea class="controls-row span11" ng-model="work.abstract" ng-maxlength="2000" rows="10" cols="80" ng-required="has_work" ></textarea>
 </div>
+
 % end
 
 <%= $WorkTemplate->(1) %>
 
-</div><!-- has_work -->
+</fieldset><!-- has_work -->
 
 <div ng-show="user.registration_type == 'symposium'">
 
@@ -215,7 +218,7 @@ en=>'Submission of works for the symposium {{work.title}}',
 hr=>'Prijava radova unutar simpozija {{work.title}}' %>
 </h2>
 
-<div ng-repeat="work in work.symposium_works">
+<div ng-repeat="work in work.symposium_works" class="control-row">
 
 <h3><%= locale
 en=>'{{$index + 1}}. symposium work',
@@ -233,19 +236,17 @@ hr => 'Dodaj još jedan rad na simpoziju' %>
 
 </div><!-- user.registration_type == 'symposium' -->
 
-<div class="form-actions">
- <button class="btn btn-primary" ng-click="update(registration)" ng-show="RegistrationForm.$valid"><%= locale en=>'Submit',hr=>'Pošalji' %></button>
+<button class="controls-row btn btn-primary" ng-click="update(registration)" ng-show="RegistrationForm.$valid"><%= locale en=>'Submit',hr=>'Pošalji' %></button>
 
-<p class="left" style="color: red" ng-show="! RegistrationForm.$valid">
+<p class="well" style="color: red" ng-show="! RegistrationForm.$valid">
 <%= locale
 en => 'Please fill all required fields correctly. Fields with red border call for your attention.',
 hr => 'Molimo ispunite sva obavezna polja označena crvenim okvirom.'
 %>
 </p>
-</div>
 
 % if ( $lang =~ m/-dev/ ) {
-<pre>
+<pre class="controls-row">
 {{RegistrationForm.$valid}}
 {{RegistrationForm.$error}}