X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=templates%2Fconference%2FRegistration.html.ep;h=6a5a1548c5998861344628876eef9ef111d20086;hb=9aabf01994845ae1102edd7dbba3e4e6f82b0f2a;hp=fcd982d327983e22f26f2e432278ef25f365d451;hpb=4a9da083a11c4f391a5170fbe7bab0a9116e4632;p=angular-mojolicious.git diff --git a/templates/conference/Registration.html.ep b/templates/conference/Registration.html.ep index fcd982d..6a5a154 100644 --- a/templates/conference/Registration.html.ep +++ b/templates/conference/Registration.html.ep @@ -4,17 +4,17 @@ if (typeof (console) === 'undefined') console = { debug: function() {} }; // moc function Registration($resource){ this.master = { - name: '', surname: '', inst: '', email: '', - + person: { + name: '', surname: '', inst: '', email: '', + }, + type: '', // just attending work: { - type: '', title: '', abstract: '', authors:[ { name:'', surname:'', inst:'', email:'' } ], }, symposium: { organizers: [ {name:'', surname:'', inst:'', email:'' } ], work_nr: 1, }, }; - this.last_saved = {}; this.Registration = $resource( '/data/conference/Registration/:id', { id:'' } ); this.Symposium = $resource( '/data/conference/Symposium/:id', { id:'' } ); this.reset(); @@ -31,7 +31,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 ); @@ -44,19 +44,21 @@ console.debug( 'load symposium ', s_id ); }, reset: function() { console.debug( this.Registration ); - var current_symposium = null; - if ( this.registration && this.registration.work.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 ) + var last = this.registration; + if ( last && last.type == 'symposium' ) { + if ( last.$id ) last.symposium.work_nr++; // only if saved } this.registration = new this.Registration( this.master ); - if ( current_symposium ) { - this.registration.symposium = current_symposium; - this.registration.work.type = 'symposium'; + if ( last ) { + this.registration.category = last.category; + this.registration.type = last.type; + this.registration.person = last.person; + + if ( last.type == 'symposium' ) + this.registration.symposium = last.symposium; } this.last_saved = {}; -console.debug( 'reset', current_symposium, this.registration, this.$location.hashPath ); +console.debug( 'reset', this.registration, this.$location.hashPath, last ); }, save: function(){ var self = this; @@ -64,13 +66,14 @@ 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 ); self.symposium.works = []; } - self.symposium.works[ work.symposium.work_nr - 1 ] = registration.work; + registration.work.$id = registration.$id; // preserve $id + self.symposium.works[ registration.symposium.work_nr - 1 ] = registration.work; console.debug('save_symposium', self.symposium ); self.symposium.$save(); } @@ -80,6 +83,11 @@ console.debug('save_symposium', self.symposium ); }, }; +angular.validator.max_length = function(input, len) { + var ok = input.length <= len; +console.debug( 'max_length', ok, input.length, len ); + return ok ? '' : 'must be shorter than '+len+' characters'; +} @@ -102,7 +110,6 @@ label, h2 { margin-top: 10px; font-size: 14px; font-family: Arial; - font-weight: normal; } h2 { @@ -113,49 +120,76 @@ h2 { a { color: #D74F25; - font-size: 80%; -} - -.symposium, .work { - width: 615px; } label { color: #374E5A; } -.authors-label .name, .authors-label .surname, .authors-label .inst, .authors-label .email { +.fl { color: #afafaf; float: left; margin: 2px; padding: 0 6px; } -.name, .surname, .email { - width: 18%; +.fl1 { + width: 40.8em; } -.inst { - width: 30%; +.fl2 { + width: 8em; } -.title, .summary { - width: 93%; +.fl3 { + width: 13em; } -.authors { +.flClear { clear: both; - margin-bottom: 6px; } -.authors-label { - clear: right; +.labelTop .pname, .labelTop .name, .labelTop .surname, .labelTop .pinst, .labelTop .email, .labelTop .city, .labelTop .address, .labelTop .contact { + color: #afafaf; + float: left; + margin: 2px; + padding: 0 6px; +} + +.pname, .name, .surname, .email { + width: 10em; } +.pinst { + width: 21.4em; +} +.address { + width: 14.1em; +} + +.city { + width: 9em; +} -.addNew { - padding-right: 30px; +.contact { + width: 10em; +} + +.title, .summary { + width: 93%; +} + +.authors { + clear: both; + margin-bottom: 6px; +} + +.addPerson { + color: #D74F25; + color: #EDC8BC; + color: #EAB3A2; + font-size: 90%; } input, textarea @@ -179,8 +213,9 @@ input:focus, textarea:focus input.ng-validation-error { border: 1px solid #D74F25; border: 1px solid #FF6666; - border: 1px solid #FF9966; border: 1px solid #EDC8BC; + border: 1px solid #FF9966; + border: 1px solid #EAB3A2; } .warrning { @@ -213,6 +248,13 @@ input.ng-validation-error { clear: left; margin-top: 50px; } +.saved { + color: #D74F25; + margin-top: 20px; +} +#buttons { + margin-top: 20px; +} @@ -221,93 +263,158 @@ input.ng-validation-error {
-
- - - - - - +
+

Please choose:

+ +
-
- -

Type of conference submission:

-Symposia
-Oral presentation
-Poster presentation
-Round table discussion
+
+

Contact Information

+
+
First name
+
Surname
+
+
+ + +
+
+
Institution
+
+
+ +
+
+
Address
+
+
+ + +
+
+
City
+
ZIP
+
Country
+
+
+ + + +
+
+
E-mail
+
Phone number
+
+
+ + +
+
-
+
+
+

Choose submittion type:

+ Symposia
+ Oral presentation
+ Poster presentation
+ Round table discussion
+
+
-
- - -
-Organizer: -
-[X] - - - - -
-[Add another organizer] -
-
-
-Works which are part of this symposium: -
    -
  1. {{w.title}}
  2. -
+
+
+ +

Symposia Submission

+ + + +
+
First name
Surname
Institution
E-mail
+
+
+ + + + + X +
+ Add another organizer + + +
+ +
    +
  1. + {{w.title}} + {{w.title}} +
  2. +
+
+
+

Work no. {{registration.symposium.work_nr}}. in {{registration.symposium.title}}

+

Oral Presentation Sumbission

+

Poster Presentation Sumbission

+

Round Table Disscussion Sumbission

+ + + + +
+
First name
Surname
Institution
E-mail
+
+
+ + + + + X +
+ Add another author + + + + + + +
+ {{registration.work.title}} has been submited successfully.
+
-

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

+ -
-[X] - - - - +
Please fill all required fields ({{$invalidWidgets.visible()}} fields left).
-[Add another author] - -
-
- -
+
+
+ Your registration has been submitted successfully. +
+ Please review your data, correct and save if needed or go to conference home page. +
+ Registration ID: {{registration.$id}}.
You can bookmark this page and review it later. +
-
- - - - - - -{{$invalidWidgets.visible()}} errors to fix in submission form -
+ +
Debug Information: @@ -321,6 +428,8 @@ last_saved = {{last_saved}} master = {{master}} +symposium = {{symposium}} + $id={{$id}} registration.$id={{registration.$id}}