From c158c6b8d8b33f71e46db63ca0573c9033263f5b Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Sun, 7 Nov 2010 21:33:39 +0100 Subject: [PATCH] hides rest of form for registration.type='' --- templates/conference/Registration.html.ep | 28 +++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/templates/conference/Registration.html.ep b/templates/conference/Registration.html.ep index fcd982d..543272c 100644 --- a/templates/conference/Registration.html.ep +++ b/templates/conference/Registration.html.ep @@ -6,8 +6,9 @@ function Registration($resource){ this.master = { name: '', surname: '', inst: '', email: '', + type: '', // just attending + work: { - type: '', title: '', abstract: '', authors:[ { name:'', surname:'', inst:'', email:'' } ], @@ -31,7 +32,7 @@ console.debug( 'hash_change', id, this.registration.$id ); var self = this; this.registration = this.Registration.get({ id: id }, function(registration) { self.last_saved = angular.copy(registration); - if ( registration.work.type == 'symposium' ) { + if ( registration.type == 'symposium' ) { var s_id = registration.symposium.$id || registration.$id; // first registration doesn't have symposium.$id, but we used same $id console.debug( 'load symposium ', s_id ); @@ -45,7 +46,7 @@ console.debug( 'load symposium ', s_id ); reset: function() { console.debug( this.Registration ); var current_symposium = null; - if ( this.registration && this.registration.work.type == 'symposium' ) { + if ( this.registration && this.registration.type == 'symposium' ) { current_symposium = this.registration.symposium; if ( this.registration.$id ) current_symposium.work_nr++; // only if saved console.debug( 'current_symposium', current_symposium, this.registration ) @@ -53,7 +54,7 @@ console.debug( 'current_symposium', current_symposium, this.registration ) this.registration = new this.Registration( this.master ); if ( current_symposium ) { this.registration.symposium = current_symposium; - this.registration.work.type = 'symposium'; + this.registration.type = 'symposium'; } this.last_saved = {}; console.debug( 'reset', current_symposium, this.registration, this.$location.hashPath ); @@ -64,7 +65,7 @@ console.debug( 'reset', current_symposium, this.registration, this.$location.has self.$location.hashPath = registration.$id; // save symposium to separate resource - if ( registration.work.type == 'symposium' ) { + if ( registration.type == 'symposium' ) { if ( ! self.symposium ) { self.registration.symposium.$id = registration.$id; // reuse $id of first work for symposium self.symposium = new self.Symposium( registration.symposium ); @@ -235,13 +236,15 @@ input.ng-validation-error {

Type of conference submission:

-Symposia
-Oral presentation
-Poster presentation
-Round table discussion
+Just attending conference
+Symposia
+Oral presentation
+Poster presentation
+Round table discussion
+
-
+

@@ -271,7 +274,7 @@ Works which are part of this symposium:
-

Autors of {{registration.symposium.work_nr}}. work

+

Autors of {{registration.symposium.work_nr}}. work

[X] @@ -284,7 +287,6 @@ Works which are part of this symposium:
-
+
+
Debug Information: {{$window.location.href}} -- 2.20.1