Guest User

Untitled

a guest
Jan 10th, 2018
576
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.29 KB | None | 0 0
  1. const express = require('express');
  2. const cookieParser = require('cookie-parser');
  3. const bodyParser = require('body-parser');
  4. const hbs = require('hbs');
  5. const expressValidator = require('express-validator');
  6. const flash = require('connect-flash');
  7. const session = require('express-session');
  8. const passport = require('passport');
  9. const LocalStrategy = require('passport-local').Strategy;
  10. const mongoose = require('mongoose');
  11. const fs = require('fs');
  12.  
  13. var app = express();
  14.  
  15. // Server port
  16. const port = process.env.PORT || 3000;
  17. // Server starting message
  18. app.listen(port, () => {
  19. console.log(`Server is up on port ${port}`);
  20. });
  21.  
  22. // Views directory established and handbars engine
  23. hbs.registerPartials(__dirname + '/views/layouts')
  24. app.set('view engine', 'hbs');
  25.  
  26. // static assets rendered
  27. app.use(express.static(__dirname + '/public'));
  28. app.use('/users', express.static(__dirname + '/public'));
  29.  
  30. // body-parser middleware
  31. app.use(bodyParser.urlencoded({ extended: false }))
  32. app.use(bodyParser.json())
  33. app.use(cookieParser());
  34.  
  35. // expressSession
  36. app.use(session({
  37. secret: 'secret',
  38. saveUninitialized: true,
  39. resave: true
  40. }));
  41.  
  42. // passport
  43. app.use(passport.initialize());
  44. app.use(passport.session());
  45.  
  46. // expressValidator
  47. app.use(expressValidator({
  48. errorFormatter: function(param, msg, value) {
  49. var namespace = param.split('.'),
  50. root = namespace.shift(),
  51. formParam = root;
  52.  
  53. while(namespace.length) {
  54. formParam += '[' + namespace.shift() + ']';
  55. }
  56.  
  57. return {
  58. param: formParam,
  59. msg: msg,
  60. value: value
  61. };
  62. }
  63. }));
  64.  
  65. // Connect Flash
  66. app.use(flash());
  67.  
  68. // Global Vars
  69. app.use(function (req, res, next) {
  70. res.locals.success_msg = req.flash('success_msg');
  71. res.locals.error_msg = req.flash('error_msg');
  72. res.locals.error = req.flash('error');
  73. res.locals.user = req.user || null;
  74. next();
  75. });
  76.  
  77. // server.log setup middleware
  78. app.use((req, res, next) => {
  79. var now = new Date().toString();
  80. var log = `${now}: ${req.method} ${req.url}`
  81.  
  82. console.log(log);
  83.  
  84. fs.appendFile('server.log', log + 'n', (err) => {
  85. if (err) {
  86. console.log('Unable to append to server.log');
  87. }
  88. });
  89. next();
  90. });
  91.  
  92. // Routes
  93. const routes = require('./routes/routes');
  94. const users = require('./routes/users');
  95. app.use("/", routes);
  96. app.use("/users", users);
  97.  
  98. // Get year for footer
  99. hbs.registerHelper('getCurrentYear', () => {
  100. return new Date().getFullYear()
  101. });
  102.  
  103. const express = require('express');
  104. const mongoose = require('mongoose');
  105. const bcrypt = require('bcryptjs');
  106.  
  107. var app = express();
  108.  
  109. if (app.get('env') === 'production') {
  110. mongoose.connect(process.env.DATABASE_URL);
  111. } else {
  112. mongoose.connect('mongodb://localhost/pol-development');
  113. }
  114.  
  115. var db = mongoose.connection;
  116.  
  117. db.on('error', console.error.bind(console, 'connection error:'));
  118. db.once('open', function() {
  119. console.log("Connection has been established");
  120. });
  121.  
  122. var UserSchema = mongoose.Schema({
  123. schoolName: String,
  124. schoolAddress: String,
  125. schoolAddress2: String,
  126. city: String,
  127. zipCode: String,
  128. addressCheck: Boolean,
  129. postalAddress: String,
  130. postalCity: String,
  131. postalZipCode: String,
  132. telephone: Number,
  133. fax: Number,
  134. email: String,
  135. password: String,
  136. schoolType: String,
  137. schoolDistrict: String,
  138. schoolRegion: String,
  139. curriculum: String,
  140. participationBefore: Boolean,
  141. participationYears: Number,
  142. directorName: String,
  143. directorTelephone: Number,
  144. directorEmail: String,
  145. directorAttendanceRehersal: Boolean,
  146. directorAttendanceEvent: Boolean,
  147. schoolLiaisonName: String,
  148. schoolLiaisonTelephone: Number,
  149. schoolLiaisonEmail: String,
  150. schoolLiaisonPosition: String,
  151. schoolLiaisonOtherPosition: String,
  152. schoolLiaisonTShirt: String,
  153. schoolLiaisonTutorMentor: String,
  154. attendanceRehersal: Boolean,
  155. attendanceEvent: Boolean
  156. });
  157.  
  158. var User = module.exports = mongoose.model('User', UserSchema);
  159.  
  160. module.exports.createUser = function(newUser, callback){
  161. bcrypt.genSalt(10, function(err, salt) {
  162. bcrypt.hash(newUser.password, salt, function(err, hash) {
  163. newUser.password = hash;
  164. newUser.save(callback);
  165. });
  166. });
  167. }
  168.  
  169. module.exports.getUserByEmail = function(email, callback){
  170. var query = {email: email};
  171. User.findOne(query, callback);
  172. }
  173.  
  174. module.exports.getUserById = function(id, callback){
  175. user.findById(id, callback);
  176. }
  177.  
  178. module.exports.comparePassword = function(candidatePassword, hash, callback) {
  179. bcrypt.compare(candidatePassword, hash, function(err, isMatch) {
  180. if(err) throw err;
  181. callback(null, isMatch);
  182. });
  183. }
  184.  
  185. const express = require('express');
  186. const router = express.Router();
  187. const passport = require('passport');
  188. const LocalStrategy = require('passport-local').Strategy;
  189.  
  190. var User = require('../models/user');
  191.  
  192. router.get('/register', (req, res) => {
  193. res.render('register.hbs', {
  194. pageTitle: 'Register'
  195. });
  196. });
  197.  
  198. router.get('/login', (req, res) => {
  199. res.render('login.hbs', {
  200. pageTitle: 'Login'
  201. });
  202. });
  203.  
  204. router.post('/register', (req, res) => {
  205. var schoolName = req.body.schoolName;
  206. var schoolAddress = req.body.schoolAddress;
  207. var city = req.body.city;
  208. var zipCode = req.body.zipCode;
  209. var postalAddress = req.body.postalAddress;
  210. var postalCity = req.body.postalCity;
  211. var postalZipCode = req.body.postalZipCode;
  212. var telephone = req.body.telephone;
  213. var email = req.body.email;
  214. var password = req.body.password;
  215. var schoolType = req.body.schoolType;
  216. var schoolDistrict = req.body.schoolDistrict;
  217. var schoolRegion = req.body.schoolRegion;
  218. var curriculum = req.body.curriculum;
  219. var directorName = req.body.directorName;
  220. var directorTelephone = req.body.directorTelephone;
  221. var directorEmail = req.body.directorEmail;
  222. var schoolLiaisonName = req.body.schoolLiaisonName;
  223. var schoolLiaisonTelephone = req.body.schoolLiaisonTelephone;
  224. var schoolLiaisonEmail = req.body.schoolLiaisonEmail;
  225. var schoolLiaisonPosition = req.body.schoolLiaisonPosition;
  226. var schoolLiaisonTShirt = req.body.schoolLiaisonTShirt;
  227. var schoolLiaisonTutorMentor = req.body.schoolLiaisonTutorMentor;
  228.  
  229. // validations
  230. req.checkBody('schoolName', 'The school name is required').notEmpty();
  231. req.checkBody('schoolAddress', 'The school address is required').notEmpty();
  232. req.checkBody('city', 'The city is required').notEmpty();
  233. req.checkBody('zipCode', 'This zip code is required').notEmpty();
  234. // req.checkBody('postalAddress', 'The postal address is required').notEmpty();
  235. // req.checkBody('postalCity', 'The postal city is required').notEmpty();
  236. // req.checkBody('postalZipCode', 'The postal zip code is required').notEmpty();
  237. req.checkBody('telephone', 'A telephone number is required').notEmpty();
  238. req.checkBody('email', 'An account email is required').notEmpty();
  239. // req.checkBody('email', 'This account email is not valid').isEmail();
  240. req.checkBody('password', 'An account password is required').notEmpty();
  241. req.checkBody('schoolType', 'A school type is required').notEmpty();
  242. req.checkBody('schoolDistrict', 'A school district is required').notEmpty();
  243. req.checkBody('schoolRegion', 'A school region is required').notEmpty();
  244. req.checkBody('curriculum', 'A curriculum is required').notEmpty();
  245. req.checkBody('directorName', 'A directors name is required').notEmpty();
  246. req.checkBody('directorTelephone', 'A directors telephone is required').notEmpty();
  247. req.checkBody('directorEmail', 'A directors email is required').notEmpty();
  248. req.checkBody('directorEmail', 'This email is not valid').isEmail();
  249. req.checkBody('schoolLiaisonName', 'A school liaison name is required').notEmpty();
  250. req.checkBody('schoolLiaisonTelephone', 'A school liaison telephone is required').notEmpty();
  251. req.checkBody('schoolLiaisonEmail', 'The school liaison email is not valid').isEmail();
  252. req.checkBody('schoolLiaisonEmail', 'A school liaison email is required').notEmpty();
  253. req.checkBody('schoolLiaisonPosition', 'A school liaison position is required').notEmpty();
  254. req.checkBody('schoolLiaisonTShirt', 'A school liaison t-shirt size is required').notEmpty();
  255. req.checkBody('schoolLiaisonTutorMentor', 'A school liaison tutor/mentor is required').notEmpty();
  256.  
  257. var errors = req.validationErrors();
  258.  
  259. if (errors) {
  260. res.render('register', {
  261. errors:errors
  262. });
  263. } else {
  264. var newUser = new User({
  265. schoolName: schoolName,
  266. schoolAddress: schoolAddress,
  267. city: city,
  268. zipCode: zipCode,
  269. postalAddress: postalAddress,
  270. postalCity: postalCity,
  271. postalZipCode: postalZipCode,
  272. telephone: telephone,
  273. email: email,
  274. password: password,
  275. schoolType: schoolType,
  276. schoolDistrict: schoolDistrict,
  277. schoolRegion: schoolRegion,
  278. curriculum: curriculum,
  279. directorName: directorName,
  280. directorTelephone: directorTelephone,
  281. directorEmail: directorEmail,
  282. schoolLiaisonName: schoolLiaisonName,
  283. schoolLiaisonTelephone: schoolLiaisonTelephone,
  284. schoolLiaisonEmail: schoolLiaisonEmail,
  285. schoolLiaisonPosition: schoolLiaisonPosition,
  286. schoolLiaisonTShirt: schoolLiaisonTShirt,
  287. schoolLiaisonTutorMentor: schoolLiaisonTutorMentor,
  288. });
  289.  
  290. User.createUser(newUser, function(err, user) {
  291. if(err) throw err;
  292. console.log(user);
  293. });
  294.  
  295. req.flash('success_msg', 'You are now registered, you can now login!');
  296. res.redirect('/users/login');
  297. }
  298. });
  299.  
  300. passport.use(new LocalStrategy(
  301. function(email, password, done) {
  302. User.getUserByEmail(email, function(err, user){
  303. if(err) throw err;
  304. if(!user){
  305. return done(null, false, {message: 'Unknown Email Address'});
  306. }
  307.  
  308. User.comparePassword(password, user.password, function(err, isMatch){
  309. if(err) throw err;
  310. if(isMatch){
  311. return done(null, user);
  312. } else {
  313. return done(null, false, {message: 'Invalid password'});
  314. }
  315. });
  316. });
  317. }));
  318.  
  319. passport.serializeUser(function(user, done) {
  320. done(null, user.id);
  321. });
  322.  
  323. passport.deserializeUser(function(id, done) {
  324. User.getUserById(id, function(err, user) {
  325. done(err, user);
  326. });
  327. });
  328.  
  329. router.post('/login', passport.authenticate('local', {
  330. successRedirect: '/',
  331. failureRedirect: '/users/login',
  332. successFlash: 'Welcome!',
  333. failureFlash: 'Invalid username or password.'
  334. }), function(req, res) {
  335. res.redirect('/');
  336. });
  337.  
  338. module.exports = router;
  339.  
  340. {{> header }}
  341.  
  342. <div class="container">
  343. <div class="row">
  344. <div class="col-lg-12">
  345. {{#if success_msg}}
  346. <div class="alert alert-success">{{success_msg}}</div>
  347. {{/if}}
  348.  
  349. {{#if error_msg}}
  350. <div class="alert alert-danger">{{error_msg}}</div>
  351. {{/if}}
  352.  
  353. {{#if error}}
  354. <div class="alert alert-danger">{{error}}</div>
  355. {{/if}}
  356. </div>
  357. </div>
  358.  
  359. <form action="/users/login" method="post">
  360. <div class="panel panel-default">
  361. <div class="panel-heading">Log In</div>
  362.  
  363. <div class="panel-body">
  364. <div class="form-group">
  365. <label for="exampleInputEmail1">Email address</label>
  366. <input type="email" class="form-control" id="exampleInputEmail1" placeholder="Enter email" name="email">
  367. <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
  368. </div>
  369.  
  370. <div class="form-group">
  371. <label for="exampleInputPassword1">Password</label>
  372. <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" name="password">
  373. </div>
  374. <button type="submit" class="btn btn-primary">Login</button>
  375. </div><!-- Panel Body -->
  376. </div><!-- Panel Default -->
  377. </form>
  378. </div><!-- Container ends -->
  379.  
  380. {{> footer }}
  381.  
  382. {{> header }}
  383.  
  384. <div class="container">
  385. <form action="/users/register" method="post">
  386. <h2>Registration Form</h2>
  387.  
  388. {{# if errors}}
  389. <div class="alert alert-danger">
  390. {{#each errors}}
  391. <li>{{msg}}</li>
  392. {{/each}}
  393. </div>
  394. {{/if}}
  395.  
  396. <div class="panel panel-default">
  397. <div class="panel-heading">
  398. School Information
  399. </div>
  400.  
  401. <div class="panel-body">
  402. <div class="row">
  403. <div class="form-group col-md-12">
  404. <label for="schoolName">School Name</label>
  405. <input type="text" class="form-control" id="schoolName" name="schoolName" placeholder="Enter school name">
  406. </div>
  407.  
  408. <div class="form-group col-md-12">
  409. <label for="shippingAddress">Physical Address</label>
  410. <input type="text" class="form-control" id="shippingAddress" name="schoolAddress" placeholder="Enter your school's physical address">
  411. </div>
  412.  
  413. <div class="form-group col-md-12">
  414. <label for="inputAddress2">Address 2</label>
  415. <input type="text" class="form-control" id="inputAddress2" name="schoolAddress2" placeholder="Apartment, studio, or floor">
  416. </div>
  417.  
  418. <div class="form-group col-md-6">
  419. <label for="city">City</label>
  420. <input type="text" class="form-control" id="city" name="city" placeholder="City">
  421. </div>
  422.  
  423. <div class="form-group col-md-6">
  424. <label for="zip">Zip Code</label>
  425. <input type="text" class="form-control" id="zip" name="zipCode" placeholder="Zip Code">
  426. </div>
  427.  
  428. <div class="form-check col-md-12">
  429. <input type="checkbox" class="form-check-input" id="addressCheck">
  430. <label class="form-check-label" for="addressCheck">Check if the school's postal address is the same as the physical address</label>
  431. </div>
  432.  
  433. <!-- This should be hidden if the box above has been checked -->
  434. <!-- Postal address, usually a P.O. Box -->
  435. <div class="form-group col-md-12">
  436. <label for="postalAddress">Postal Address</label>
  437. <input type="text" class="form-control" id="postalAddress" name="postalAddress" placeholder="Enter your school's postal address">
  438. </div>
  439.  
  440. <div class="form-group col-md-6">
  441. <label for="city2">City</label>
  442. <input type="text" class="form-control" id="city2" name="postalCity" placeholder="postalCity">
  443. </div>
  444.  
  445. <div class="form-group col-md-6">
  446. <label for="zip2">Zip Code</label>
  447. <input type="text" class="form-control" id="zip2" placeholder="Zip Code">
  448. </div>
  449. <!-- End of hidden fields -->
  450.  
  451. <div class="form-group col-md-6">
  452. <label for="telephone">Telephone</label>
  453. <input type="text" class="form-control" id="telephone" name="telephone" placeholder="Enter your school's Telephone Number">
  454. </div>
  455.  
  456. <div class="form-group col-md-6">
  457. <label for="fax">Fax</label>
  458. <input type="text" class="form-control" id="fax" name="email" placeholder="Enter your school's Fax Number">
  459. </div>
  460.  
  461. <div class="form-group col-md-6">
  462. <label for="exampleFormControlInput1">Email address</label>
  463. <input type="email" class="form-control" id="exampleFormControlInput1" name="email" placeholder="name@example.com">
  464. <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
  465. </div>
  466.  
  467. <div class="form-group col-md-6">
  468. <label for="exampleInputPassword1">Password</label>
  469. <input type="password" class="form-control" id="exampleInputPassword1" name="password" placeholder="Password">
  470. </div>
  471. </div><!-- row ends -->
  472. </div><!-- End of panel body -->
  473. </div><!-- School Information panel ends -->
  474.  
  475. <!-- Other School Information -->
  476. <div class="panel panel-default">
  477. <div class="panel-heading">
  478. Other School Information
  479. </div><!-- Panel heading ends -->
  480.  
  481. <div class="panel-body">
  482. <div class="row">
  483. <div class="form-group col-md-6">
  484. <label for="schoolTypeControlSelect">Type of School</label>
  485. <select class="form-control" id="schoolTypeControlSelect" name="schoolType">
  486. <option>Public</option>
  487. <option>Private</option>
  488. <option>Home School</option>
  489. </select>
  490. </div>
  491.  
  492. <!-- If Public is selected than the following fields become VISIBLE, otherwise they stay hidden -->
  493. <div class="form-group col-md-6">
  494. <label for="districtControlSelect">School District</label>
  495. <select class="form-control" id="districtControlSelect" name="schoolDistrict">
  496. <option>Choice 1</option>
  497. <option>Choice 2</option>
  498. <option>Choice 3</option>
  499. </select>
  500. </div>
  501.  
  502. <div class="form-group col-md-6">
  503. <label for="regionControlSelect">School Region</label>
  504. <select class="form-control" id="regionControlSelect" name="schoolRegion">
  505. <option>Region 1</option>
  506. <option>Region 2</option>
  507. <option>Region 3</option>
  508. </select>
  509. </div>
  510. <!-- End of hidden fields -->
  511.  
  512. <div class="form-group col-md-6">
  513. <label for="curriculumControlSelect">Curriculum</label>
  514. <select class="form-control" id="curriculumControlSelect" name="curriculum">
  515. <option>English as a second language</option>
  516. <option>English as a main language</option>
  517. <option>Bilingual</option>
  518. <option>Other</option>
  519. </select>
  520. </div>
  521.  
  522. <p class="col-md-12">Has your school participated in previous years?</p>
  523.  
  524. <div class="col-md-12">
  525. <div class="form-check">
  526. <input class="form-check-input" type="radio" name="participationRadio" id="yesRadio" value="yes" checked>
  527. <label class="form-check-label" for="yesRadio">
  528. Yes
  529. </label>
  530. </div>
  531.  
  532. <div class="form-check">
  533. <input class="form-check-input" type="radio" name="participationRadio" id="noRadio" value="no">
  534. <label class="form-check-label" for="noRadio">
  535. No
  536. </label>
  537. </div>
  538. </div>
  539.  
  540. <div class="form-group col-md-6">
  541. <label for="years">How many years participating?</label>
  542. <input type="text" class="form-control" id="years" placeholder="If your previous answer is YES, enter the number of years" name="participationYears">
  543. </div>
  544. </div><!-- form-row ends -->
  545. </div><!-- Panel body -->
  546. </div><!-- Other School panel ends -->
  547.  
  548. <!-- School Principal/director information -->
  549. <div class="panel panel-default">
  550. <div class="panel-heading">
  551. School Director / Principal Information
  552. </div>
  553.  
  554. <div class="panel-body">
  555. <div class="form-group">
  556. <label for="directorName">Director's Name</label>
  557. <input type="text" class="form-control" id="directorName" placeholder="Enter the School Director's Name" name="directorName">
  558. </div>
  559.  
  560. <div class="form-group">
  561. <label for="telephone2">Telephone</label>
  562. <input type="text" class="form-control" id="telephone2" placeholder="Enter your school director's Telephone Number" name="directorTelephone">
  563. </div>
  564.  
  565. <div class="form-group">
  566. <label for="directorEmail">Email address</label>
  567. <input type="email" class="form-control" id="directorEmail" placeholder="director@example.com" name="directorEmail">
  568. </div>
  569. </div><!-- panel body ends -->
  570. </div><!-- panel -->
  571.  
  572. <!-- The following fields are hidden to users and should ONLY be visible and editable by a site admin-level user. -->
  573. <div class="panel panel-danger">
  574. <div class="panel-heading">
  575. Administrators Only
  576. </div>
  577.  
  578. <div class="panel-body">
  579. <p>Director Attended Rehersal</p>
  580.  
  581. <div class="form-check">
  582. <input class="form-check-input" type="radio" name="attendanceRadio" id="yesRadio2" value="yes">
  583. <label class="form-check-label" for="yesRadio2">
  584. Yes
  585. </label>
  586. </div>
  587.  
  588. <div class="form-check">
  589. <input class="form-check-input" type="radio" name="attendanceRadio" id="noRadio2" value="no">
  590. <label class="form-check-label" for="noRadio2">
  591. No
  592. </label>
  593. </div>
  594.  
  595. <p>Director Attended the Competition Event</p>
  596.  
  597. <div class="form-check">
  598. <input class="form-check-input" type="radio" name="eventRadio" id="yesRadio3" value="yes">
  599. <label class="form-check-label" for="yesRadio3">
  600. Yes
  601. </label>
  602. </div>
  603.  
  604. <div class="form-check">
  605. <input class="form-check-input" type="radio" name="eventRadio" id="noRadio3" value="no">
  606. <label class="form-check-label" for="noRadio3">
  607. No
  608. </label>
  609. </div>
  610. </div>
  611. </div>
  612. <!-- End of fields hidden to user -->
  613.  
  614. <!-- School Liaison Info -->
  615. <div class="panel panel-default">
  616. <div class="panel-heading">
  617. School Liaison
  618. </div>
  619.  
  620. <div class="panel-body">
  621. <div class="form-group">
  622. <label for="liaison">Liaison's Name</label>
  623. <input type="text" class="form-control" id="liaison" placeholder="Enter the School Liaison's Name" name="schoolLiaisonName">
  624. </div>
  625.  
  626. <div class="form-group">
  627. <label for="telephone3">Telephone</label>
  628. <input type="text" class="form-control" id="telephone3" placeholder="Enter your school liaison's Telephone Number" name="schoolLiaisonTelephone">
  629. </div>
  630.  
  631. <div class="form-group">
  632. <label for="liaisonEmail">Email address</label>
  633. <input type="email" class="form-control" id="liaisonEmail" placeholder="liaison@example.com" name="schoolLiaisonEmail">
  634. </div>
  635.  
  636. <div class="form-group">
  637. <label for="positionControlSelect">Position</label>
  638. <select class="form-control" id="positionControlSelect" name="schoolLiaisonPosition">
  639. <option>Teacher</option>
  640. <option>Intern</option>
  641. <option>Coordinator</option>
  642. <option>Facilitator</option>
  643. <option>Director</option>
  644. <option>Other</option>
  645. </select>
  646. </div>
  647.  
  648. <p>If other, specify position</p>
  649.  
  650. <div class="form-group">
  651. <label for="otherPosition">"Other" position</label>
  652. <input type="text" class="form-control" id="otherPosition" placeholder="Position" name="schoolLiaisonOtherPosition">
  653. </div>
  654.  
  655. <div class="form-group">
  656. <label for="sizeControlSelect">T-shirt Size</label>
  657. <select class="form-control" id="sizeControlSelect" name="schoolLiaisonTShirt">
  658. <option>Small</option>
  659. <option>Medium</option>
  660. <option>Large</option>
  661. <option>X-Large</option>
  662. </select>
  663. </div>
  664.  
  665. <div class="form-group">
  666. <label for="mentorControlSelect">Poet Tutor/Mentor</label>
  667. <select class="form-control" id="mentorControlSelect" name="schoolLiaisonTutorMentor">
  668. <option>Jacqueline Jiang</option>
  669. <option>Mara Pastor</option>
  670. <option>Penelope</option>
  671. <option>Rubén Durán Morales</option>
  672. </select>
  673. </div>
  674. </div>
  675. </div>
  676.  
  677. <!-- The following fields are hidden to users and should ONLY be visible and editable by a site admin-level user. -->
  678. <div class="panel panel-danger">
  679. <div class="panel-heading">
  680. Administrators Only
  681. </div>
  682.  
  683. <div class="panel-body">
  684. <p>Attended Rehersal?</p>
  685.  
  686. <div class="form-check">
  687. <input class="form-check-input" type="radio" name="attendanceRadio2" id="yesLiaisonRadio" value="yes">
  688. <label class="form-check-label" for="yesLiaisonRadio">
  689. Yes
  690. </label>
  691. </div>
  692.  
  693. <div class="form-check">
  694. <input class="form-check-input" type="radio" name="attendanceRadio2" id="noLiaisonRadio" value="no">
  695. <label class="form-check-label" for="noLiaisonRadio">
  696. No
  697. </label>
  698. </div>
  699.  
  700. <p>Attended the Competition Event?</p>
  701.  
  702. <div class="form-check">
  703. <input class="form-check-input" type="radio" name="eventRadio2" id="yesLiaisonRadio2" value="yes">
  704. <label class="form-check-label" for="yesLiaisonRadio2">
  705. Yes
  706. </label>
  707. </div>
  708.  
  709. <div class="form-check">
  710. <input class="form-check-input" type="radio" name="eventRadio2" id="noLiaisonRadio2" value="no">
  711. <label class="form-check-label" for="noLiaisonRadio2">
  712. No
  713. </label>
  714. </div>
  715. </div>
  716. </div>
  717. <!-- End of fields hidden to user -->
  718.  
  719. <button type="submit" class="btn btn-primary">Register</button>
  720. </form>
  721. </div>
  722.  
  723. {{> footer }}
Add Comment
Please, Sign In to add comment