vishwamano

source of vishwamano.com
git clone git://git.ricketyspace.net/vishwamano.git
Log | Files | Refs

commit 8d335bef0ffc347d58dfd1d694a4198bf27acf44
parent e177380374c8844f0264337ed963f2a58e90fe50
Author: rsiddharth <rsiddharth@ninthfloor.org>
Date:   Tue,  6 Jan 2015 13:47:47 -0500

added notices in registration form at Photography Classes.

	modified:   as/photography-classes/index.php
	modified:   themes/bs3/templates/p-classes.tpl

Diffstat:
as/photography-classes/index.php | 8++++++++
themes/bs3/templates/p-classes.tpl | 12+++++++++++-
2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/as/photography-classes/index.php b/as/photography-classes/index.php @@ -87,6 +87,9 @@ $level_1 = array('Duration' => array('calendar', </ul>'), ); + +$l1_notice = 'Classes starts on <strong> 24<sup>th</sup> January 2015'; + $classes['Level 1 - Basic Photography Course '] = $level_1; @@ -112,8 +115,12 @@ $level_2 = array('Duration' => array('calendar', '8 Weekends'), <li> All relevant Post Processing </li></ul>') ); +$l2_notice = 'Classes starts in <strong>March 2015<strong>'; + $classes['Level 2 - Advanced Photography Course'] = $level_2; +$notices = array($l1_notice, $l2_notice); + # carousel images $c_img_dir = $abs_path . '/images/as/pc/carousel/'; $c_imgs = get_images($c_img_dir); @@ -131,6 +138,7 @@ $static = array('imgs' => $s_imgs, $smarty->assign('pc_title', $pc_title); $smarty->assign('pc_intro', $pc_intro); $smarty->assign('classes', $classes); +$smarty->assign('notices', $notices); $smarty->assign('carousel', $carousel); $smarty->assign('static', $static); $smarty->assign('title', $title); diff --git a/themes/bs3/templates/p-classes.tpl b/themes/bs3/templates/p-classes.tpl @@ -9,6 +9,10 @@ <h3 class="modal-title" id="vmreg-modal-label">Registration</h3> </div> <div class="modal-body"> + + <p id="reg-notice"> + </p> + <form id="vmreg-form" method="POST" role="form" action="/as/photography-classes/"> <div class="form-group"> <label for="name" class="control-label">Name:</label> @@ -91,7 +95,7 @@ class="btn btn-primary" data-toggle="modal" data-target="#vmreg-modal" data-pclasstype="{$c_name}" - data-pclasslevel="{$c_info@iteration}"> + data-pclasslevel="{$c_info@iteration}" data-notice="{$notices[$c_info@index]}"> Register </button> {/foreach} @@ -132,9 +136,15 @@ var button = $(event.relatedTarget) // Button that triggered the modal var class_type = button.data('pclasstype') // Extract info from data-* attributes var class_level = button.data('pclasslevel') + var class_notice = button.data('notice') + console.log(class_notice) var modal = $(this) modal.find('.modal-title').text(class_type + ' Registration') modal.find('#vmreg-submit').val(class_level) + if(class_notice.length > 0) { + modal.find('#reg-notice').addClass('text-center') + modal.find('#reg-notice').html('<span class="label label-inverse">' + class_notice + '</span>') + } }) </script> <script>