3 if (typeof (console) === 'undefined') console = { debug: function() {} }; // mock console.debug
5 function Registration($resource){
8 name: '', surname: '', inst: '', email: ''
14 authors:[ { name:'', surname:'', inst:'', email:'' } ],
18 //organizers: [ {name:'', surname:'', inst:'', email:'' } ],
23 this.Registration = $resource( '/data/conference/Registration/:id', { id:'' } );
24 this.Symposium = $resource( '/data/conference/Symposium/:id', { id:'' } );
26 this.$watch('$location.hashPath', this.hash_change);
28 Registration.$inject=['$resource'];
30 Registration.prototype = {
31 hash_change: function() {
32 var id = this.$location.hashPath;
33 console.debug( 'hash_change', id, this.registration.$id );
34 if ( id != this.registration.$id ) {
37 this.registration = this.Registration.get({ id: id }, function(registration) {
38 self.last_saved = angular.copy(registration);
39 if ( registration.type == 'symposium' ) {
40 var s_id = registration.symposium.$id || registration.$id;
41 // first registration doesn't have symposium.$id, but we used same $id
42 console.debug( 'load symposium ', s_id );
43 self.symposium = self.Symposium.get({ id: s_id });
51 console.debug( this.Registration );
52 var last = this.registration;
53 if ( last && last.type == 'symposium' ) {
54 if ( last.$id ) last.symposium.work_nr++; // only if saved
56 this.registration = new this.Registration( this.master );
58 this.registration.type = last.type;
59 this.registration.person = last.person;
61 if ( last.type == 'symposium' )
62 this.registration.symposium = last.symposium;
64 this.last_saved = angular.copy( this.registration ); // FIXME was: {};
65 console.debug( 'reset', this.registration, this.$location.hashPath, last );
69 this.registration.$save(function(registration){
70 self.$location.hashPath = registration.$id;
72 // save symposium to separate resource
73 if ( registration.type == 'symposium' ) {
74 if ( ! self.symposium ) {
75 self.registration.symposium.$id = registration.$id; // reuse $id of first work for symposium
76 self.symposium = new self.Symposium( registration.symposium );
77 self.symposium.works = [];
79 registration.work.$id = registration.$id; // preserve $id
80 self.symposium.works[ registration.symposium.work_nr - 1 ] = registration.work;
81 console.debug('save_symposium', self.symposium );
82 self.symposium.$save();
85 self.last_saved = angular.copy(registration);
90 angular.validator.max_length = function(input, len) {
91 var ok = input.length <= len;
92 console.debug( 'max_length', ok, input.length, len );
93 return ok ? '' : 'must be shorter than '+len+' characters';
99 <style type="text/css">
121 /* margin-bottom: 6px; */
125 text-decoration: none;
127 background: url(http://mjesec.ffzg.hr/drzb2011/images/kvadrat.gif) no-repeat left;
128 border-bottom: 1px solid #CCC;
134 border-bottom: 2px solid #D74F25;
135 border-bottom: 1px solid #46d0fe;
203 border: solid 1px #dedede;
208 input:focus, textarea:focus
214 /* border: 1px solid #46d0fe; */
217 .ng-validation-error {
218 border: 1px solid #FF6666;
219 border: 1px solid #EDC8BC;
220 border: 1px solid #FF9966;
221 border: 1px solid #EAB3A2;
222 border: 1px solid #D74F25;
223 border: 1px solid #DC6844;
224 border: 1px solid #DE7F61;
246 text-decoration: none;
250 .button input:hover, .gohome:hover {
251 /* background: #dc6844; */
257 border: 1px solid #d74f25;
265 border: 1px solid #d74f25;
266 text-decoration: none;
271 border: solid 1px #dedede;
272 border: solid 1px #f6f6f6;
279 text-decoration: none;
320 border: 1px solid #ccc;
326 <h1>Registration and Proposal Submission</h1>
331 <div class="root" ng:controller="Registration" ng:init="$window.$root = this;">
334 <div ng:show="! registration.$id && ! symposium.$id">
336 All participants (presenters, coauthors and visitors) have to register via on-line register system.
340 Abstract of oral presentation/poster has to be submitted only by first author or by presenting coauthor. Other coauthors do not have to submit the abstract, only register.
344 The organizers of symposia have to submit not only the symposium’s abstract, but the abstracts of every single paper within it (it has to be four of them). Authors of papers within symposium DO NOT submit their abstracts on their own, but register as symposium participants.
348 The organizers of round tables have to submit only abstract of the round table, while its participants have to register as round table participants.
352 The abstracts length should be between 1800 and 2000 characters (space included).
356 One person can be author of maximum three papers, only one of them as first/presenting/single author.
364 <a name="{{$location.hash}}" >bla</a>
367 <div style="margin-bottom: 40px" ng:show="registration.$id && last_saved.$equals(registration)">
371 <div ng:show="registration.$id || symposium">
372 <h2>{{registration.person.name}} {{registration.person.surname}}</h2>
374 <label>Institution: {{registration.person.inst}}</label>
375 <label>Address: {{registration.person.address1}}, {{registration.person.city}}, {{registration.person.zip}}, {{registration.person.country}}</label>
377 <label ng:show="registration.type == 'participant'">Registration type: Registration only</label>
378 <label ng:show="registration.type == 'accomp'">Registration type: Accompanying person</label>
379 <label ng:show="registration.type == 'student'">Registration type: Student</label>
380 <label ng:show="registration.type == 'sparticipant'">Registration type: Symposium participant<span ng:show="registration.student == true">, student</span></label>
381 <label ng:show="registration.type == 'round'">Registration type: Round table organizer<span ng:show="registration.student == true">, student</span><p><b>Round table topic:</b> {{registration.work.title}}</label>
382 <label ng:show="registration.type == 'lecture'">Registration type: Oral presentation<span ng:show="registration.student == true">, student</span></label>
383 <label ng:show="registration.type == 'poster'">Registration type: Poster presentation<span ng:show="registration.student == true">, student</span></label>
384 <label ng:show="registration.type == 'poster' || registration.type == 'lecture'"><b>Title: </b>{{registration.work.title}}</label>
385 <div ng:show="registration.type == 'symposium'">
386 <p>Symposium organizer</p>
387 <label><b>Symposium topic: </b><i>{{registration.symposium.title}}</i></label>
389 <label>Summary:</label> {{registration.symposium.abstract}}
393 <label>Submitted papers:</label>
395 <li ng:repeat="w in symposium.works">
397 <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
399 <span ng:show="registration.$id != w.$id">{{w.title}}</span>
400 <b ng:show="registration.$id == w.$id">{{w.title}}</b>
407 <div ng:show="registration.$id || symposium">
408 <h2>Contact Information</h2>
409 <label>{{registration.person.name}} {{registration.person.surname}}</label>
410 <label>{{registration.person.inst}}</label>
411 <label>{{registration.person.address1}}</label>
412 <label>{{registration.person.city}}, {{registration.person.zip}}, {{registration.person.country}}</label>
413 <label ng:show="registration.type == 'participant'"><h3>Registration type</h3> no paper</label>
414 <div ng:show="registration.type == 'symposium'">
415 <p>Symposium organizer</p>
417 <label>Topic:</label><i>{{registration.symposium.title}}</i>
418 <label>Summary:</label> {{registration.symposium.abstract}}
420 <label>Submitted papers for this symposium:</label>
422 <li ng:repeat="w in symposium.works">
423 <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
424 <span ng:show="registration.$id != w.$id">{{w.title}}</span>
425 <b ng:show="registration.$id == w.$id">{{w.title}}</b>
433 <div id="submission" ng:show="! registration.$id && ! symposium.$id">
435 <h2>Registration Type</h2>
436 <label><input type="radio" name="registration.type" value="participant" ng:required>Registration only</label>
437 <label><input type="radio" name="registration.type" value="sparticipant" ng:required>Symposium/round table participant</label>
438 <label><input type="radio" name="registration.type" value="symposium" ng:required>Symposium organizer</label>
439 <label><input type="radio" name="registration.type" value="round" ng:required>Round table organizer</label>
440 <label><input type="radio" name="registration.type" value="lecture" ng:required>Oral presentation</label>
441 <label><input type="radio" name="registration.type" value="poster" ng:required>Poster presentation</label>
443 <label><input type="radio" name="registration.type" value="student" ng:required ng:change="registration.dinner = 'no'">Student registration only</label>
444 <label><input type="radio" name="registration.type" value="accomp" ng:required>Accompanying person</label>
447 <div id="participant" ng:show="! registration.$id && ! symposium.$id">
450 <h2>Contact Information</h2>
451 <div class="labelTop">
452 <div class="input input4">First name</div>
453 <div class="input input4">Surname</div>
455 <div style="clear: both">
456 <input class="input4" name="registration.person.name" ng:required>
457 <input class="input4" name="registration.person.surname" ng:required>
459 <div class="labelTop">
460 <div class="input input5">Institution</div>
462 <div style="clear: both">
463 <input class="input5" name="registration.person.inst">
465 <div class="labelTop">
466 <div class="input input5">Address</div>
468 <div style="clear: both">
469 <input class="input5" name="registration.person.address1" ng:required>
471 <div class="labelTop">
472 <div class="input input6">City</div>
473 <div class="input input6">ZIP</div>
474 <div class="input input6">Country</div>
476 <div style="clear: both">
477 <input class="input6" name="registration.person.city" ng:required>
478 <input class="input6" name="registration.person.zip">
479 <input class="input6" name="registration.person.country">
481 <div class="labelTop">
482 <div class="input input4">E-mail</div>
483 <div class="input input4">Phone number</div>
485 <div style="clear: both">
486 <input class="input4" name="registration.person.email" ng:validate="email" ng:required>
487 <input class="input4" name="registration.person.phone">
489 <div ng:show="registration.type == 'lecture' || registration.type == 'poster' || registration.type == 'sparticipant' || registration.type == 'symposium' || registration.type == 'round'">
490 <br><input type="checkbox" name="registration.student">Check this box if you are student.
492 <div style="clear: both; margin-top: 20px;">
493 Will you join us for the welcome reception on Thursday at 20 hrs?<br/>
494 <input type="radio" name="registration.reception" value="yes">Yes
495 <input type="radio" name="registration.reception" value="no">No
497 <div ng:show="registration.type != 'student'" style="clear: both; margin-top: 20px;">
498 Will you join us for the conference dinner on Friday at 20 hrs? (Dinner is included in the regostration fee.)<br/>
499 <input type="radio" name="registration.dinner" value="yes">Yes
500 <input type="radio" name="registration.dinner" value="no">No
507 <div ng:show="registration.type == 'sparticipant' && ! last_saved.$id">
508 <h2>Symposium/round table topic</h2>
509 <input class="input1" name="registration.sympattend" ng:required>
513 <div id="work" ng:show="registration.type != 'participant' && registration.type != 'sparticipant' && registration.type != 'student' && registration.type != 'accomp'">
514 <div ng:show="registration.type == 'symposium' && registration.symposium.work_nr < 4 && ! symposium.$id">
517 <label for="registration.symposium.title">Topic:</label>
518 <input class="input1" name="registration.symposium.title" ng:required>
519 <label>Organizer:</label>
521 <div class="input input2">First name</div><div class="input input2">Surname</div><div class="input input3">Institution</div><div class="input input2">E-mail</div>
523 <div class="inputOrg"><span ng:show="registration.person.name">{{registration.person.name}} {{registration.person.surname}}</span><span ng:show="registration.person.inst">, {{registration.person.inst}}</span><span ng:show="registration.person.email">, {{registration.person.email}}</span></div>
524 <div class="clear" ng:repeat="organizer in registration.symposium.organizers">
525 <input class="input2" name="organizer.name" ng:required>
526 <input class="input2" name="organizer.surname" ng:required>
527 <input class="input3" name="organizer.inst" >
528 <input class="input2" name="organizer.email" ng:required ng:validate="email">
529 <a href="" ng:click="registration.symposium.organizers.$remove(organizer)">X</a>
531 <div class="clear"><a class="addPerson" href="" ng:click="registration.symposium.organizers.$add()">Add another organizer</a></div>
532 <label>Summary (2000 characters max.)</label>
533 <textarea class="input1" name="registration.symposium.abstract" rows="10" ng:validate="max_length:2000" ng:required></textarea>
535 <div ng:show="symposium">
536 <b>Symposium:</b> {{registration.symposium.title}}
538 <label>Submitted papers for this symposium:</label>
540 <li ng:repeat="w in symposium.works">
542 <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
544 <span ng:show="registration.$id != w.$id">{{w.title}}</span>
545 <b ng:show="registration.$id == w.$id">{{w.title}}</b>
552 <div ng:show="registration.type && ! last_saved.$id">
555 <div ng:show="symposium">
556 <b>Symposium:</b> {{registration.symposium.title}}
558 <label>Submitted papers for this symposium:</label>
560 <li ng:repeat="w in symposium.works">
561 <a ng:show="registration.$id != w.$id" href="#{{w.$id}}" >{{w.title}}</a>
562 <b ng:show="registration.$id == w.$id">{{w.title}}</b>
568 <h3 ng:show="registration.type == 'symposium'">Add Symposium Paper ({{registration.symposium.work_nr}})</h3>
569 <h2 ng:show="registration.type == 'lecture'">Oral Presentation Sumbission</h2>
570 <h2 ng:show="registration.type == 'poster'">Poster Presentation Sumbission</h2>
571 <h2 ng:show="registration.type == 'round'">Round Table Disscussion Sumbission</h2>
574 <label>Title:</label>
575 <input class="input1" name="registration.work.title" ng:required>
576 <div ng:show="registration.type != 'round'">
577 <label>Authors</label>
579 <div class="input input2">First name</div><div class="input input2">Surname</div><div class="input input3">Institution</div><div class="input input2">E-mail</div>
581 <div class="clear" ng:repeat="author in registration.work.authors">
582 <input class="input2" name="author.name" ng:required>
583 <input class="input2" name="author.surname" ng:required>
584 <input class="input3" name="author.inst" >
585 <input class="input2" name="author.email" ng:required ng:validate="email">
586 <a href="" ng:click="registration.work.authors.$remove(author)">X</a>
588 <a class="addPerson" href="" ng:click="registration.work.authors.$add()">Add another author</a>
590 <div ng:show="registration.type == 'round'">
591 <label>Organizer:</label>
593 <div class="input input2">First name</div><div class="input input2">Surname</div><div class="input input3">Institution</div><div class="input input2">E-mail</div>
595 <div class="inputOrg"><span ng:show="registration.person.name">{{registration.person.name}} {{registration.person.surname}}</span><span ng:show="registration.person.inst">, {{registration.person.inst}}</span><span ng:show="registration.person.email">, {{registration.person.email}}</span></div>
596 <div class="clear" ng:repeat="organizer in registration.work.organizers">
597 <input class="input2" name="organizer.name" ng:required>
598 <input class="input2" name="organizer.surname" ng:required>
599 <input class="input3" name="organizer.inst" >
600 <input class="input2" name="organizer.email" ng:required ng:validate="email">
601 <a href="" ng:click="registration.work.organizers.$remove(organizer)">X</a>
603 <div class="clear"><a class="addPerson" href="" ng:click="registration.work.organizers.$add()">Add another organizer</a></div>
606 <label>Abstract (2000 characters max.):</label>
607 <textarea class="input1" name="registration.work.abstract" rows="10" ng:validate="max_length:2000" ng:required></textarea>
610 </div> <!-- ng:show="registration.type" -->
613 <div class="button" ng:show="! last_saved.$equals(registration) && $invalidWidgets.visible() == 0 && (symposium.$id || (registration.reception != null && registration.dinner != null))">
614 <input type="submit" value="Save" ng:click="save();" ng:show="! last_saved.$equals(registration) && $invalidWidgets.visible() == 0" >
617 <div ng:show="$invalidWidgets.visible() > 0 || (! symposium.$id && (registration.dinner == null || registration.reception == null))" style="color:red; margin-top: 20px">Please fill all required fields correctly.
618 <span ng:show="$invalidWidgets.visible() > 0">Fields with orange border call for your attention. <!-- - {{$invalidWidgets.visible()}} left. --></span>
619 <span ng:show="(registration.reception == null || registration.dinner == null) && ! symposium.$id && registration.type != 'student'">
620 Decide about going to welcome reception and dinner.</span>
621 <span ng:show="(registration.reception == null || registration.dinner == null) && ! symposium.$id && registration.type == 'student'">
622 Decide about going to welcome reception.</span>
626 <div style="margin-bottom: 40px" ng:show="registration.$id && last_saved.$equals(registration)">
628 <div class="saved" ng:show="registration.type == 'participant' || registration.type == 'sparticipant' || registration.type == 'student' || registration.type == 'accomp' && ! symposium">
629 <span class="saved2">Thank you! Your registration has been submitted successfully!</span>
630 <div class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011-eng/registration/fee">Please read registration fee payment instructions</a></div>
631 <div class="gohome" ng:show="registration.type == 'student' || registration.student == true">
632 You must provide a proof of your student status by e-mail sent to <a href="mailto:drzb@ffzg.hr">drzb@ffzg.hr</a>
636 <div class="saved" ng:show="registration.type != 'participant' && registration.type != 'sparticipant' && registration.type != 'student' && registration.type != 'accomp' && registration.symposium.work_nr == 4 && last_saved.$id">
637 <span class="saved2">Thank you. Your proposal has been submitted successfully! <br></span>
638 <span class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011-eng/registration/fee">Please read conference fee payment instructions</a></span>
641 <div class="button button2" ng:show="registration.type != 'participant' && registration.type != 'sparticipant' && registration.type != 'student' && registration.type != 'accomp' && last_saved.$id && ! symposium">
642 <span class="saved2">Thank you. Your proposal has been submitted successfully! <br></span>
643 <div class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011-eng/registration/fee">Please read registration fee payment instructions</a></div>
644 <div class="gohome" ng:show="registration.type == 'student' || registration.student == true">
645 You must provide a proof of your student status by e-mail sent to <a href="mailto:drzb@ffzg.hr">drzb@ffzg.hr</a>
650 <div class="button button2" ng:show="last_saved.$id && symposium.$id && registration.symposium.work_nr < 4">
651 <input type="reset" value="Submit another paper" ng:click="reset()">
654 <div class="button2" ng:show="registration.$id && registration.type != 'participant' && registration.type != 'sparticipant' && last_saved.$equals(registration)">
655 <input type="reset" value="Submit another paper" ng:click="reset()">
656 <div class="gohome"><a href="http://psihologija.ffzg.hr/drzb2011/">Go to conference home page</a></div>
662 <div ng:show="registration.$id">
663 Permalink to <a href="#{{registration.$id}}">DRZB2011 registration</a> which you can bookmark
666 <input type=checkbox name=debug style="float: right; clear: both">
667 <pre ng:show="debug">
669 dirty={{! last_saved.$equals(registration)}} invalid={{$invalidWidgets.visible()}}
671 registration = {{registration}}
673 last_saved = {{last_saved}}
677 symposium = {{symposium}}
680 registration.$id={{registration.$id}}