fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [14526] fixing forms


From: Saul
Subject: [Fmsystem-commits] [14526] fixing forms
Date: Fri, 04 Dec 2015 23:46:56 +0000

Revision: 14526
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14526
Author:   psaul
Date:     2015-12-04 23:46:55 +0000 (Fri, 04 Dec 2015)
Log Message:
-----------
fixing forms

Modified Paths:
--------------
    
branches/dev-syncromind/activitycalendarfrontend/inc/class.uiactivity.inc.php
    
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_edit.js
    
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_new.js
    
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_new_step_1.js
    
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/organization_edit.js
    
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_edit.xsl
    
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_edit_step_1.xsl
    
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new.xsl
    
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new_org.xsl
    
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new_step_1.xsl
    branches/dev-syncromind/activitycalendarfrontend/templates/base/css/base.css
    
branches/dev-syncromind/activitycalendarfrontend/templates/base/organization_edit.xsl
    
branches/dev-syncromind/activitycalendarfrontend/templates/base/organization_reciept.xsl

Added Paths:
-----------
    
branches/dev-syncromind/activitycalendarfrontend/templates/base/css/style.css

Modified: 
branches/dev-syncromind/activitycalendarfrontend/inc/class.uiactivity.inc.php
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/inc/class.uiactivity.inc.php   
    2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/inc/class.uiactivity.inc.php   
    2015-12-04 23:46:55 UTC (rev 14526)
@@ -99,6 +99,8 @@
                 'name' => $o['name']
             );
         }
+        
+        phpgwapi_jquery::formvalidator_generate(array('location', 'date', 
'security', 'file'));
 
                if (isset($_POST['step_1']))
         { //activity shall be registred on a new organization
@@ -555,7 +557,7 @@
 
                $ajaxUrl = $c->config_data['AJAXURL'];
         $helpImg = 
$GLOBALS['phpgw']->common->image('activitycalendarfrontend', 'hjelp.gif');
-
+        
                $id = intval(phpgw::get_var('id', 'GET'));
 
                $categories = $this->so_activity->get_categories();
@@ -604,6 +606,8 @@
                 'name' => $o['name']
             );
         }
+        
+        phpgwapi_jquery::formvalidator_generate(array('location', 'date', 
'security', 'file'));
 
                if (isset($_POST['step_1'])) { //change_request
                        $activity_id = phpgw::get_var('activity_id');
@@ -1070,7 +1074,7 @@
         * Public method.
         */
        function get_address_search() {
-               $search_string = phpgw::get_var('query');
+               $search_string = phpgw::get_var('search');
                //var_dump($search_string);
                return 
activitycalendar_soarena::get_instance()->get_address($search_string);
        }
@@ -1081,6 +1085,8 @@
             
             $helpImg = 
$GLOBALS['phpgw']->common->image('activitycalendarfrontend', 'hjelp.gif');
             
+            phpgwapi_jquery::formvalidator_generate(array('location', 'date', 
'security', 'file'));
+            
                        if (isset($_POST['save_org'])) { //save updated 
organization info
                                $organization = 
$this->so_organization->get_single($org_id);
 
@@ -1111,7 +1117,7 @@
 
                                $message = lang('change_request_ok', 
$org_info['name']);
 
-                               $this->render('organization_reciept.php', array
+                               return 
self::render_template_xsl('organization_reciept', array
                     (
                                                'message' => isset($message) ? 
$message : phpgw::get_var('message'),
                                                'error' => isset($error) ? 
$error : phpgw::get_var('error'),

Modified: 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_edit.js
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_edit.js
       2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_edit.js
       2015-12-04 23:46:55 UTC (rev 14526)
@@ -67,7 +67,9 @@
 //});
 
 $(document).ready(function(){
-    get_available_groups();
+    if ($('#organization_id').length) {
+        get_available_groups();
+    }
 });
 
 function checkNewGroup()
@@ -248,4 +250,138 @@
     }
     else
         return true;
+}
+
+
+
+
+
+
+
+
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'description',
+        validatorFunction: function(){
+            var description = $('#description').val();
+            var v = true;
+            if(description == null || description == "") {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Beskrivelse må fylles ut!',
+        errorMessageKey: 'description'
+    });    
+    $.formUtils.addValidator({
+        name: 'description_length',
+        validatorFunction: function(){
+            var description = $('#description').val();
+            var v = true;
+            if(description.length > 254) {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Beskrivelse kan maksimalt være 255 tegn!',
+        errorMessageKey: 'description_length'
+    });
+    $.formUtils.addValidator({
+        name: 'target',
+        validatorFunction: function() {
+            var n = 0;
+            $('input[name="target[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Målgruppe må fylles ut!',
+        errorMessageKey: 'target'
+    });
+    $.formUtils.addValidator({
+        name: 'district',
+        validatorFunction: function() {
+            var n = 0;
+            $('input[name="district"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Bydel må fylles ut!',
+        errorMessageKey: 'district'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_phone',
+        validatorFunction: function(){
+            var contact_phone = $('#contact_phone').val();
+            var v = true;
+            if(contact_phone == null || contact_phone == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Telefonnummer til kontaktperson må fylles ut!',
+        errorMessageKey: 'contact_phone'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_phone_length',
+        validatorFunction: function(){
+            var contact_phone = $('#contact_phone').val();
+            var v = true;
+            if((contact_phone != null || contact_phone != '') && 
contact_phone.length < 8) {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Telefonnummer må inneholde minst 8 siffer!',
+        errorMessageKey: 'contact_phone_length'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail',
+        validatorFunction: function(){
+            var contact_mail = $('#contact_mail').val();
+            var v = true;
+            if(contact_mail == null || contact_mail == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'E-post for kontaktperson må fylles ut!',
+        errorMessageKey: 'contact_mail'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail2',
+        validatorFunction: function(){
+            var contact_mail2 = $('#contact_mail2').val();
+            var v = true;
+            if(contact_mail2 == null || contact_mail2 == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Begge felter for E-post må fylles ut!',
+        errorMessageKey: 'contact_mail2'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail2_confirm',
+        validatorFunction: function(){
+            var contact_mail1 = $('#contact_mail').val();
+            var contact_mail2 = $('#contact_mail2').val();
+            var v = true;
+            if(contact_mail2 != null || contact_mail2 != '') {
+                if (contact_mail1 != contact_mail2) {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'E-post må være den samme i begge felt!',
+        errorMessageKey: 'contact_mail2_confirm'
+    });
 }
\ No newline at end of file

Modified: 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_new.js
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_new.js
        2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_new.js
        2015-12-04 23:46:55 UTC (rev 14526)
@@ -17,6 +17,7 @@
         ele.style.display = "block";
         text.innerHTML = "";
         arenahidden.value="new_arena";
+        $('#internal_arena_id').attr('data-validation', '').removeClass('valid 
error').attr('style', '');
     }
 }
 
@@ -287,4 +288,147 @@
     }
     else
         return true;
-}
\ No newline at end of file
+}
+
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'description',
+        validatorFunction: function(){
+            var description = $('#description').val();
+            var v = true;
+            if(description == null || description == "") {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Beskrivelse må fylles ut!',
+        errorMessageKey: 'description'
+    });    
+    $.formUtils.addValidator({
+        name: 'description_length',
+        validatorFunction: function(){
+            var description = $('#description').val();
+            var v = true;
+            if(description.length > 254) {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Beskrivelse kan maksimalt være 255 tegn!',
+        errorMessageKey: 'description_length'
+    });
+    $.formUtils.addValidator({
+        name: 'target',
+        validatorFunction: function() {
+            var n = 0;
+            $('input[name="target[]"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Målgruppe må fylles ut!',
+        errorMessageKey: 'target'
+    });
+    $.formUtils.addValidator({
+        name: 'district',
+        validatorFunction: function() {
+            var n = 0;
+            $('input[name="district"]').each(function(){
+               if ($(this).is(':checked')) {
+                   n++;
+               }
+            });
+            var v = (n > 0) ? true : false;
+            return v;
+        },
+        errorMessage: 'Bydel må fylles ut!',
+        errorMessageKey: 'district'
+    });
+    $.formUtils.addValidator({
+        name: 'internal_arena_id',
+        validatorFunction: function(){
+            var a_h = $('#new_arena_hidden').val();
+            var a_id = $('#internal_arena_id').val();
+            var v = true;
+            if(a_h == null || a_h == ''){
+                if(a_id == null || a_id == '') {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'Du må velge om aktiviteten skal knyttes mot en 
eksisterende\norganisasjon, eller om det skal registreres en ny organisasjon!',
+        errorMessageKey: 'internal_arena_id'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_phone',
+        validatorFunction: function(){
+            var contact_phone = $('#contact_phone').val();
+            var v = true;
+            if(contact_phone == null || contact_phone == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Telefonnummer til kontaktperson må fylles ut!',
+        errorMessageKey: 'contact_phone'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_phone_length',
+        validatorFunction: function(){
+            var contact_phone = $('#contact_phone').val();
+            var v = true;
+            if((contact_phone != null || contact_phone != '') && 
contact_phone.length < 8) {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Telefonnummer må inneholde minst 8 siffer!',
+        errorMessageKey: 'contact_phone_length'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail',
+        validatorFunction: function(){
+            var contact_mail = $('#contact_mail').val();
+            var v = true;
+            if(contact_mail == null || contact_mail == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'E-post for kontaktperson må fylles ut!',
+        errorMessageKey: 'contact_mail'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail2',
+        validatorFunction: function(){
+            var contact_mail2 = $('#contact_mail2').val();
+            var v = true;
+            if(contact_mail2 == null || contact_mail2 == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Begge felter for E-post må fylles ut!',
+        errorMessageKey: 'contact_mail2'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail2_confirm',
+        validatorFunction: function(){
+            var contact_mail1 = $('#contact_mail').val();
+            var contact_mail2 = $('#contact_mail2').val();
+            var v = true;
+            if(contact_mail2 != null || contact_mail2 != '') {
+                if (contact_mail1 != contact_mail2) {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'E-post må være den samme i begge felt!',
+        errorMessageKey: 'contact_mail2_confirm'
+    });
+}

Modified: 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_new_step_1.js
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_new_step_1.js
 2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/activity_new_step_1.js
 2015-12-04 23:46:55 UTC (rev 14526)
@@ -14,7 +14,17 @@
         $("#toggleText3").show();
         text.innerHTML = "";
         org_id.value = "new_org";
-    })
+        
+        $('#organization_id').attr('data-validation', '').removeClass('valid 
error').attr('style', '');
+        $('.form-error').remove();
+        $('#orgname').attr('data-validation', 'orgname');
+        $('#org_contact1_name').attr('data-validation', 'org_contact1_name');
+        $('#org_contact1_phone').attr('data-validation', 'org_contact1_phone 
org_contact1_phone_length');
+        $('#org_contact1_mail').attr('data-validation', 'org_contact1_mail');
+        $('#org_contact2_mail').attr('data-validation', 'org_contact2_mail 
org_contact2_mail_confirm');
+        
+        
+    });
 });
 function toggle() {
     var ele = document.getElementById("toggleText");
@@ -168,4 +178,142 @@
     {
         return true;
     }
-}
\ No newline at end of file
+}
+
+
+
+
+
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'organization_id',
+        validatorFunction: function(){
+            var o_id_h = $('#organization_id_hidden').val();
+            var o_id = $('#organization_id').val();
+            var v = true;
+            if(o_id_h == null || o_id_h == ''){
+                if(o_id == null || o_id == '') {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'Du må velge om aktiviteten skal knyttes mot en 
eksisterende\norganisasjon, eller om det skal registreres en ny organisasjon!',
+        errorMessageKey: 'organization_id'
+    });    
+    $.formUtils.addValidator({
+        name: 'orgname',
+        validatorFunction: function(){
+            var o_id_h = $('#organization_id_hidden').val();
+            var o_name = $('#orgname').val();
+            var v = true;
+            if(o_id_h != null && o_id_h != ''){
+                if(o_name == null || o_name == '') {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'Organisasjonsnavn må fylles ut!',
+        errorMessageKey: 'orgname'
+    });
+    $.formUtils.addValidator({
+        name: 'org_contact1_name',
+        validatorFunction: function(){
+            var o_id_h = $('#organization_id_hidden').val();
+            var o_contact1_name = $('#org_contact1_name').val();
+            var v = true;
+            if(o_id_h != null && o_id_h != ''){
+                if(o_contact1_name == null || o_contact1_name == '') {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'Navn på kontaktperson må fylles ut!',
+        errorMessageKey: 'org_contact1_name'
+    });
+    $.formUtils.addValidator({
+        name: 'org_contact1_phone',
+        validatorFunction: function(){
+            var o_id_h = $('#organization_id_hidden').val();
+            var o_contact1_phone = $('#org_contact1_phone').val();
+            var v = true;
+            if(o_id_h != null && o_id_h != ''){
+                if(o_contact1_phone == null || o_contact1_phone == '') {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'Telefonnummer til kontaktperson må fylles ut!',
+        errorMessageKey: 'org_contact1_phone'
+    });
+    $.formUtils.addValidator({
+        name: 'org_contact1_phone_length',
+        validatorFunction: function(){
+            var o_id_h = $('#organization_id_hidden').val();
+            var o_contact1_phone = $('#org_contact1_phone').val();
+            var v = true;
+            if(o_id_h != null && o_id_h != ''){
+                if((o_contact1_phone != null || o_contact1_phone != '') && 
o_contact1_phone.length < 8) {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'Telefonnummer må inneholde minst 8 siffer!',
+        errorMessageKey: 'org_contact1_phone_length'
+    });
+    $.formUtils.addValidator({
+        name: 'org_contact1_mail',
+        validatorFunction: function(){
+            var o_id_h = $('#organization_id_hidden').val();
+            var o_contact1_mail = $('#org_contact1_mail').val();
+            var v = true;
+            if(o_id_h != null && o_id_h != ''){
+                if(o_contact1_mail == null || o_contact1_mail == '') {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'E-post for kontaktperson må fylles ut!',
+        errorMessageKey: 'org_contact1_mail'
+    });
+    $.formUtils.addValidator({
+        name: 'org_contact2_mail',
+        validatorFunction: function(){
+            var o_id_h = $('#organization_id_hidden').val();
+            var o_contact2_mail = $('#org_contact2_mail').val();
+            var v = true;
+            if(o_id_h != null && o_id_h != ''){
+                if(o_contact2_mail == null || o_contact2_mail == '') {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'Begge felter for E-post må fylles ut!',
+        errorMessageKey: 'org_contact2_mail'
+    });
+    $.formUtils.addValidator({
+        name: 'org_contact2_mail_confirm',
+        validatorFunction: function(){
+            var o_id_h = $('#organization_id_hidden').val();
+            var o_contact1_mail = $('#org_contact1_mail').val();
+            var o_contact2_mail = $('#org_contact2_mail').val();
+            var v = true;
+            if(o_id_h != null && o_id_h != ''){
+                if(o_contact2_mail != null || o_contact2_mail != '') {
+                    if (o_contact1_mail != o_contact2_mail) {
+                        v = false;
+                    }
+                }
+            }
+            return v;
+        },
+        errorMessage: 'E-post må være den samme i begge felt!',
+        errorMessageKey: 'org_contact2_mail_confirm'
+    });
+}

Modified: 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/organization_edit.js
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/organization_edit.js
   2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/js/activitycalendarfrontend/organization_edit.js
   2015-12-04 23:46:55 UTC (rev 14526)
@@ -90,4 +90,75 @@
     {
         return true;
     }
+}
+
+if ($.formUtils) {
+    $.formUtils.addValidator({
+        name: 'contact_phone',
+        validatorFunction: function(){
+            var contact_phone = $('#org_contact1_phone').val();
+            var v = true;
+            if(contact_phone == null || contact_phone == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Telefonnummer til kontaktperson må fylles ut!',
+        errorMessageKey: 'contact_phone'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_phone_length',
+        validatorFunction: function(){
+            var contact_phone = $('#org_contact1_phone').val();
+            var v = true;
+            if((contact_phone != null || contact_phone != '') && 
contact_phone.length < 8) {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Telefonnummer må inneholde minst 8 siffer!',
+        errorMessageKey: 'contact_phone_length'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail',
+        validatorFunction: function(){
+            var contact_mail = $('#org_contact1_mail').val();
+            var v = true;
+            if(contact_mail == null || contact_mail == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'E-post for kontaktperson må fylles ut!',
+        errorMessageKey: 'contact_mail'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail2',
+        validatorFunction: function(){
+            var contact_mail2 = $('#org_contact2_mail').val();
+            var v = true;
+            if(contact_mail2 == null || contact_mail2 == '') {
+                v = false;
+            }
+            return v;
+        },
+        errorMessage: 'Begge felter for E-post må fylles ut!',
+        errorMessageKey: 'contact_mail2'
+    });
+    $.formUtils.addValidator({
+        name: 'contact_mail2_confirm',
+        validatorFunction: function(){
+            var contact_mail1 = $('#org_contact1_mail').val();
+            var contact_mail2 = $('#org_contact2_mail').val();
+            var v = true;
+            if(contact_mail2 != null || contact_mail2 != '') {
+                if (contact_mail1 != contact_mail2) {
+                    v = false;
+                }
+            }
+            return v;
+        },
+        errorMessage: 'E-post må være den samme i begge felt!',
+        errorMessageKey: 'contact_mail2_confirm'
+    });
 }
\ No newline at end of file

Modified: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_edit.xsl
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_edit.xsl
   2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_edit.xsl
   2015-12-04 23:46:55 UTC (rev 14526)
@@ -17,323 +17,329 @@
             <div>
                 <xsl:value-of select="php:function('lang', 'required_fields')" 
/>
             </div>
-        </div>
-        <form action="" method="post" name="form" id="form">
-            <input type="hidden" name="id">
-                <xsl:attribute name="value">
-                    <xsl:value-of select="activity/id" />
-                </xsl:attribute>
-            </input>
-            <dl class="proplist-col">
-                <fieldset>
-                    <xsl:attribute name="title">
-                        <xsl:value-of select="php:function('lang', 'what')" />
-                    </xsl:attribute>
-                    <legend>Hva</legend>
-                    <dt>
-                        <label for="title">
-                            <xsl:value-of select="php:function('lang', 
'activity_title')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_title')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <input type="text" name="title" id="title" size="83" 
maxlength="254">
+            <form action="" method="post" name="form" id="form">
+                <div class="pure-g">
+                    <div class="pure-u-1">
+                        <input type="hidden" name="id">
                             <xsl:attribute name="value">
-                                <xsl:value-of select="activity/title" />
+                                <xsl:value-of select="activity/id" />
                             </xsl:attribute>
                         </input>
-                    </dd>
-                    <dt>
-                        <label for="org_description">
-                            <xsl:value-of select="php:function('lang', 
'description')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_description')" />');return 
false;
+                        <dl class="proplist-col">
+                            <fieldset>
+                                <xsl:attribute name="title">
+                                    <xsl:value-of select="php:function('lang', 
'what')" />
                                 </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <textarea cols="80" rows="4" name="description" 
id="description">
-                            <xsl:value-of select="activity/description" />
-                        </textarea>
-                    </dd>
-                    <dt>
-                        <label for="category">
-                            <xsl:value-of select="php:function('lang', 
'category')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_category')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <select name="category" id="category">
-                            <option value="">Ingen kategori valgt</option>
-                            <xsl:for-each select="categories/list">
-                                <option>
-                                    <xsl:attribute name="value">
-                                        <xsl:value-of select="id" />
-                                    </xsl:attribute>
-                                    <xsl:if test="../current_category_id = id">
-                                        <xsl:attribute name="selected">
-                                            <xsl:value-of select="selected" />
+                                <legend>Hva</legend>
+                                <dt>
+                                    <label for="title">
+                                        <xsl:value-of 
select="php:function('lang', 'activity_title')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_title')" />');return false;
                                         </xsl:attribute>
-                                    </xsl:if>
-                                    <xsl:value-of select="name" />
-                                </option>
-                            </xsl:for-each>
-                        </select>
-                    </dd>
-                </fieldset>
-                <fieldset id="hvem">
-                    <legend>For hvem</legend>
-                    <dt>
-                        <label for="target">
-                            <xsl:value-of select="php:function('lang', 
'target')" /> (*) 
-                            <a href="javascript:void">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_target')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <xsl:for-each select="targets">
-                            <input name="target[]" type="checkbox">
-                                <xsl:if test="checked != ''">
-                                    <xsl:attribute name="checked">
-                                        <xsl:value-of select="checked" />
-                                    </xsl:attribute>
-                                </xsl:if>
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="id" />
-                                </xsl:attribute>
-                            </input>
-                            <xsl:value-of select="name" />
-                            <br />
-                        </xsl:for-each>
-                    </dd>
-                    <dt>
-                        <input type="checkbox" name="special_adaptation" 
id="special_adaptation">
-                            <xsl:if test="activity/special_adaptation = 1">
-                                <xsl:attribute name="checked">
-                                    checked
-                                </xsl:attribute>
-                            </xsl:if>
-                        </input>
-                        <label for="special_adaptation">
-                            <xsl:value-of select="php:function('lang', 
'special_adaptation')" />
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_spec_adapt')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                </fieldset>
-                <fieldset title="hvor">
-                    <legend>Hvor og når</legend>
-                    <dt>
-                        <br />
-                        <label for="arena">
-                            <xsl:value-of select="php:function('lang', 
'location')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_edit_activity_location')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                        <br />
-                    </dt>
-                    <dd>
-                        <select name="internal_arena_id" 
id="internal_arena_id" style="width:200px">
-                            <option value="">Lokale ikke valgt</option>
-                            <optgroup>
-                                <xsl:attribute name="label">
-                                    <xsl:value-of select="php:function('lang', 
'building')" />
-                                </xsl:attribute>
-                                <xsl:for-each select="buildings/list">
-                                    <option>
-                                        <xsl:if 
test="../selected_internal_arena = id">
-                                            <xsl:attribute name="selected">
-                                                selected
-                                            </xsl:attribute>
-                                        </xsl:if>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <input type="text" name="title" id="title" 
class="pure-u-1 input-80" maxlength="254" data-validation="required" 
data-validation-error-msg="Tittel må fylles ut!">
                                         <xsl:attribute name="value">
-                                            <xsl:value-of select="concat('i_', 
id)" />
+                                            <xsl:value-of 
select="activity/title" />
                                         </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <dt>
+                                    <label for="org_description">
+                                        <xsl:value-of 
select="php:function('lang', 'description')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_description')" />');return 
false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <textarea class="pure-u-1 input-80" 
rows="4" name="description" id="description" data-validation="description 
description_length">
+                                        <xsl:value-of 
select="activity/description" />
+                                    </textarea>
+                                </dd>
+                                <dt>
+                                    <label for="category">
+                                        <xsl:value-of 
select="php:function('lang', 'category')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_category')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <select name="category" id="category" 
class="pure-u-1 input-40" data-validation="required" 
data-validation-error-msg="Kategori må fylles ut!">
+                                        <option value="">Ingen kategori 
valgt</option>
+                                        <xsl:for-each select="categories/list">
+                                            <option>
+                                                <xsl:attribute name="value">
+                                                    <xsl:value-of select="id" 
/>
+                                                </xsl:attribute>
+                                                <xsl:if 
test="../current_category_id = id">
+                                                    <xsl:attribute 
name="selected">
+                                                        <xsl:value-of 
select="selected" />
+                                                    </xsl:attribute>
+                                                </xsl:if>
+                                                <xsl:value-of select="name" />
+                                            </option>
+                                        </xsl:for-each>
+                                    </select>
+                                </dd>
+                            </fieldset>
+                            <fieldset id="hvem">
+                                <legend>For hvem</legend>
+                                <dt>
+                                    <label for="target">
+                                        <xsl:value-of 
select="php:function('lang', 'target')" /> (*)
+                                    </label>
+                                    <a href="javascript:void" class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_target')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <input type="hidden" 
data-validation="target" />
+                                    <xsl:for-each select="targets">
+                                        <input name="target[]" type="checkbox">
+                                            <xsl:if test="checked != ''">
+                                                <xsl:attribute name="checked">
+                                                    <xsl:value-of 
select="checked" />
+                                                </xsl:attribute>
+                                            </xsl:if>
+                                            <xsl:attribute name="value">
+                                                <xsl:value-of select="id" />
+                                            </xsl:attribute>
+                                        </input>
                                         <xsl:value-of select="name" />
-                                    </option>
-                                </xsl:for-each>
-                            </optgroup>
-                            <optgroup>
-                                <xsl:attribute name="label">
-                                    <xsl:value-of select="php:function('lang', 
'external_arena')" />
-                                </xsl:attribute>
-                                <xsl:for-each select="arenas/list">
-                                    <option>
-                                        <xsl:if test="../selected_arena = id">
-                                            <xsl:attribute name="selected">
-                                                selected
+                                        <br />
+                                    </xsl:for-each>
+                                </dd>
+                                <dt>
+                                    <input type="checkbox" 
name="special_adaptation" id="special_adaptation">
+                                        <xsl:if 
test="activity/special_adaptation = 1">
+                                            <xsl:attribute name="checked">
+                                                checked
                                             </xsl:attribute>
                                         </xsl:if>
+                                    </input>
+                                    <label for="special_adaptation">
+                                        <xsl:value-of 
select="php:function('lang', 'special_adaptation')" />
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_spec_adapt')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                            </fieldset>
+                            <fieldset title="hvor">
+                                <legend>Hvor og når</legend>
+                                <dt>
+                                    <br />
+                                    <label for="arena">
+                                        <xsl:value-of 
select="php:function('lang', 'location')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_edit_activity_location')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                    <br />
+                                </dt>
+                                <dd>
+                                    <select name="internal_arena_id" 
id="internal_arena_id" class="pure-u-1 input-40" data-validation="required" 
data-validation-error-msg="Lokale må fylles ut!">
+                                        <option value="">Lokale ikke 
valgt</option>
+                                        <optgroup>
+                                            <xsl:attribute name="label">
+                                                <xsl:value-of 
select="php:function('lang', 'building')" />
+                                            </xsl:attribute>
+                                            <xsl:for-each 
select="buildings/list">
+                                                <option>
+                                                    <xsl:if 
test="../selected_internal_arena = id">
+                                                        <xsl:attribute 
name="selected">
+                                                            selected
+                                                        </xsl:attribute>
+                                                    </xsl:if>
+                                                    <xsl:attribute 
name="value">
+                                                        <xsl:value-of 
select="concat('i_', id)" />
+                                                    </xsl:attribute>
+                                                    <xsl:value-of 
select="name" />
+                                                </option>
+                                            </xsl:for-each>
+                                        </optgroup>
+                                        <optgroup>
+                                            <xsl:attribute name="label">
+                                                <xsl:value-of 
select="php:function('lang', 'external_arena')" />
+                                            </xsl:attribute>
+                                            <xsl:for-each select="arenas/list">
+                                                <option>
+                                                    <xsl:if 
test="../selected_arena = id">
+                                                        <xsl:attribute 
name="selected">
+                                                            selected
+                                                        </xsl:attribute>
+                                                    </xsl:if>
+                                                    <xsl:attribute 
name="value">
+                                                        <xsl:value-of 
select="id" />
+                                                    </xsl:attribute>
+                                                    <xsl:attribute 
name="title">
+                                                        <xsl:value-of 
select="name" />
+                                                    </xsl:attribute>
+                                                    <xsl:value-of 
select="name" />
+                                                </option>
+                                            </xsl:for-each>
+                                        </optgroup>
+                                    </select>
+                                    <br />
+                                </dd>
+                                <dt>
+                                    <label for="district">
+                                        <xsl:value-of 
select="php:function('lang', 'district')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_district')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <input type="hidden" 
data-validation="district" />
+                                    <xsl:for-each select="districts/list">
+                                        <input type="radio" name="district">
+                                            <xsl:attribute name="value">
+                                                <xsl:value-of 
select="part_of_town_id" />
+                                            </xsl:attribute>
+                                            <xsl:if 
test="../current_district_id = part_of_town_id">
+                                                <xsl:attribute name="checked">
+                                                    <xsl:value-of 
select="checked" />
+                                                </xsl:attribute>
+                                            </xsl:if>
+                                        </input>
+                                        <xsl:value-of select="name" /><br />
+                                    </xsl:for-each>
+                                </dd>
+                                <dt>
+                                    <label for="time">
+                                        <xsl:value-of 
select="php:function('lang', 'time')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_time')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <input type="text" name="time" id="time" 
class="pure-u-1 input-80" maxlength="254" data-validation="required" 
data-validation-error-msg="Dag og tid må fylles ut!">
                                         <xsl:attribute name="value">
-                                            <xsl:value-of select="id" />
+                                            <xsl:value-of 
select="activity/time" />
                                         </xsl:attribute>
-                                        <xsl:attribute name="title">
-                                            <xsl:value-of select="name" />
+                                    </input>
+                                </dd>
+                            </fieldset>
+                            <fieldset id="arr">
+                                <legend>Kontaktperson</legend>
+                                <br />
+                                Kontaktperson for aktiviteten 
+                                <a href="javascript:void(0);" class="helpLink">
+                                    <xsl:attribute name="onclick">
+                                        alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_contact_person')" />');return 
false;
+                                    </xsl:attribute>
+                                    <img alt="Hjelp" src="{helpImg}" />
+                                </a>
+                                <br />
+                                <dt><label for="contact_name">Navn 
(*)</label></dt>
+                                <dd>
+                                    <input type="text" name="contact_name" 
id="contact_name" class="pure-u-1 input-80" data-validation="required" 
data-validation-error-msg="Navn på kontaktperson må fylles ut!">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="activity/contact1_name" />
                                         </xsl:attribute>
-                                        <xsl:value-of select="name" />
-                                    </option>
-                                </xsl:for-each>
-                            </optgroup>
-                        </select>
-                        <br />
-                    </dd>
-                    <dt>
-                        <label for="district">
-                            <xsl:value-of select="php:function('lang', 
'district')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_district')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <xsl:for-each select="districts/list">
-                            <input type="radio" name="district">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="part_of_town_id" />
-                                </xsl:attribute>
-                                <xsl:if test="../current_district_id = 
part_of_town_id">
-                                    <xsl:attribute name="checked">
-                                        <xsl:value-of select="checked" />
-                                    </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <dt><label for="contact_phone">Telefon 
(*)</label></dt>
+                                <dd>
+                                    <input type="text" name="contact_phone" 
id="contact_phone" data-validation="contact_phone contact_phone_length">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="activity/contact1_phone" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <dt><label for="contact_mail">E-post 
(*)</label></dt>
+                                <dd>
+                                    <input type="text" name="contact_mail" 
id="contact_mail" class="pure-u-1 input-50" data-validation="contact_mail">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="activity/contact1_mail" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <dt><label for="contact_mail2">Gjenta e-post 
(*)</label></dt>
+                                <dd>
+                                    <input type="text" name="contact_mail2" 
id="contact_mail2" class="pure-u-1 input-50" data-validation="contact_mail2 
contact_mail2_confirm">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="activity/contact1_mail" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>                    
+                            </fieldset>
+                            <fieldset>
+                                <br />
+                                <dt>
+                                    <label for="office">
+                                        Hvilket kulturkontor skal motta 
registreringen (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_office')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <select name="office" id="office" 
data-validation="required" data-validation-error-msg="Hovedansvarlig 
kulturkontor må fylles ut!">
+                                        <option value="">Ingen kontor 
valgt</option>
+                                        <xsl:for-each select="offices/list">
+                                            <option>
+                                                <xsl:if 
test="../selected_office = id">
+                                                    <xsl:attribute 
name="selected">
+                                                        selected
+                                                    </xsl:attribute>
+                                                </xsl:if>
+                                                <xsl:attribute name="value">
+                                                    <xsl:value-of select="id" 
/>
+                                                </xsl:attribute>
+                                                <xsl:value-of select="name" />
+                                            </option>
+                                        </xsl:for-each>
+                                    </select>
+                                </dd>
+                            </fieldset>
+                            <div class="form-buttons">
+                                <xsl:if test="editable">
+                                    <input type="submit" name="save_activity">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="php:function('lang', 'save')" />
+                                        </xsl:attribute>
+                                    </input>
                                 </xsl:if>
-                            </input>
-                            <xsl:value-of select="name" /><br />
-                        </xsl:for-each>
-                    </dd>
-                    <dt>
-                        <label for="time">
-                            <xsl:value-of select="php:function('lang', 
'time')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_time')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <input type="text" name="time" id="time" size="80" 
maxlength="254">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="activity/time" />
-                            </xsl:attribute>
-                        </input>
-                    </dd>
-                </fieldset>
-                <fieldset id="arr">
-                    <legend>Kontaktperson</legend>
-                    <br />
-                    Kontaktperson for aktiviteten 
-                    <a href="javascript:void(0);">
-                        <xsl:attribute name="onclick">
-                            alert('<xsl:value-of select="php:function('lang', 
'help_new_activity_contact_person')" />');return false;
-                        </xsl:attribute>
-                        <img alt="Hjelp" src="{helpImg}" />
-                    </a>
-                    <br />
-                    <dt><label for="contact_name">Navn (*)</label></dt>
-                    <dd>
-                        <input type="text" name="contact_name" 
id="contact_name" size="80">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="activity/contact1_name" 
/>
-                            </xsl:attribute>
-                        </input>
-                    </dd>
-                    <dt><label for="contact_phone">Telefon (*)</label></dt>
-                    <dd>
-                        <input type="text" name="contact_phone" 
id="contact_phone">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="activity/contact1_phone" 
/>
-                            </xsl:attribute>
-                        </input>
-                    </dd>
-                    <dt><label for="contact_mail">E-post (*)</label></dt>
-                    <dd>
-                        <input type="text" name="contact_mail" 
id="contact_mail" size="50">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="activity/contact1_mail" 
/>
-                            </xsl:attribute>
-                        </input>
-                    </dd>
-                    <dt><label for="contact_mail2">Gjenta e-post 
(*)</label></dt>
-                    <dd>
-                        <input type="text" name="contact_mail2" 
id="contact_mail2" size="50">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="activity/contact1_mail" 
/>
-                            </xsl:attribute>
-                        </input>
-                    </dd>                    
-                </fieldset>
-                <fieldset>
-                    <br />
-                    <dt>
-                        <label for="office">
-                            Hvilket kulturkontor skal motta registreringen (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_office')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <select name="office" id="office">
-                            <option value="0">Ingen kontor valgt</option>
-                            <xsl:for-each select="offices/list">
-                                <option>
-                                    <xsl:if test="../selected_office = id">
-                                        <xsl:attribute name="selected">
-                                            selected
-                                        </xsl:attribute>
-                                    </xsl:if>
-                                    <xsl:attribute name="value">
-                                        <xsl:value-of select="id" />
-                                    </xsl:attribute>
-                                    <xsl:value-of select="name" />
-                                </option>
-                            </xsl:for-each>
-                        </select>
-                    </dd>
-                </fieldset>
-                <div class="form-buttons">
-                    <xsl:if test="editable">
-                        <input type="submit" name="save_activity" 
onclick="return allOK();">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="php:function('lang', 
'save')" />
-                            </xsl:attribute>
-                        </input>
-                    </xsl:if>
+                            </div>
+                        </dl>
+                    </div>
                 </div>
-            </dl>
-        </form>
+            </form>
+        </div>
     </div>
     <script type="text/javascript">
         var org_id = $('#organization_id').val();

Modified: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_edit_step_1.xsl
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_edit_step_1.xsl
    2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_edit_step_1.xsl
    2015-12-04 23:46:55 UTC (rev 14526)
@@ -32,8 +32,8 @@
                         </dt>
                         <dd>
                             <div id="activity_select">
-                                <select name="activity_id" id="activity_id">
-                                    <option value="0">Ingen aktivitet 
valgt</option>
+                                <select name="activity_id" id="activity_id" 
data-validation="required" data-validation-error-msg="Du må velge en aktivitet 
som skal endres!">
+                                    <option value="">Ingen aktivitet 
valgt</option>
                                 </select>
                             </div>
                             <br /><br />

Modified: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new.xsl
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new.xsl
    2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new.xsl
    2015-12-04 23:46:55 UTC (rev 14526)
@@ -15,339 +15,362 @@
         <div class="pageTop">
             <h1><xsl:value-of select="php:function('lang', 'new_activity')" 
/></h1>
             <div><xsl:value-of select="php:function('lang', 
'required_fields')" /></div>
-        </div>
-        <form action="" method="POST" name="form" id="form">
-            <input type="hidden" name="id">
-                <xsl:attribute name="value">
-                    <xsl:value-of select="activity/id" />
-                </xsl:attribute>
-            </input>
-            <input type="hidden" name="organization_id">
-                <xsl:attribute name="value">
-                    <xsl:value-of select="organization_id" />
-                </xsl:attribute>
-            </input>
-            <xsl:if test="new_organization = 1">
-                <input type="hidden" name="new_organization" value="yes" />
-            </xsl:if>
-            <input type="hidden" name="new_arena_hidden" id="new_arena_hidden" 
value="" />
-            <dl class="proplist-col">
-                <fieldset>
-                    <xsl:attribute name="title">
-                        <xsl:value-of select="php:function('lang', 'what')" />
-                    </xsl:attribute>
-                    <legend>Hva</legend>
-                    <dt>
-                        <label for="title">
-                            <xsl:value-of select="php:function('lang', 
'activity_title')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_title')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <input type="text" name="title" id="title" size="83" 
maxlength="254">
+        
+            <form action="" method="POST" name="form" id="form">
+                <div class="pure-g">
+                    <div class="pure-u-1">
+                        <input type="hidden" name="id">
                             <xsl:attribute name="value">
-                                <xsl:value-of select="activity/title" />
+                                <xsl:value-of select="activity/id" />
                             </xsl:attribute>
                         </input>
-                    </dd>
-                    <dt>
-                        <label for="org_description">
-                            <xsl:value-of select="php:function('lang', 
'description')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_description')" />');return 
false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <textarea cols="80" rows="4" name="description" 
id="description"></textarea>
-                    </dd>
-                    <dt>
-                        <label for="category">
-                            <xsl:value-of select="php:function('lang', 
'category')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_category')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <select name="category" id="category">
-                            <option value="">Ingen Kategori valgt</option>
-                            <xsl:variable name="current_category_id" 
select="categories/current_category_id" />
-                            <xsl:for-each select="categories/list">
-                                <option>
-                                    <xsl:attribute name="value">
-                                        <xsl:value-of select="id" />
-                                    </xsl:attribute>
-                                    <xsl:if test="../current_category_id = id">
-                                        <xsl:attribute name="selected">
-                                            <xsl:value-of select="selected" />
-                                        </xsl:attribute>
-                                    </xsl:if>
-                                    <xsl:value-of select="name" />
-                                </option>
-                            </xsl:for-each>
-                        </select>
-                    </dd>
-                </fieldset>
-                <fieldset id="hvem">
-                    <legend>For hvem</legend>
-                    <dt>
-                        <label for="target">
-                            <xsl:value-of select="php:function('lang', 
'target')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_target')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <xsl:for-each select="targets">
-                            <input name="target[]" type="checkbox">
-                                <xsl:if test="checked != ''">
-                                    <xsl:attribute name="checked">
-                                        <xsl:value-of select="checked" />
-                                    </xsl:attribute>
-                                </xsl:if>
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="id" />
-                                </xsl:attribute>
-                            </input>
-                            <xsl:value-of select="name" />
-                            <br />
-                        </xsl:for-each>
-                    </dd>
-                    <dt>
-                        <input type="checkbox" name="special_adaptation" 
id="special_adaptation" />
-                        <xsl:value-of select="concat(php:function('lang', 
'special_adaptation'), ' ')" />
-                        <a href="javascript:void(0);">
-                            <xsl:attribute name="onclick">
-                                alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_spec_adapt')" />');return false;
+                        <input type="hidden" name="organization_id">
+                            <xsl:attribute name="value">
+                                <xsl:value-of select="organization_id" />
                             </xsl:attribute>
-                            <img alt="Hjelp" src="{helpImg}" />
-                        </a>
-                    </dt>
-                </fieldset>
-                <fieldset title="hvor">
-                    <legend>Hvor og når</legend>
-                    <dt>
-                        <br />
-                        <label for="arena">
-                            <xsl:value-of select="php:function('lang', 
'location')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_location')" />');return false;
+                        </input>
+                        <xsl:if test="new_organization = 1">
+                            <input type="hidden" name="new_organization" 
value="yes" />
+                        </xsl:if>
+                        <input type="hidden" name="new_arena_hidden" 
id="new_arena_hidden" value="" />
+                        <dl class="proplist-col">
+                            <fieldset>
+                                <xsl:attribute name="title">
+                                    <xsl:value-of select="php:function('lang', 
'what')" />
                                 </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <select name="internal_arena_id" 
id="internal_arena_id" style="width:200px;">
-                            <option value="">Lokale ikke valgt</option>
-                            <optgroup>
-                                <xsl:attribute name="label">
-                                    <xsl:value-of select="php:function('lang', 
'building')" />
-                                </xsl:attribute>
-                                <xsl:for-each select="buildings">
-                                    <option>
-                                        <xsl:attribute name="value">
-                                            <xsl:value-of select="concat('i_', 
id)" />
+                                <legend>Hva</legend>
+                                <dt>
+                                    <label for="title">
+                                        <xsl:value-of 
select="php:function('lang', 'activity_title')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_title')" />');return false;
                                         </xsl:attribute>
-                                        <xsl:value-of select="name" />
-                                    </option>
-                                </xsl:for-each>
-                            </optgroup>
-                            <optgroup>
-                                <xsl:attribute name="label">
-                                    <xsl:value-of select="php:function('lang', 
'external_arena')" />
-                                </xsl:attribute>
-                                <xsl:for-each select="arenas">
-                                    <option>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <input type="text" name="title" id="title" 
class="pure-u-1 input-80" maxlength="254" data-validation="required" 
data-validation-error-msg="Navn på aktivitet må fylles ut!">
                                         <xsl:attribute name="value">
-                                            <xsl:value-of select="id" />
+                                            <xsl:value-of 
select="activity/title" />
                                         </xsl:attribute>
-                                        <xsl:attribute name="title">
-                                            <xsl:value-of select="name" />
+                                    </input>
+                                </dd>
+                                <dt>
+                                    <label for="org_description">
+                                        <xsl:value-of 
select="php:function('lang', 'description')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_description')" />');return 
false;
                                         </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <textarea class="pure-u-1 input-80" 
rows="4" name="description" id="description" data-validation="description 
description_length" ></textarea>
+                                </dd>
+                                <dt>
+                                    <label for="category">
+                                        <xsl:value-of 
select="php:function('lang', 'category')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_category')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <select name="category" id="category" 
class="pure-u-1 input-40" data-validation="required" 
data-validation-error-msg="Kategori må fylles ut!">
+                                        <option value="">Ingen Kategori 
valgt</option>
+                                        <xsl:variable 
name="current_category_id" select="categories/current_category_id" />
+                                        <xsl:for-each select="categories/list">
+                                            <option>
+                                                <xsl:attribute name="value">
+                                                    <xsl:value-of select="id" 
/>
+                                                </xsl:attribute>
+                                                <xsl:if 
test="../current_category_id = id">
+                                                    <xsl:attribute 
name="selected">
+                                                        <xsl:value-of 
select="selected" />
+                                                    </xsl:attribute>
+                                                </xsl:if>
+                                                <xsl:value-of select="name" />
+                                            </option>
+                                        </xsl:for-each>
+                                    </select>
+                                </dd>
+                            </fieldset>
+                            <fieldset id="hvem">
+                                <legend>For hvem</legend>
+                                <dt>
+                                    <label for="target">
+                                        <xsl:value-of 
select="php:function('lang', 'target')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_target')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <input type="hidden" 
data-validation="target" />
+                                    <xsl:for-each select="targets">
+                                        <input name="target[]" type="checkbox">
+                                            <xsl:if test="checked != ''">
+                                                <xsl:attribute name="checked">
+                                                    <xsl:value-of 
select="checked" />
+                                                </xsl:attribute>
+                                            </xsl:if>
+                                            <xsl:attribute name="value">
+                                                <xsl:value-of select="id" />
+                                            </xsl:attribute>
+                                        </input>
                                         <xsl:value-of select="name" />
-                                    </option>
-                                </xsl:for-each>
-                            </optgroup>
-                        </select>
-                        <br />
-                        <a id="displayText" href="javascript:toggle();">Ikke i 
listen? Registrer nytt lokale</a>
-                    </dd>
-                    <div style="overflow:auto;" id="toggleText">
-                        <dl>
-                            <dt>
-                                <label for="new_arena">
-                                    <xsl:value-of 
select="concat(php:function('lang', 'register_new_arena'),' ')" />
-                                    <a href="javascript:void(0);">
+                                        <br />
+                                    </xsl:for-each>
+                                </dd>
+                                <dt>
+                                    <input type="checkbox" 
name="special_adaptation" id="special_adaptation" />
+                                    <xsl:value-of 
select="concat(php:function('lang', 'special_adaptation'), ' ')" />
+                                    <a href="javascript:void(0);" 
class="helpLink">
                                         <xsl:attribute name="onclick">
-                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_arena')" />');return false;
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_spec_adapt')" />');return false;
                                         </xsl:attribute>
                                         <img alt="Hjelp" src="{helpImg}" />
                                     </a>
-                                </label>
-                            </dt>
-                            <dt>
-                                <label for="arena_name">
-                                    <xsl:value-of select="php:function('lang', 
'name')" /> (*) 
-                                    <a href="javascript:void(0);">
+                                </dt>
+                            </fieldset>
+                            <fieldset title="hvor">
+                                <legend>Hvor og når</legend>
+                                <dt>
+                                    <br />
+                                    <label for="arena">
+                                        <xsl:value-of 
select="php:function('lang', 'location')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
                                         <xsl:attribute name="onclick">
-                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_arena_name')" />');return false;
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_location')" />');return false;
                                         </xsl:attribute>
                                         <img alt="Hjelp" src="{helpImg}" />
                                     </a>
-                                </label>
-                            </dt>
-                            <dd>
-                                <input id="arena_name" name="arena_name" 
size="50" type="text" />
-                            </dd>
-                            <dt style="margin-right:20px;float:left;">
-                                <label for="arena_address">
-                                    Gateadresse (*) 
-                                    <a href="javascript:void(0);">
+                                </dt>
+                                <dd>
+                                    <select name="internal_arena_id" 
id="internal_arena_id" class="pure-u-1 input-40" 
data-validation="internal_arena_id">
+                                        <option value="">Lokale ikke 
valgt</option>
+                                        <optgroup>
+                                            <xsl:attribute name="label">
+                                                <xsl:value-of 
select="php:function('lang', 'building')" />
+                                            </xsl:attribute>
+                                            <xsl:for-each select="buildings">
+                                                <option>
+                                                    <xsl:attribute 
name="value">
+                                                        <xsl:value-of 
select="concat('i_', id)" />
+                                                    </xsl:attribute>
+                                                    <xsl:value-of 
select="name" />
+                                                </option>
+                                            </xsl:for-each>
+                                        </optgroup>
+                                        <optgroup>
+                                            <xsl:attribute name="label">
+                                                <xsl:value-of 
select="php:function('lang', 'external_arena')" />
+                                            </xsl:attribute>
+                                            <xsl:for-each select="arenas">
+                                                <option>
+                                                    <xsl:attribute 
name="value">
+                                                        <xsl:value-of 
select="id" />
+                                                    </xsl:attribute>
+                                                    <xsl:attribute 
name="title">
+                                                        <xsl:value-of 
select="name" />
+                                                    </xsl:attribute>
+                                                    <xsl:value-of 
select="name" />
+                                                </option>
+                                            </xsl:for-each>
+                                        </optgroup>
+                                    </select>
+                                    <br />
+                                    <a id="displayText" 
href="javascript:toggle();">Ikke i listen? Registrer nytt lokale</a>
+                                </dd>
+                                <div style="overflow:auto;" id="toggleText">
+                                    <dl>
+                                        <dt>
+                                            <label for="new_arena">
+                                                <xsl:value-of 
select="concat(php:function('lang', 'register_new_arena'),' ')" />
+                                            </label>
+                                            <a href="javascript:void(0);" 
class="helpLink">
+                                                <xsl:attribute name="onclick">
+                                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_arena')" />');return false;
+                                                </xsl:attribute>
+                                                <img alt="Hjelp" 
src="{helpImg}" />
+                                            </a>
+                                        </dt>
+                                        <dt>
+                                            <label for="arena_name">
+                                                <xsl:value-of 
select="php:function('lang', 'name')" /> (*)
+                                            </label>
+                                            <a href="javascript:void(0);" 
class="helpLink">
+                                                <xsl:attribute name="onclick">
+                                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_arena_name')" />');return false;
+                                                </xsl:attribute>
+                                                <img alt="Hjelp" 
src="{helpImg}" />
+                                            </a>
+                                        </dt>
+                                        <dd>
+                                            <input id="arena_name" 
name="arena_name" class="pure-u-1 input-50" type="text" />
+                                        </dd>
+                                        <div class="input-part-1">
+                                            <dt>
+                                                <label for="arena_address">
+                                                    Gateadresse (*)
+                                                </label>
+                                                <a href="javascript:void(0);" 
class="helpLink">
+                                                    <xsl:attribute 
name="onclick">
+                                                        alert('<xsl:value-of 
select="php:function('lang', 'help_new_arena_address')" />');return false;
+                                                    </xsl:attribute>
+                                                    <img alt="Hjelp" 
src="{helpImg}" />
+                                                </a>
+                                                <br />
+                                            </dt>
+                                            <dd>
+                                                <input id="arena_address" 
onkeyup="javascript:get_address_search_arena()" name="arena_address" 
class="pure-u-1 input-50" type="text" /><br />
+                                                <div 
id="arena_address_container" />
+                                            </dd>
+                                        </div>
+                                        <div class="input-part-2">
+                                            <dt>
+                                                <label 
for="arena_number">Husnummer</label><br />
+                                            </dt>
+                                            <dd>
+                                                <input type="text" 
name="arena_number" class="pure-u-1 input-5" />
+                                            </dd>
+                                        </div>
+                                        <div class="input-part-1">
+                                            <dt>
+                                                <label 
for="postaddress">Postnummer (*)</label><br />
+                                            </dt>
+                                            <dd>
+                                                <input type="text" 
name="postaddress" class="pure-u-1 input-5" />
+                                            </dd>
+                                        </div>
+                                        <div class="input-part-2">
+                                            <dt>
+                                                <label 
for="arena_postaddress">Poststed (*)</label><br />
+                                            </dt>
+                                            <dd>
+                                                <input type="text" 
name="arena_postaddress" class="pure-u-1 input-40" />
+                                            </dd>
+                                        </div>
+                                        <br />
+                                    </dl>
+                                </div>
+                                <dt>
+                                    <br />
+                                    <label for="district">
+                                        <xsl:value-of 
select="php:function('lang', 'district')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
                                         <xsl:attribute name="onclick">
-                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_arena_address')" />');return false;
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_district')" />');return false;
                                         </xsl:attribute>
                                         <img alt="Hjelp" src="{helpImg}" />
                                     </a>
-                                </label><br />
-                                <input id="arena_address" 
onkeyup="javascript:get_address_search_arena()" name="arena_address" size="50" 
type="text" /><br />
-                                <div id="arena_address_container" />
-                            </dt>
-                            <dt style="clear:right;float:left">
-                                <label for="arena_number">Husnummer</label><br 
/>
-                                <input type="text" name="arena_number" 
size="5" />
-                            </dt><br />
-                            <dt 
style="clear:left;margin-right:20px;float:left;">
-                                <label for="postaddress">Postnummer 
(*)</label><br />
-                                <input type="text" name="postaddress" size="5" 
/>
-                            </dt>
-                            <dt style="float:left;">
-                                <label for="arena_postaddress">Poststed 
(*)</label><br />
-                                <input type="text" name="arena_postaddress" 
size="40" />
-                            </dt>
+                                </dt>
+                                <dd>
+                                    <input type="hidden" 
data-validation="district" />
+                                    <xsl:for-each select="districts">
+                                        <input name="district" type="radio">
+                                            <xsl:attribute name="value">
+                                                <xsl:value-of 
select="part_of_town_id" />
+                                            </xsl:attribute>
+                                        </input>
+                                        <xsl:value-of select="name" />
+                                        <br />
+                                    </xsl:for-each>
+                                </dd>
+                                <dt>
+                                    <br />
+                                    <label for="time">
+                                        <xsl:value-of 
select="php:function('lang', 'time')" /> (*)
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_time')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <input type="text" name="time" id="time" 
class="pure-u-1 input-80" maxlength="254" data-validation="required" 
data-validation-error-msg="Dag og tid må fylles ut!">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="activity/time" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                            </fieldset>
+                            <fieldset id="arr">
+                                <legend>Kontaktperson</legend><br />
+                                Kontaktperson for aktiviteten 
+                                <a href="javascript:void(0);" class="helpLink">
+                                    <xsl:attribute name="onclick">
+                                        alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_contact_person')" />');return 
false;
+                                    </xsl:attribute>
+                                    <img alt="Hjelp" src="{helpImg}" />
+                                </a><br />
+                                <dt><label for="contact_name">Navn 
(*)</label></dt>
+                                <dd><input type="text" name="contact_name" 
id="contact_name" class="pure-u-1 input-80" data-validation="required" 
data-validation-error-msg="Navn på kontaktperson må fylles ut!" /></dd>
+                                <dt><label for="contact_phone">Telefon 
(*)</label></dt>
+                                <dd><input type="text" name="contact_phone" 
id="contact_phone" data-validation="contact_phone contact_phone_length" /></dd>
+                                <dt><label for="contact_mail">E-post 
(*)</label></dt>
+                                <dd><input type="text" name="contact_mail" 
id="contact_mail" class="pure-u-1 input-50" data-validation="contact_mail" 
/></dd>
+                                <dt><label for="contact_mail2">Gjenta e-post 
(*)</label></dt>
+                                <dd><input type="text" name="contact_mail2" 
id="contact_mail2" class="pure-u-1 input-50" data-validation="contact_mail2 
contact_mail2_confirm" /></dd>
+                            </fieldset>
+                            <fieldset>
+                                <br />
+                                <dt>
+                                    <label for="office">
+                                        Hvilket kulturkontor skal motta 
registreringen (*) 
+                                    </label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_office')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <select name="office" id="office" 
data-validation="required" data-validation-error-msg="Hovedansvarlig 
kulturkontor må fylles ut!">
+                                        <option value="">Ingen kontor 
valgt</option>
+                                        <xsl:for-each select="offices/list">
+                                            <option>
+                                                <xsl:if 
test="../selected_office = id">
+                                                    <xsl:attribute 
name="selected">
+                                                        selected
+                                                    </xsl:attribute>
+                                                </xsl:if>
+                                                <xsl:attribute name="value">
+                                                    <xsl:value-of select="id" 
/>
+                                                </xsl:attribute>
+                                                <xsl:value-of select="name" />
+                                            </option>
+                                        </xsl:for-each>
+                                    </select>
+                                </dd>
+                            </fieldset>
                             <br />
+                            <div clas="form-buttons">
+                                <input type="submit" name="save_activity">
+                                    <xsl:attribute name="value">
+                                        <xsl:value-of 
select="php:function('lang', 'save_activity')" />
+                                    </xsl:attribute>
+                                </input>
+                            </div>
                         </dl>
                     </div>
-                    <dt>
-                        <br />
-                        <label for="district">
-                            <xsl:value-of select="php:function('lang', 
'district')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_district')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <xsl:for-each select="districts">
-                            <input name="district" type="radio">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="part_of_town_id" />
-                                </xsl:attribute>
-                            </input>
-                            <xsl:value-of select="name" />
-                            <br />
-                        </xsl:for-each>
-                    </dd>
-                    <dt>
-                        <br />
-                        <label for="time">
-                            <xsl:value-of select="php:function('lang', 
'time')" /> (*) 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_time')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <input type="text" name="time" id="time" size="80" 
maxlength="254">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="activity/time" />
-                            </xsl:attribute>
-                        </input>
-                    </dd>
-                </fieldset>
-                <fieldset id="arr">
-                    <legend>Kontaktperson</legend><br />
-                    Kontaktperson for aktiviteten 
-                    <a href="javascript:void(0);">
-                        <xsl:attribute name="onclick">
-                            alert('<xsl:value-of select="php:function('lang', 
'help_new_activity_contact_person')" />');return false;
-                        </xsl:attribute>
-                        <img alt="Hjelp" src="{helpImg}" />
-                    </a><br />
-                    <dt><label for="contact_name">Navn (*)</label></dt>
-                    <dd><input type="text" name="contact_name" 
id="contact_name" size="80" /></dd>
-                    <dt><label for="contact_phone">Telefon (*)</label></dt>
-                    <dd><input type="text" name="contact_phone" 
id="contact_phone" /></dd>
-                    <dt><label for="contact_mail">E-post (*)</label></dt>
-                    <dd><input type="text" name="contact_mail" 
id="contact_mail" size="50" /></dd>
-                    <dt><label for="contact_mail2">Gjenta e-post 
(*)</label></dt>
-                    <dd><input type="text" name="contact_mail2" 
id="contact_mail2" size="50" /></dd>
-                </fieldset>
-                <fieldset>
-                    <br />
-                    <dt>
-                        <label for="office">
-                            Hvilket kulturkontor skal motta registreringen (*) 
-                        </label>
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_office')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        
-                    </dt>
-                    <dd>
-                        <select name="office" id="office">
-                            <option value="0">Ingen kontor valgt</option>
-                            <xsl:for-each select="offices/list">
-                                <option>
-                                    <xsl:if test="../selected_office = id">
-                                        <xsl:attribute name="selected">
-                                            selected
-                                        </xsl:attribute>
-                                    </xsl:if>
-                                    <xsl:attribute name="value">
-                                        <xsl:value-of select="id" />
-                                    </xsl:attribute>
-                                    <xsl:value-of select="name" />
-                                </option>
-                            </xsl:for-each>
-                        </select>
-                    </dd>
-                </fieldset>
-                <br />
-                <div clas="form-buttons">
-                    <input type="submit" name="save_activity" onclick="return 
allOK();">
-                        <xsl:attribute name="value">
-                            <xsl:value-of select="php:function('lang', 
'save_activity')" />
-                        </xsl:attribute>
-                    </input>
                 </div>
-            </dl>
-        </form>
+            </form>
+        </div>
     </div>
 </xsl:template>

Modified: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new_org.xsl
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new_org.xsl
        2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new_org.xsl
        2015-12-04 23:46:55 UTC (rev 14526)
@@ -33,7 +33,7 @@
                 <dt><label for="district">Bydel (*)</label></dt>
                 <dd>
                     <select name="org_district">
-                        <option value="0">Ingen bydel valgt</option>
+                        <option value="">Ingen bydel valgt</option>
                         <xsl:for-each select="districts">
                             <option value=""></option>
                         </xsl:for-each>

Modified: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new_step_1.xsl
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new_step_1.xsl
     2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/activity_new_step_1.xsl
     2015-12-04 23:46:55 UTC (rev 14526)
@@ -3,127 +3,148 @@
         <div class="pageTop">
             <h1><xsl:value-of select="php:function('lang', 
'new_activity_helptext')" /></h1>
             <form method="POST" name="form" id="form">
-                <input type="hidden" name="organization_id_hidden" 
id="organization_id_hidden" value="" />
-                <fieldset>
-                    <dl class="proplist-col">
-                        <legend><xsl:value-of select="php:function('lang', 
'responsible')" /></legend>
-                        <dt>
-                            <label for="organization_id"><xsl:value-of 
select="php:function('lang', 'choose_org')" /></label>
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_choose_activity_org')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </dt>
-                        <dd>
-                            <select name="organization_id" 
id="organization_id">
-                                <option value="">Ingen organisasjon 
valgt</option>
-                                <xsl:for-each select="organizations">
-                                    <option>
-                                        <xsl:attribute name="value">
-                                            <xsl:value-of select="id" />
+                <div class="pure-g">
+                    <div class="pure-u-1">
+                        <input type="hidden" name="organization_id_hidden" 
id="organization_id_hidden" value="" />
+                        <fieldset>
+                            <dl class="proplist-col">
+                                <legend><xsl:value-of 
select="php:function('lang', 'responsible')" /></legend>
+                                <dt>
+                                    <label for="organization_id"><xsl:value-of 
select="php:function('lang', 'choose_org')" /></label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_choose_activity_org')" />');return false;
                                         </xsl:attribute>
-                                        <xsl:value-of select="name" />
-                                    </option>
-                                </xsl:for-each>
-                            </select>
-                        </dd>
-                        <a id="displayText3" href="javascript:void(0);">Ikke i 
listen? Registrer ny organisasjon</a><br />
-                        <dt>
-                            <div style="overflow:hidden;" id="toggleText3">
-                                <dl>
-                                    <div style="overflow:hidden;">
-                                        <p>
-                                            Registrer ny organisasjon
-                                            <a href="javascript:void(0);">
-                                                <xsl:attribute name="onclick">
-                                                    alert('<xsl:value-of 
select="php:function('lang', 'help_new_activity_org')" />');return false;
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <select name="organization_id" 
id="organization_id" class="pure-u-1 input-80" 
data-validation="organization_id">
+                                        <option value="">Ingen organisasjon 
valgt</option>
+                                        <xsl:for-each select="organizations">
+                                            <option>
+                                                <xsl:attribute name="value">
+                                                    <xsl:value-of select="id" 
/>
                                                 </xsl:attribute>
-                                                <img alt="Hjelp" 
src="{helpImg}" />
-                                            </a>
-                                        </p>
-                                        Felt merket med (*) er påkrevde felt 
<br /><br />
-                                        <dt>
-                                            <label 
for="orgname">Organisasjonsnavn (*)</label>
-                                            <a href="javascript:void(0);">
-                                                <xsl:attribute name="onclick">
-                                                    alert('<xsl:value-of 
select="php:function('lang', 'help_organization_name')" />');return false;
-                                                </xsl:attribute>
-                                                <img alt="Hjelp" 
src="{helpImg}" />
-                                            </a>
-                                        </dt>
-                                        <dd><input type="text" name="orgname" 
id="orgname" size="80" maxlength="254" /></dd>
-                                        <dt><label 
for="orgno">Organisasjonsnummer</label></dt>
-                                        <dd><input type="text" name="orgno" 
maxlength="254" /></dd>
-                                        <dt 
style="margin-right:20px;float:left;">
-                                            <label for="street">
-                                                Gateadresse
-                                                <a href="javascript:void(0);">
+                                                <xsl:value-of select="name" />
+                                            </option>
+                                        </xsl:for-each>
+                                    </select>
+                                </dd>
+                                <a id="displayText3" 
href="javascript:void(0);">Ikke i listen? Registrer ny organisasjon</a><br />
+                                <dt>
+                                    <div style="overflow:hidden;" 
id="toggleText3">
+                                        <dl>
+                                            <div style="overflow:hidden;">
+                                                <p>
+                                                    Registrer ny organisasjon
+                                                    <a 
href="javascript:void(0);" class="helpLink">
+                                                        <xsl:attribute 
name="onclick">
+                                                            
alert('<xsl:value-of select="php:function('lang', 'help_new_activity_org')" 
/>');return false;
+                                                        </xsl:attribute>
+                                                        <img alt="Hjelp" 
src="{helpImg}" />
+                                                    </a>
+                                                </p>
+                                                Felt merket med (*) er 
påkrevde felt <br /><br />
+                                                <dt>
+                                                    <label 
for="orgname">Organisasjonsnavn (*)</label>
+                                                    <a 
href="javascript:void(0);" class="helpLink">
+                                                        <xsl:attribute 
name="onclick">
+                                                            
alert('<xsl:value-of select="php:function('lang', 'help_organization_name')" 
/>');return false;
+                                                        </xsl:attribute>
+                                                        <img alt="Hjelp" 
src="{helpImg}" />
+                                                    </a>
+                                                </dt>
+                                                <dd><input type="text" 
name="orgname" id="orgname" maxlength="254" class="pure-u-1 input-80" /></dd>
+                                                <dt><label 
for="orgno">Organisasjonsnummer</label></dt>
+                                                <dd><input type="text" 
name="orgno" maxlength="254" /></dd>
+                                                <div class="input-part-1">
+                                                    <dt>
+                                                        <label for="street">
+                                                            Gateadresse
+                                                        </label>
+                                                        <a 
href="javascript:void(0);" class="helpLink">
+                                                            <xsl:attribute 
name="onclick">
+                                                                
alert('<xsl:value-of select="php:function('help_streetaddress')" />');return 
false;
+                                                            </xsl:attribute>
+                                                            <img alt="Hjelp" 
src="{helpImg}" />
+                                                        </a>
+                                                    </dt>
+                                                    <dd>
+                                                        <input id="address" 
onkeyup="javascript:get_address_search()" name="address" class="pure-u-1 
input-50" type="text" /><br />
+                                                        <div 
id="address_container" />
+                                                    </dd>
+                                                </div>
+                                                <div class="input-part-2">
+                                                    <dt>
+                                                        <label 
for="number">Husnummer</label><br />
+                                                    </dt>
+                                                    <dd>
+                                                        <input name="number" 
class="pure-u-1 input-5" type="text" />
+                                                    </dd>
+                                                </div>
+                                                <div class="input-part-1">
+                                                    <dt>
+                                                        <label 
for="postzip">Postnummer</label><br />
+                                                    </dt>
+                                                    <dd>
+                                                        <input name="postzip" 
class="pure-u-1 input-5" type="text" />
+                                                    </dd>
+                                                </div>
+                                                <div class="input-part-2">
+                                                    <dt>
+                                                        <label 
for="postaddress">Poststed</label><br />
+                                                    </dt>
+                                                    <dd>
+                                                        <input 
name="postaddress" class="pure-u-1 input-40" type="text" />
+                                                    </dd>
+                                                </div>
+                                                <br /><br />
+                                            </div>
+                                            <dt>
+                                                <label for="homepage">
+                                                    Hjemmeside
+                                                </label>
+                                                <a href="javascript:void(0);" 
class="helpLink">
                                                     <xsl:attribute 
name="onclick">
-                                                        alert('<xsl:value-of 
select="php:function('help_streetaddress')" />');return false;
+                                                        alert('<xsl:value-of 
select="php:function('lang', 'help_homepage')" />');return false;
                                                     </xsl:attribute>
                                                     <img alt="Hjelp" 
src="{helpImg}" />
                                                 </a>
-                                            </label><br />
-                                            <input id="address" 
onkeyup="javascript:get_address_search()" name="address" size="50" type="text" 
/><br />
-                                            <div id="address_container" />
-                                        </dt>
-                                        <dt style="clear:right;float:left;">
-                                            <label 
for="number">Husnummer</label><br />
-                                            <input name="number" size="5" 
type="text" />
-                                        </dt><br />
-                                        <dt 
style="clear:left;margin-right:20px;float:left;">
-                                            <label 
for="postzip">Postnummer</label><br />
-                                            <input name="postzip" size="5" 
type="text" />
-                                        </dt>
-                                        <dt style="float:left;">
-                                            <label 
for="postaddress">Poststed</label><br />
-                                            <input name="postaddress" 
size="40" type="text" />
-                                        </dt><br /><br />
+                                            </dt>
+                                            <dd><input name="homepage" 
value="http://"; class="pure-u-1 input-80" type="text" maxlength="254" 
/></dd><br /><br />
+                                            <div style="overflow:hidden;">
+                                                Kontaktperson for 
organisasjonen 
+                                                <a href="javascript:void(0);" 
class="helpLink">
+                                                    <xsl:attribute 
name="onclick">
+                                                        alert('<xsl:value-of 
select="php:function('lang', 'help_contact_person')" />');return false;
+                                                    </xsl:attribute>
+                                                    <img alt="Hjelp" 
src="{helpImg}" />
+                                                </a><br />
+                                                <dt><label 
for="contact1_name">Navn (*)</label></dt>
+                                                <dd><input 
name="org_contact1_name" id="org_contact1_name" type="text" class="pure-u-1 
input-80" maxlength="254" /></dd>
+                                                <dt><label 
for="contact1_phone">Telefon (*)</label></dt>
+                                                <dd><input 
name="org_contact1_phone" id="org_contact1_phone" type="text" /></dd>
+                                                <dt><label 
for="contact1_mail">E-post (*)</label></dt>
+                                                <dd><input 
name="org_contact1_mail" id="org_contact1_mail" type="text" class="pure-u-1 
input-50" /></dd>
+                                                <dt><label 
for="contact2_mail">Gjenta e-post (*)</label></dt>
+                                                <dd><input 
name="org_contact2_mail" id="org_contact2_mail" type="text" class="pure-u-1 
input-50" /></dd>
+                                            </div>
+                                        </dl>
                                     </div>
-                                    <dt>
-                                        <label for="homepage">
-                                            Hjemmeside 
-                                            <a href="javascript:void(0);">
-                                                <xsl:attribute name="onclick">
-                                                    alert('<xsl:value-of 
select="php:function('lang', 'help_homepage')" />');return false;
-                                                </xsl:attribute>
-                                                <img alt="Hjelp" 
src="{helpImg}" />
-                                            </a>
-                                        </label>
-                                    </dt>
-                                    <dd><input name="homepage" value="http://"; 
size="80" type="text" maxlength="254" /></dd><br /><br />
-                                    <div style="overflow:hidden;">
-                                        Kontaktperson for organisasjonen 
-                                        <a href="javascript:void(0);">
-                                            <xsl:attribute name="onclick">
-                                                alert('<xsl:value-of 
select="php:function('lang', 'help_contact_person')" />');return false;
-                                            </xsl:attribute>
-                                            <img alt="Hjelp" src="{helpImg}" />
-                                        </a><br />
-                                        <dt><label for="contact1_name">Navn 
(*)</label></dt>
-                                        <dd><input name="org_contact1_name" 
id="org_contact1_name" type="text" size="80" maxlength="254" /></dd>
-                                        <dt><label 
for="contact1_phone">Telefon (*)</label></dt>
-                                        <dd><input name="org_contact1_phone" 
id="org_contact1_phone" type="text" /></dd>
-                                        <dt><label for="contact1_mail">E-post 
(*)</label></dt>
-                                        <dd><input name="org_contact1_mail" 
id="org_contact1_mail" type="text" size="50" /></dd>
-                                        <dt><label for="contact2_mail">Gjenta 
e-post (*)</label></dt>
-                                        <dd><input name="org_contact2_mail" 
id="org_contact2_mail" type="text" size="50" /></dd>
-                                    </div>
-                                </dl>
-                            </div>
-                        </dt>
-                        <br /><br />
-                        <div class="form-buttons">
-                            <input type="submit" name="step_1" onclick="return 
isOK();">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="php:function('lang', 
'next')" />
-                                </xsl:attribute>
-                            </input>
-                        </div>
-                    </dl>
-                </fieldset>
+                                </dt>
+                                <br /><br />
+                                <div class="form-buttons">
+                                    <input type="submit" name="step_1">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="php:function('lang', 'next')" />
+                                        </xsl:attribute>
+                                    </input>
+                                </div>                            
+                            </dl>
+                        </fieldset>
+                    </div>
+                </div>
             </form>
         </div>
     </div>

Modified: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/css/base.css
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/css/base.css    
    2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/css/base.css    
    2015-12-04 23:46:55 UTC (rev 14526)
@@ -264,5 +264,4 @@
        color: white;
 }
 
-h1 {font-size: 2em;letter-spacing: 0;}
-a {text-decoration: underline;}
\ No newline at end of file
+h1 {font-size: 2em}

Added: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/css/style.css
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/css/style.css   
                            (rev 0)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/css/style.css   
    2015-12-04 23:46:55 UTC (rev 14526)
@@ -0,0 +1,57 @@
+#wrapper {max-width: 1000px;width: 95%;}
+
+h1 {font-size: 2em;letter-spacing: 0;}
+a {text-decoration: underline;}
+
+dd {margin-left: 0px;}
+fieldset {border: none;border-top: 1px dashed rgb(167, 127, 0);padding: 
0px;margin: 0;margin-top: 2.5em;width: 100%;}
+
+#line {margin: 0 auto;width: 96%;}
+.pageTop {padding: 0 2em;}
+
+#frontend dl.proplist-col {box-sizing: border-box;max-width: 600px;padding: 0 
2em;width: 100%;}
+
+/*.pure-g {letter-spacing: normal;}*/
+
+.pure-g [class*="pure-u"] {padding: 0;}
+.pure-g [class*="pure-u"] button,
+.pure-g [class*="pure-u"] input,
+.pure-g [class*="pure-u"] select,
+.pure-g [class*="pure-u"] textarea {max-width: 100%;}
+
+.pure-g [class*="pure-u"] input,
+.pure-g [class*="pure-u"] select,
+.pure-g [class*="pure-u"] textarea {padding: 2px !important;}
+
+/*input[class*="pure-u"],
+textarea[class*="pure-u"],
+select[class*="pure-u"] {padding: 2px !important;}*/
+
+
+.input-80 {max-width: 420px !important;width: 420px !important;}
+.input-50 {max-width: 270px !important;width: 270px !important;}
+.input-40 {max-width: 220px !important;width: 220px !important;}
+.input-20 {max-width: 120px !important;width: 120px !important;}
+.input-5 {max-width: 45px !important;width: 45px !important;}
+
+.input-part-1 {clear:left;margin-right:20px;float:left;}
+.input-part-2 {float: left;}
+
+.helpLink {display: inline-block;margin-left: 5px;vertical-align: middle;}
+.helpLink img {display: block;}
+
+.error,
+.valid {box-shadow: 0 0 0 transparent inset !important;}
+.valid {border: 1px solid #468847;}
+
+select.error,
+select.valid {background-position: right 18px center !important;}
+
address@hidden only screen and (max-width: 555px) {
+    .input-80 {width: 100% !important;}
+    .input-50 {width: 100% !important;}
+    .input-40 {width: 100% !important;}
+    .input-20 {width: 100% !important;}
+    .input-5 {width: 100% !important;}
+    .input-part-2 {clear: left;}
+}
\ No newline at end of file

Modified: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/organization_edit.xsl
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/organization_edit.xsl
       2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/organization_edit.xsl
       2015-12-04 23:46:55 UTC (rev 14526)
@@ -15,153 +15,173 @@
         <div class="pageTop">
             <h1><xsl:value-of select="php:function('lang', 
'edit_organization')" /></h1>
             <form action="" method="post" name="form" id="form">
-                <dl class="proplist-col">
-                    <input type="hidden" name="organization_id" 
id="organization_id">
-                        <xsl:attribute name="value">
-                            <xsl:value-of select="organization/id" />
-                        </xsl:attribute>
-                    </input>
-                    <div style="overflow:auto;">
-                        <p>
-                            Endre organisasjon 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_edit_activity_org')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </p>
-                        Felt merket med (*) er påkrevde felt <br /><br />
-                        <p></p>
-                        <dt>
-                            <label for="orgname">Organisasjonsnavn (*)</label>
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang' , 'help_organization_name')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </dt>
-                        <dd>
-                            <input type="text" name="orgname" id="orgname" 
size="80" maxlength="254">
+                <div class="pure-g">
+                    <div class="pure-u-1">
+                        <dl class="proplist-col">
+                            <input type="hidden" name="organization_id" 
id="organization_id">
                                 <xsl:attribute name="value">
-                                    <xsl:value-of select="organization/name" />
+                                    <xsl:value-of select="organization/id" />
                                 </xsl:attribute>
                             </input>
-                        </dd>
-                        <dt><label for="orgno">Organisasjonsnummer</label></dt>
-                        <dd>
-                            <input type="text" name="orgno" maxlength="254">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="organization/number" 
/>
-                                </xsl:attribute>
-                            </input>
-                        </dd>
-                        <dt style="margin-right:20px;float:left;">
-                            <label for="street">Gateadresse</label>
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_streetaddress')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                            <br />
-                            <input type="text" name="address" id="address" 
onkeyup="javascript:get_address_search()" size="50">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of 
select="organization/address" />
-                                </xsl:attribute>
-                            </input>
-                            <br />
-                            <div id="address_container" />
-                        </dt>
-                        <dt style="clear:right;float:left;">
-                            <label for="number">Husnummer</label><br />
-                            <input type="text" name="number" size="5" />
-                        </dt><br />
-                        <dt style="clear:left;margin-right:20px;float:left;">
-                            <label for="postzip">Postnummer</label><br />
-                            <input type="text" name="postzip" size="5">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of 
select="organization/zip_code" />
-                                </xsl:attribute>
-                            </input>
-                        </dt>
-                        <dt style="float:left;">
-                            <label for="postaddress">Poststed</label><br />
-                            <input type="text" name="postaddress" size="40">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of select="organization/city" />
-                                </xsl:attribute>
-                            </input>
-                        </dt><br /><br />
+                            <div style="overflow:auto;">
+                                <p>
+                                    Endre organisasjon 
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang', 'help_edit_activity_org')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </p>
+                                Felt merket med (*) er påkrevde felt <br /><br 
/>
+                                <p></p>
+                                <dt>
+                                    <label for="orgname">Organisasjonsnavn 
(*)</label>
+                                    <a href="javascript:void(0);" 
class="helpLink">
+                                        <xsl:attribute name="onclick">
+                                            alert('<xsl:value-of 
select="php:function('lang' , 'help_organization_name')" />');return false;
+                                        </xsl:attribute>
+                                        <img alt="Hjelp" src="{helpImg}" />
+                                    </a>
+                                </dt>
+                                <dd>
+                                    <input type="text" name="orgname" 
id="orgname" class="pure-u-1 input-80" maxlength="254" 
data-validation="required" data-validation-error-msg="Organisasjonsnavn må 
fylles ut!">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="organization/name" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <dt><label 
for="orgno">Organisasjonsnummer</label></dt>
+                                <dd>
+                                    <input type="text" name="orgno" 
maxlength="254">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="organization/number" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <div class="input-part-1">
+                                    <dt>
+                                        <label for="street">Gateadresse</label>
+                                        <a href="javascript:void(0);" 
class="helpLink">
+                                            <xsl:attribute name="onclick">
+                                                alert('<xsl:value-of 
select="php:function('lang', 'help_streetaddress')" />');return false;
+                                            </xsl:attribute>
+                                            <img alt="Hjelp" src="{helpImg}" />
+                                        </a>
+                                    </dt>
+                                    <dd>
+                                        <input type="text" name="address" 
id="address" onkeyup="javascript:get_address_search()" class="pure-u-1 
input-50">
+                                            <xsl:attribute name="value">
+                                                <xsl:value-of 
select="organization/address" />
+                                            </xsl:attribute>
+                                        </input>
+                                        <br />
+                                        <div id="address_container" />
+                                    </dd>
+                                </div>
+                                <div class="input-part-2">
+                                    <dt style="clear:right;float:left;">
+                                        <label 
for="number">Husnummer</label><br />
+                                    </dt>
+                                    <dd>
+                                        <input type="text" name="number" 
class="pure-u-1 input-5" />
+                                    </dd>
+                                </div>
+                                <div class="input-part-1">
+                                    <dt 
style="clear:left;margin-right:20px;float:left;">
+                                        <label 
for="postzip">Postnummer</label><br />
+                                    </dt>
+                                    <dd>
+                                        <input type="text" name="postzip" 
class="pure-u-1 input-5">
+                                            <xsl:attribute name="value">
+                                                <xsl:value-of 
select="organization/zip_code" />
+                                            </xsl:attribute>
+                                        </input>
+                                    </dd>
+                                </div>
+                                <div class="input-part-2">
+                                    <dt style="float:left;">
+                                        <label 
for="postaddress">Poststed</label><br />
+
+                                    </dt>
+                                    <dd>
+                                        <input type="text" name="postaddress" 
class="pure-u-1 input-40">
+                                            <xsl:attribute name="value">
+                                                <xsl:value-of 
select="organization/city" />
+                                            </xsl:attribute>
+                                        </input>
+                                    </dd>
+                                </div>
+                            </div>
+                            <dt>
+                                <label for="homepage">
+                                    Hjemmeside
+                                </label>
+                                <a href="javascript:void(0);" class="helpLink">
+                                    <xsl:attribute name="onclick">
+                                        alert('<xsl:value-of 
select="php:function('lang', 'help_homepage')" />');return false;
+                                    </xsl:attribute>
+                                    <img alt="Hjelp" src="{helpImg}" />
+                                </a>
+                            </dt>
+                            <dd>
+                                <input type="text" name="homepage" 
class="pure-u-1 input-80">
+                                    <xsl:attribute name="value">
+                                        <xsl:value-of 
select="organization/homepage" />
+                                    </xsl:attribute>
+                                </input>
+                            </dd><br /><br />
+                            <div style="overflow:auto;">
+                                Kontaktperson for organisasjonen 
+                                <a href="javascript:void(0);" class="helpLink">
+                                    <xsl:attribute name="onclick">
+                                        alert('<xsl:value-of 
select="php:function('lang', 'help_contact_person')" />');return false;
+                                    </xsl:attribute>
+                                    <img alt="Hjelp" src="{helpImg}" />
+                                </a>
+                                <dt><label for="contact1_name">Navn 
(*)</label></dt>
+                                <dd>
+                                    <input name="org_contact1_name" 
id="org_contact1_name" class="pure-u-1 input-80" type="text" 
data-validation="required" data-validation-error-msg="Navn på kontaktperson må 
fylles ut!">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="organization/contact1_name" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <dt><label for="contact1_phone">Telefon 
(*)</label></dt>
+                                <dd>
+                                    <input name="org_contact1_phone" 
id="org_contact1_phone" type="text" data-validation="contact_phone 
contact_phone_length">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="organization/contact1_phone" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <dt><label for="contact1_mail">E-post 
(*)</label></dt>
+                                <dd>
+                                    <input name="org_contact1_mail" 
id="org_contact1_mail" class="pure-u-1 input-50" type="text" 
data-validation="contact_mail">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="organization/contact1_mail" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                                <dt><label for="contact2_mail">Gjenta e-post 
(*)</label></dt>
+                                <dd>
+                                    <input name="org_contact2_mail" 
id="org_contact2_mail" class="pure-u-1 input-50" type="text" 
data-validation="contact_mail2 contact_mail2_confirm">
+                                        <xsl:attribute name="value">
+                                            <xsl:value-of 
select="organization/contact1_mail" />
+                                        </xsl:attribute>
+                                    </input>
+                                </dd>
+                            </div>
+                            <div class="form-buttons">
+                                <input type="submit" name="save_org">
+                                    <xsl:attribute name="value">
+                                        <xsl:value-of 
select="php:function('lang', 'send_change_request')" />
+                                    </xsl:attribute>
+                                </input>
+                            </div>
+                        </dl>
                     </div>
-                    <dt>
-                        <label for="homepage">
-                            Hjemmeside 
-                            <a href="javascript:void(0);">
-                                <xsl:attribute name="onclick">
-                                    alert('<xsl:value-of 
select="php:function('lang', 'help_homepage')" />');return false;
-                                </xsl:attribute>
-                                <img alt="Hjelp" src="{helpImg}" />
-                            </a>
-                        </label>
-                    </dt>
-                    <dd>
-                        <input type="text" name="homepage" size="80">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="organization/homepage" />
-                            </xsl:attribute>
-                        </input>
-                    </dd><br /><br />
-                    <div style="overflow:auto;">
-                        Kontaktperson for organisasjonen 
-                        <a href="javascript:void(0);">
-                            <xsl:attribute name="onclick">
-                                alert('<xsl:value-of 
select="php:function('lang', 'help_contact_person')" />');return false;
-                            </xsl:attribute>
-                            <img alt="Hjelp" src="{helpImg}" />
-                        </a>
-                        <dt><label for="contact1_name">Navn (*)</label></dt>
-                        <dd>
-                            <input name="org_contact1_name" 
id="org_contact1_name" size="80" type="text">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of 
select="organization/contact1_name" />
-                                </xsl:attribute>
-                            </input>
-                        </dd>
-                        <dt><label for="contact1_phone">Telefon 
(*)</label></dt>
-                        <dd>
-                            <input name="org_contact1_phone" 
id="org_contact1_phone" type="text">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of 
select="organization/contact1_phone" />
-                                </xsl:attribute>
-                            </input>
-                        </dd>
-                        <dt><label for="contact1_mail">E-post (*)</label></dt>
-                        <dd>
-                            <input name="org_contact1_mail" 
id="org_contact1_mail" size="50" type="text">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of 
select="organization/contact1_mail" />
-                                </xsl:attribute>
-                            </input>
-                        </dd>
-                        <dt><label for="contact2_mail">Gjenta e-post 
(*)</label></dt>
-                        <dd>
-                            <input name="org_contact2_mail" 
id="org_contact2_mail" size="50" type="text">
-                                <xsl:attribute name="value">
-                                    <xsl:value-of 
select="organization/contact1_mail" />
-                                </xsl:attribute>
-                            </input>
-                        </dd>
-                    </div>
-                    <div class="form-buttons">
-                        <input type="submit" name="save_org" onclick="return 
isOK();">
-                            <xsl:attribute name="value">
-                                <xsl:value-of select="php:function('lang', 
'send_change_request')" />
-                            </xsl:attribute>
-                        </input>
-                    </div>
-                </dl>
+                </div>
             </form>
         </div>
     </div>

Modified: 
branches/dev-syncromind/activitycalendarfrontend/templates/base/organization_reciept.xsl
===================================================================
--- 
branches/dev-syncromind/activitycalendarfrontend/templates/base/organization_reciept.xsl
    2015-12-04 23:44:33 UTC (rev 14525)
+++ 
branches/dev-syncromind/activitycalendarfrontend/templates/base/organization_reciept.xsl
    2015-12-04 23:46:55 UTC (rev 14526)
@@ -2,18 +2,16 @@
     <div>
         <h1><xsl:value-of select="php:function('lang', 'edit_organization')" 
/></h1>
         <div id="details">
-            <xsl:choose>
-                <xsl:when test="message">
-                    <div class="success">
-                        <xsl:value-of select="message" />
-                    </div>
-                </xsl:when>
-                <xsl:when test="error">
-                    <div class="error">
-                        <xsl:value-of select="error" />
-                    </div>
-                </xsl:when>
-            </xsl:choose>
+            <xsl:if test="message != ''">
+                <div class="success">
+                    <xsl:value-of select="message" 
disable-output-escaping="yes" />
+                </div>
+            </xsl:if>
+            <xsl:if test="error != ''">
+                <div class="error">
+                    <xsl:value-of select="error" disable-output-escaping="yes" 
/>
+                </div>
+            </xsl:if>
         </div>
     </div>
 </xsl:template>
\ No newline at end of file




reply via email to

[Prev in Thread] Current Thread [Next in Thread]