[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16181] more on eventplanner
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16181] more on eventplanner |
Date: |
Sun, 22 Jan 2017 11:47:40 -0500 (EST) |
Revision: 16181
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16181
Author: sigurdne
Date: 2017-01-22 11:47:39 -0500 (Sun, 22 Jan 2017)
Log Message:
-----------
more on eventplanner
Added Paths:
-----------
trunk/eventplannerfrontend/
trunk/eventplannerfrontend/css/
trunk/eventplannerfrontend/css/bookingfrontend.css
trunk/eventplannerfrontend/frontend.php
trunk/eventplannerfrontend/inc/
trunk/eventplannerfrontend/inc/class.bouser.inc.php
trunk/eventplannerfrontend/inc/class.hook_helper.inc.php
trunk/eventplannerfrontend/inc/class.menu.inc.php
trunk/eventplannerfrontend/inc/class.uibooking.inc.php
trunk/eventplannerfrontend/inc/class.uievents.inc.php
trunk/eventplannerfrontend/inc/class.uivendor.inc.php
trunk/eventplannerfrontend/inc/custom/
trunk/eventplannerfrontend/inc/custom/README
trunk/eventplannerfrontend/inc/custom/default/
trunk/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
trunk/eventplannerfrontend/inc/custom/default/Altinn_Bergen_kommune.php
trunk/eventplannerfrontend/inc/custom/default/MinId.php
trunk/eventplannerfrontend/inc/hook_config.inc.php
trunk/eventplannerfrontend/index.php
trunk/eventplannerfrontend/js/
trunk/eventplannerfrontend/js/portico/
trunk/eventplannerfrontend/js/portico/application.edit.js
trunk/eventplannerfrontend/js/portico/application.index.js
trunk/eventplannerfrontend/js/portico/booking.edit.js
trunk/eventplannerfrontend/js/portico/booking.index.js
trunk/eventplannerfrontend/js/portico/customer.index.js
trunk/eventplannerfrontend/js/portico/events.index.js
trunk/eventplannerfrontend/login.php
trunk/eventplannerfrontend/logout.php
trunk/eventplannerfrontend/setup/
trunk/eventplannerfrontend/setup/default_records.inc.php
trunk/eventplannerfrontend/setup/phpgw_no.lang
trunk/eventplannerfrontend/setup/setup.inc.php
trunk/eventplannerfrontend/setup/tables_current.inc.php
trunk/eventplannerfrontend/setup/tables_update.inc.php
trunk/eventplannerfrontend/templates/
trunk/eventplannerfrontend/templates/base/
trunk/eventplannerfrontend/templates/base/access_denied.xsl
trunk/eventplannerfrontend/templates/base/app_data.xsl
trunk/eventplannerfrontend/templates/base/application_info.xsl
trunk/eventplannerfrontend/templates/base/booking.xsl
trunk/eventplannerfrontend/templates/base/config.tpl
trunk/eventplannerfrontend/templates/base/customer.xsl
trunk/eventplannerfrontend/templates/base/events.xsl
Added: trunk/eventplannerfrontend/css/bookingfrontend.css
===================================================================
--- trunk/eventplannerfrontend/css/bookingfrontend.css
(rev 0)
+++ trunk/eventplannerfrontend/css/bookingfrontend.css 2017-01-22 16:47:39 UTC
(rev 16181)
@@ -0,0 +1,753 @@
+ul.pathway {font-size: 110%;font-weight: bolder;margin: 1em 0;padding: 0;}
+ul.pathway li a {color: #000;text-decoration: none;}
+ul.pathway li a:hover {color: #008;}
+ul.pathway li {background: rgba(0, 0, 0, 0)
url("../../phpgwapi/templates/pure/images/pathwaysep.png") no-repeat scroll 0
50%;display: inline;padding-left: 16px;}
+ul.pathway li:first-child {background: rgba(0, 0, 0, 0) none repeat scroll 0
0;padding-left: 0;}
+
+.bookingfrontend-table {border: 1px solid #cbcbcb;border-collapse:
collapse;border-spacing: 0;empty-cells: show;font-size: 12px;font-family:
Arial,Helvetica,Verdana,sans-serif;}
+.bookingfrontend-table caption {color: #000;font: italic 85%/1
arial,sans-serif;padding: 1em 0;text-align: center;}
+.bookingfrontend-table td, .bookingfrontend-table th {border-left: 1px solid
#cbcbcb;border-width: 0 0 0 1px;font-size: inherit;margin: 0;overflow:
visible;padding: 0.5em 1em;}
+.bookingfrontend-table td:first-child, .bookingfrontend-table th:first-child
{border-left-width: 0;}
+.bookingfrontend-table thead {background: #e0e0e0 none repeat scroll 0
0;color: #000;text-align: left;vertical-align: bottom;}
+.bookingfrontend-table td {background-color: transparent;}
+.bookingfrontend-table-odd td {background-color: #f2f2f2;}
+.bookingfrontend-table-striped tr:nth-child(2n-1) td {background-color:
#f2f2f2;}
+.bookingfrontend-table-bordered td {border-bottom: 1px solid #cbcbcb;}
+.bookingfrontend-table-bordered tbody > tr:last-child td,
.bookingfrontend-table-horizontal tbody > tr:last-child td
{border-bottom-width: 0;}
+.bookingfrontend-table-horizontal td, .bookingfrontend-table-horizontal th
{border-bottom: 1px solid #cbcbcb;border-width: 0 0 1px;}
+.bookingfrontend-table-horizontal tbody > tr:last-child td
{border-bottom-width: 0;}
+
+.bookingfrontend-table th {background: #e0e0e0 none repeat scroll 0 0;}
+.bookingfrontend-table thead th{text-align: center;font-weight: bold;}
+.bookingfrontend-table tbody th{border-top: 1px solid #cbcbcb;text-align:
right;font-weight: bold;color: #000;}
+
+/* TABLE PAGINATOR */
+.tablePaginator {margin-bottom: 10px;}
+.tablePaginator li {display: inline;}
+.tablePaginator li a {text-decoration: underline;}
+.tablePaginator li a.disabled {cursor: not-allowed;text-decoration: none;}
+.tablePaginator li a.enabled {cursor: pointer;}
+.tablePaginatorText {margin: 0 15px;}
+
+/*SCHEDULE*/
+#schedule_container {color: #000;margin-top: 15px;}
+#schedule_container .pure-table thead th {line-height: 1.4;}
+#schedule_container p.conflicts {margin: 0;color: #000;}
+#schedule_container .cellInfo:hover {background-image:
url("../../phpgwapi/templates/pure/images/info.png");background-position: 100%
0;background-repeat: no-repeat;cursor: pointer;}
+#schedule_container .free:hover {cursor: pointer;}
+#schedule_overlay {background-color: #fff;border: 1px solid #000;height:
auto;left: 0;margin: auto;padding: 20px;position: absolute;right: 0;width:
400px;z-index: 9;}
+#schedule_overlay img {bottom: 0;display: block;left: 0;margin: auto;position:
absolute;right: 0;top: 0;}
+#week-selector {list-style: outside none none;margin-top: 10px;cursor:
pointer;}
+#week-selector li {display: inline-block;}
+#week-selector .moveWeek{text-decoration: underline;}
+#cal_container {margin: 0 20px;}
+#cal_container #datepicker {width: 2px;opacity: 0;position:
absolute;display:none;}
+#cal_container #numberWeek {width: 20px;display: inline-block;}
+#cal_container > div {display: inline;}
+#dialog_schedule {text-align: left;}
+#dialog_schedule dl {margin-top: 10px;}
+#dialog_schedule dt {font-weight: bold;margin-top: 10px;}
+#dialog_schedule dd {padding-left: 25px;}
+/*SCHEDULE COLORS*/
+/*#schedule_container .color1 {
+ background-color: #ccccff;
+}
+#schedule_container .color2 {
+ background-color: #ccffcc;
+}
+#schedule_container .color3 {
+ background-color: #ffcccc;
+}
+#schedule_container .color4 {
+ background-color: #ffffbb;
+}
+#schedule_container .color5 {
+ background-color: #bbffff;
+}
+#schedule_container .color6 {
+ background-color: #ffbbff;
+}
+#schedule_container .color7 {
+ background-color: #de6d6d;
+}
+#schedule_container .color8 {
+ background-color: #f0f0f0;
+}
+#schedule_container .color9 {
+ background-color: #6495ed;
+}
+#schedule_container .color10 {
+ background-color: #90ee90;
+}
+#schedule_container .color11 {
+ background-color: #eee8aa;
+}
+#schedule_container .color12 {
+ background-color: #afeeee;
+}
+#schedule_container .color13 {
+ background-color: #ffb6c1;
+}
+#schedule_container .color14 {
+ background-color: #f0e68c;
+}
+#schedule_container .color15 {
+ background-color: #66cdaa;
+}
+#schedule_container .color16 {
+ background-color: #ffe4c4;
+}
+#schedule_container .color17 {
+ background-color: #ffa500;
+}
+#schedule_container .color18 {
+ background-color: #bdb76b;
+}
+#schedule_container .color19 {
+ background-color: #32cd32;
+}
+#schedule_container .color20 {
+ background-color: #ffe4b5;
+}
+#schedule_container .color21 {
+ background-color: #ff4040;
+}
+#schedule_container .color22 {
+ background-color: #ee3b3b;
+}
+#schedule_container .color23 {
+ background-color: #cd3333;
+}
+#schedule_container .color24 {
+ background-color: #8b2323;
+}
+#schedule_container .color25 {
+ background-color: #deb887;
+}
+#schedule_container .color26 {
+ background-color: #ffd39b;
+}
+#schedule_container .color27 {
+ background-color: #eec591;
+}
+#schedule_container .color28 {
+ background-color: #5f9ea0;
+}
+#schedule_container .color29 {
+ background-color: #98f5ff;
+}
+#schedule_container .color30 {
+ background-color: #8ee5ee;
+}
+#schedule_container .color31 {
+ background-color: #53868b;
+}
+#schedule_container .color32 {
+ background-color: #66cd00;
+}
+#schedule_container .color33 {
+ background-color: #458b00;
+}
+#schedule_container .color34 {
+ background-color: #d2691e;
+}
+#schedule_container .color35 {
+ background-color: #ff7f24;
+}
+#schedule_container .color36 {
+ background-color: #8b4513;
+}
+#schedule_container .color37 {
+ background-color: #ff7256;
+}
+#schedule_container .color38 {
+ background-color: #ffb90f;
+}
+#schedule_container .color39 {
+ background-color: #cd950c;
+}
+#schedule_container .color40 {
+ background-color: #8fbc8f;
+}
+#schedule_container .color41 {
+ background-color: #8b0000;
+}
+#schedule_container .color42 {
+ background-color: #c1ffc1;
+}
+#schedule_container .color43 {
+ background-color: #b4eeb4;
+}
+#schedule_container .color44 {
+ background-color: #9bcd9b;
+}
+#schedule_container .color45 {
+ background-color: #698b69;
+}
+#schedule_container .color46 {
+ background-color: #433d8b;
+}
+#schedule_container .color47 {
+ background-color: #ee1289;
+}
+#schedule_container .color48 {
+ background-color: #cd1076;
+}
+#schedule_container .color49 {
+ background-color: #8b0a50;
+}
+#schedule_container .color50 {
+ background-color: #ccc;
+}
+#schedule_container .color51 {
+ background-color: #ddd;
+}
+#schedule_container .color52 {
+ background-color: #eee;
+}
+#schedule_container .color53 {
+ background-color: #333;
+}
+#schedule_container .color54 {
+ background-color: #444;
+}
+#schedule_container .color55 {
+ background-color: #555;
+}
+#schedule_container .color56 {
+ background-color: #666;
+}
+#schedule_container .color57 {
+ background-color: #777;
+}
+#schedule_container .color58 {
+ background-color: #888;
+}
+#schedule_container .color59 {
+ background-color: #999;
+}
+#schedule_container .color60 {
+ background-color: #aaa;
+}*/
+
+
+/* BOOKINGFRONTEND */
+.content {
+ margin: 2em 1em;
+}
+.clr {
+ clear: both;
+}
+#inactive {
+ background-color: #ff5555;
+ border: 0.2em dotted #000000;
+ letter-spacing: 2px;
+ padding: 1em;
+ width: 10em;
+}
+#active {
+ background-color: #ffffff;
+ border: 0 dotted #000000;
+ letter-spacing: 2px;
+ padding: 1em;
+ width: 10em;
+}
+#inactivate-button {
+ background-color: #ffffff;
+ border: 1px solid #000000;
+ margin-top: 1em;
+ padding: 0.1em;
+}
+#activate-button {
+ background-color: #ffffff;
+ border: 1px solid #000000;
+ margin-top: 1em;
+ padding: 0.1em;
+}
+/*ul.pathway {
+ font-size: 110%;
+ font-weight: bolder;
+ margin: 1em 0;
+}
+ul.pathway li a {
+ color: #000;
+ text-decoration: none;
+}
+ul.pathway li a:hover {
+ color: #008;
+}
+ul.pathway li {
+ background: rgba(0, 0, 0, 0) url("../images/pathwaysep.png") no-repeat
scroll 0 50%;
+ display: inline;
+ padding-left: 16px;
+}
+ul.pathway li:first-child {
+ background: rgba(0, 0, 0, 0) none repeat scroll 0 0;
+ padding-left: 0;
+}*/
+
+dl.form, dl.form-col, dl.form-2col {
+ margin: 1em 1em 1em 0;
+ padding-right: 1em;
+}
+dl.form dt, dl.form-col dt, dl.form-2col dt {
+ color: #002;
+ font-style: italic;
+ font-weight: bolder;
+ margin: 0.5em 0 0.1em;
+}
+dl.form dt p, dl.form-col dt p, dl.form-2col dt p, dl.form-col p {
+ color: #002;
+ font-size: smaller;
+ font-style: normal;
+ font-weight: normal;
+}
+dl.form dd textarea, dl.form-col dd textarea {
+ height: 6em;
+ width: 15em;
+}
+dl.form-2col dd textarea {
+ height: 6em;
+ width: 36em;
+}
+dl.form dd textarea.full-width, dl.form-col dd textarea.full-width {
+ height: 10em;
+ width: 33em;
+}
+dl.form dd textarea.threecol-width, dl.form-col dd textarea.threecol-width {
+ height: 5em;
+ width: 58em;
+}
+/*dl.form dd input[type="text"], dl.form dd .autocomplete, dl.form-col dd
input[type="text"], dl.form-col dd .autocomplete {
+ width: 15em;
+}*/
+/*dl.form dd .autocomplete, dl.form-col dd .autocomplete, dl.form-2col dd
.autocomplete {
+ padding-bottom: 2em;
+}
+div.autocomplete {
+ position: relative;
+}
+div.autocomplete input {
+ z-index: 500;
+}*/
+#building_container ul {
+ z-index: 1000;
+}
+dl.form dt.heading, dl.form-col dt.heading, dl.form-2col dt.heading,
div.heading, dl.proplist dt.heading, dl.proplist-col dt.heading {
+ border-bottom: 1px solid #aaa;
+ color: #448;
+ font-size: 110%;
+ font-weight: normal;
+ margin-bottom: 0.6em;
+ margin-top: 1.4em;
+}
+dl.proplist {
+ clear: both;
+}
+dl.proplist, dl.proplist-col {
+ margin: 1em 0;
+ padding-right: 0.5em;
+}
+dl.proplist dt, dl.proplist-col dt {
+ font-size: 90%;
+ font-style: italic;
+ font-weight: bolder;
+ margin: 0.8em 0 0.1em;
+}
+/*dl.proplist-col, dl.form-col {
+ float: left;
+ width: 18em;
+}
+dl.form-2col {
+ float: left;
+ width: 38em;
+}*/
+.form-buttons {
+ clear: both;
+ padding-top: 2em;
+}
+.form-buttons button {
+ margin-right: 0.5em;
+}
+.form-buttons .cancel {
+ margin-left: 0.6em;
+}
+.date-picker .container, .datetime-picker .container {
+ display: none;
+ position: absolute;
+ z-index: 1;
+}
+#toolbar {
+ background-color: #eee;
+ border: 1px solid #bbb;
+ margin-bottom: 1em;
+ padding: 0.3em;
+ width: 100%;
+}
+#toolbar input[type="text"] {
+ font-size: 120%;
+ margin: auto 0.25em;
+ vertical-align: text-bottom;
+}
+#list_actions {
+ margin-top: 0.5em;
+}
+dl.proplist dd.address, dl.proplist-col dd.address {
+ white-space: pre;
+}
+#week-selector {
+ margin: 1em 0;
+}
+#week-selector li {
+ display: inline;
+ padding-right: 0.5em;
+}
+#schedule_container tr td {
+ background: white none repeat scroll 0 0;
+ border-top: 1px solid #ccc;
+ white-space: nowrap;
+}
+#schedule_container tbody tr th:first-child {
+ background: #eee none repeat scroll 0 0;
+}
+#schedule_container tr.time td {
+ border-top: 1px solid #444;
+}
+#schedule_container .color1 {
+ background-color: #ccccff;
+}
+#schedule_container .color2 {
+ background-color: #ccffcc;
+}
+#schedule_container .color3 {
+ background-color: #ffcccc;
+}
+#schedule_container .color4 {
+ background-color: #ffffbb;
+}
+#schedule_container .color5 {
+ background-color: #bbffff;
+}
+#schedule_container .color6 {
+ background-color: #ffbbff;
+}
+#schedule_container .color7 {
+ background-color: #de6d6d;
+}
+#schedule_container .color8 {
+ background-color: #f0f0f0;
+}
+#schedule_container .color9 {
+ background-color: #6495ed;
+}
+#schedule_container .color10 {
+ background-color: #90ee90;
+}
+#schedule_container .color11 {
+ background-color: #eee8aa;
+}
+#schedule_container .color12 {
+ background-color: #afeeee;
+}
+#schedule_container .color13 {
+ background-color: #ffb6c1;
+}
+#schedule_container .color14 {
+ background-color: #f0e68c;
+}
+#schedule_container .color15 {
+ background-color: #66cdaa;
+}
+#schedule_container .color16 {
+ background-color: #ffe4c4;
+}
+#schedule_container .color17 {
+ background-color: #ffa500;
+}
+#schedule_container .color18 {
+ background-color: #bdb76b;
+}
+#schedule_container .color19 {
+ background-color: #32cd32;
+}
+#schedule_container .color20 {
+ background-color: #ffe4b5;
+}
+#schedule_container .color21 {
+ background-color: #ff4040;
+}
+#schedule_container .color22 {
+ background-color: #ee3b3b;
+}
+#schedule_container .color23 {
+ background-color: #cd3333;
+}
+#schedule_container .color24 {
+ background-color: #8b2323;
+}
+#schedule_container .color25 {
+ background-color: #deb887;
+}
+#schedule_container .color26 {
+ background-color: #ffd39b;
+}
+#schedule_container .color27 {
+ background-color: #eec591;
+}
+#schedule_container .color28 {
+ background-color: #5f9ea0;
+}
+#schedule_container .color29 {
+ background-color: #98f5ff;
+}
+#schedule_container .color30 {
+ background-color: #8ee5ee;
+}
+#schedule_container .color31 {
+ background-color: #53868b;
+}
+#schedule_container .color32 {
+ background-color: #66cd00;
+}
+#schedule_container .color33 {
+ background-color: #458b00;
+}
+#schedule_container .color34 {
+ background-color: #d2691e;
+}
+#schedule_container .color35 {
+ background-color: #ff7f24;
+}
+#schedule_container .color36 {
+ background-color: #8b4513;
+}
+#schedule_container .color37 {
+ background-color: #ff7256;
+}
+#schedule_container .color38 {
+ background-color: #ffb90f;
+}
+#schedule_container .color39 {
+ background-color: #cd950c;
+}
+#schedule_container .color40 {
+ background-color: #8fbc8f;
+}
+#schedule_container .color41 {
+ background-color: #8b0000;
+}
+#schedule_container .color42 {
+ background-color: #c1ffc1;
+}
+#schedule_container .color43 {
+ background-color: #b4eeb4;
+}
+#schedule_container .color44 {
+ background-color: #9bcd9b;
+}
+#schedule_container .color45 {
+ background-color: #698b69;
+}
+#schedule_container .color46 {
+ background-color: #433d8b;
+}
+#schedule_container .color47 {
+ background-color: #ee1289;
+}
+#schedule_container .color48 {
+ background-color: #cd1076;
+}
+#schedule_container .color49 {
+ background-color: #8b0a50;
+}
+#schedule_container .color50 {
+ background-color: #ccc;
+}
+#schedule_container .color51 {
+ background-color: #ddd;
+}
+#schedule_container .color52 {
+ background-color: #eee;
+}
+#schedule_container .color53 {
+ background-color: #333;
+}
+#schedule_container .color54 {
+ background-color: #444;
+}
+#schedule_container .color55 {
+ background-color: #555;
+}
+#schedule_container .color56 {
+ background-color: #666;
+}
+#schedule_container .color57 {
+ background-color: #777;
+}
+#schedule_container .color58 {
+ background-color: #888;
+}
+#schedule_container .color59 {
+ background-color: #999;
+}
+#schedule_container .color60 {
+ background-color: #aaa;
+}
+#boundary-table td, #boundary-table th {
+ padding: 0.1em 0.2em;
+}
+.date-container {
+ margin-bottom: 0.8em;
+ white-space: nowrap;
+}
+.date-container .close-btn {
+ border: medium none;
+ color: black;
+ cursor: pointer;
+ display: block;
+ float: right;
+ height: 25px;
+ text-decoration: none;
+ width: 25px;
+ font-size: 100%;
+}
+#agegroup {
+ background: #eee none repeat scroll 0 0;
+ border: 1px solid #7f7f7f;
+}
+table#report {
+ background: #eee none repeat scroll 0 0;
+ border: 1px solid #7f7f7f;
+ white-space: nowrap;
+}
+table#report td, table#report th {
+ padding: 0.2em 0.5em;
+}
+div.allocation-list {
+ border: 1px solid #555;
+ height: 10em;
+ overflow: auto;
+ padding: 0.4em;
+ width: 30em;
+}
+.showit {
+ visibility: visible;
+}
+.hideit {
+ visibility: hidden;
+}
+.datetime-picker .time-picker-inputs {
+ position: relative;
+ top: 6px;
+ vertical-align: top;
+}
+.yui-overlay {
+ background-color: white;
+ border: 3px inset #999;
+}
+.yui-overlay .hd {
+ padding: 5px;
+}
+.yui-overlay .bd {
+ padding: 5px;
+}
+.yui overlay .ft {
+ padding: 5px;
+}
+.yui-calendar td.calcell {
+ border: 0 none !important;
+}
+.yui-skin-sam .yui-dt TABLE TH {
+ border: medium none !important;
+}
+.yui-skin-sam .yui-dt TABLE TD {
+ border: medium none !important;
+}
+div.info:hover {
+ background-image: url("../images/info.png");
+ background-position: 100% 0;
+ background-repeat: no-repeat;
+}
+#overlay-info {
+ padding: 1em;
+ text-align: left;
+}
+#overlay-info h3 {
+ margin: 0 0 0.9em;
+}
+#overlay-info dt {
+ font-size: 90%;
+ font-style: italic;
+ font-weight: bolder;
+}
+#overlay-info dd {
+ padding-left: 2em;
+}
+#overlay-info .close {
+ float: right;
+}
+#overlay-info .actions {
+ margin-top: 1em;
+}
+
+/* AUTOCOMPLETE */
+.ui-widget.ui-autocomplete {
+ max-height: 224px;
+ overflow-x: hidden;
+ overflow-y: auto;
+}
+.ui-menu .ui-menu-item {
+ text-align: left;
+}
+
+/* GENERAL */
+#wrapper {max-width: 1000px;width: 90%;}
+dd {margin-left: 0;}
+#dates-container {width: 18em;}
+
+.ui-widget-overlay {background-image: none;}
+
+#field_customer_ssn {display: block;}
+#field_customer_organization_number {display: block;}
+
+.pure-g [class*="pure-u"] {padding: 0;font-family: verdana,sans-serif;}
+.pure-g [class*="pure-u"] button,
+.pure-g [class*="pure-u"] input,
+.pure-g [class*="pure-u"] select,
+.pure-g [class*="pure-u"] textarea {max-width: 90%;}
+.pure-table {font-size: 12px;font-family: Arial,Helvetica,Verdana,sans-serif;}
+
+#frontend .pure-g dl.proplist-col main {width: 100%;}
+#frontend .pure-g dl.proplist-col.main {width: 100%;}
+#frontend .pure-g dl.proplist-col.images {margin: 0 auto;max-width:
300px;width: 90%;clear: none;float: none;}
+#frontend .pure-g dl.proplist-col.images.map {max-width: 500px;width:
100%;max-height: 300px;}
+.gmap-container {position: relative;padding-bottom: 60%;height: 0;overflow:
hidden;}
+.gmap-container iframe {position: absolute;top: 0;left: 0;width: 100%
!important;height: 100% !important;}
+#frontend .pure-g dl.proplist.images dd img {width: 100%;}
+
+ol#result .header {text-align: left;}
+
+select.error,
+select.valid {background-position: right 18px center !important;}
+
+.error,
+.valid {border-width: 1px;border-style: solid;box-shadow: 0 0 0 0 transparent
inset;}
+
+.dataTables_wrapper {width: 98%;margin: 0 auto;}
+.dataTable thead,
+.dataTable th,
+.dataTable .th {background-color: transparent;}
+.dataTable {text-align: initial;}
+
+.scrollup {
+ position: fixed;
+ bottom: 50px;
+ right: 10px;
+ display: none;
+ text-indent: -9999px;
+ width: 50px;
+ height: 50px;
+ background-repeat: no-repeat;
+ background-image:
url("../../phpgwapi/templates/pure/images/arrow34.png");
+}
+
Added: trunk/eventplannerfrontend/frontend.php
===================================================================
--- trunk/eventplannerfrontend/frontend.php (rev 0)
+++ trunk/eventplannerfrontend/frontend.php 2017-01-22 16:47:39 UTC (rev
16181)
@@ -0,0 +1,14 @@
+<?php
+ $phpgw_info = array();
+ $GLOBALS['phpgw_info']['flags'] = array
+ (
+ 'disable_template_class' => true,
+ 'login' => true,
+ 'currentapp' => 'login',
+ 'noheader' => true,
+ 'nonavbar' => true,
+ );
+ $GLOBALS['phpgw_info']['flags']['session_name'] =
'eventplannerfrontendsession';
+ include_once('../header.inc.php');
+ $GLOBALS['phpgw']->redirect_link('/eventplannerfrontend/');
+ exit;
Property changes on: trunk/eventplannerfrontend/frontend.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/eventplannerfrontend/inc/class.bouser.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.bouser.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/class.bouser.inc.php 2017-01-22 16:47:39 UTC
(rev 16181)
@@ -0,0 +1,367 @@
+<?php
+
+ class eventplannerfrontend_bouser
+ {
+
+ const ORGNR_SESSION_KEY = 'orgnr';
+ const ORGARRAY_SESSION_KEY = 'orgarray';
+
+ public $orgnr = null;
+ public $orgname = null;
+ protected
+ $default_module = 'eventplannerfrontend',
+ $module,
+ $config;
+
+ /**
+ * Debug for testing
+ * @access public
+ * @var bool
+ */
+ public $debug = false;
+
+ public function __construct()
+ {
+ $this->set_module();
+ $this->orgnr = $this->get_user_orgnr_from_session();
+ $this->orgname =
$this->get_orgname_from_db($this->get_user_orgnr_from_session());
+ $this->config = CreateObject('phpgwapi.config',
'eventplannerfrontend');
+ $this->config->read();
+ }
+
+ protected function get_orgname_from_db( $orgnr )
+ {
+ $this->db = & $GLOBALS['phpgw']->db;
+ $this->db->limit_query("select name from
bb_organization where organization_number ='" . $orgnr . "'", 0, __LINE__,
__FILE__, 1);
+ if (!$this->db->next_record())
+ {
+ return $orgnr;
+ }
+ return $this->db->f('name', false);
+ }
+
+ protected function get_organizations()
+ {
+ $results = array();
+ $this->db = & $GLOBALS['phpgw']->db;
+ $this->db->query("select organization_number from
bb_organization ORDER by organization_number ASC", __LINE__, __FILE__);
+ while ($this->db->next_record())
+ {
+ $results[] =
$this->db->f('organization_number', false);
+ }
+ return $results;
+ }
+
+ protected function set_module( $module = null )
+ {
+ $this->module = is_string($module) ? $module :
$this->default_module;
+ }
+
+ public function get_module()
+ {
+ return $this->module;
+ }
+
+ public function log_in()
+ {
+ $this->log_off();
+
+ $authentication_method =
isset($this->config->config_data['authentication_method']) &&
$this->config->config_data['authentication_method'] ?
$this->config->config_data['authentication_method'] : '';
+
+ if (!$authentication_method)
+ {
+ throw new LogicException('authentication_method
not chosen');
+ }
+
+ $file = PHPGW_SERVER_ROOT .
"/eventplannerfrontend/inc/custom/default/{$authentication_method}";
+
+ if (!is_file($file))
+ {
+ throw new LogicException("authentication method
\"{$authentication_method}\" not available");
+ }
+
+ require_once $file;
+
+ $external_user = new
eventplannerfrontend_external_user();
+
+ $this->orgnr = $external_user->get_user_org_id();
+ $this->orgname =
$this->get_orgname_from_db($this->orgnr);
+
+ if ($this->is_logged_in())
+ {
+ $this->write_user_orgnr_to_session();
+ }
+
+ if ($this->debug)
+ {
+ echo 'is_logged_in():<br>';
+ _debug_array($this->is_logged_in());
+ echo 'Session:<br>';
+ _debug_array($_SESSION);
+ die();
+ }
+
+ return $this->is_logged_in();
+ }
+
+ public function change_org( $orgnumber )
+ {
+ $orgs =
phpgwapi_cache::session_get($this->get_module(), self::ORGARRAY_SESSION_KEY);
+ $orglist = array();
+ foreach ($orgs as $org)
+ {
+ $orglist[] = $org['orgnumber'];
+ }
+ if (in_array($orgnumber, $orglist))
+ {
+
+ $this->orgnr = $orgnumber;
+ $this->orgname =
$this->get_orgname_from_db($this->orgnr);
+
+ if ($this->is_logged_in())
+ {
+ $this->write_user_orgnr_to_session();
+ }
+
+ return $this->is_logged_in();
+ }
+ else
+ {
+
+ if ($this->is_logged_in())
+ {
+ $this->write_user_orgnr_to_session();
+ }
+
+ return $this->is_logged_in();
+ }
+ }
+
+ public function log_off()
+ {
+ $this->clear_user_orgnr();
+ $this->clear_user_orgnr_from_session();
+ $this->clear_user_orglist_from_session();
+ }
+
+ protected function clear_user_orgnr()
+ {
+ $this->orgnr = null;
+ $this->orgname = null;
+ }
+
+ public function get_user_orgnr()
+ {
+ if (!$this->orgnr)
+ {
+ $this->orgnr =
$this->get_user_orgnr_from_session();
+ }
+ return $this->orgnr;
+ }
+
+ public function is_logged_in()
+ {
+ return !!$this->get_user_orgnr();
+ }
+
+ public function is_organization_admin( $organization_id = null )
+ {
+ // FIXME!!!!!! REMOVE THIS ONCE ALTINN IS OPERATIONAL
+ if (strcmp($_SERVER['SERVER_NAME'], 'dev.redpill.se')
== 0 || strcmp($_SERVER['SERVER_NAME'], 'bk.localhost') == 0)
+ {
+ //return true;
+ }
+ // FIXME!!!!!! REMOVE THIS ONCE ALTINN IS OPERATIONAL
+ if (!$this->is_logged_in())
+ {
+ //return false;
+ }
+ $so = CreateObject('booking.soorganization');
+ $organization = $so->read_single($organization_id);
+
+ if ($organization['organization_number'] == '')
+ {
+ return false;
+ }
+
+ return $organization['organization_number'] ==
$this->orgnr;
+ }
+
+ public function is_group_admin( $group_id = null )
+ {
+ // FIXME!!!!!! REMOVE THIS ONCE ALTINN IS OPERATIONAL
+ if (strcmp($_SERVER['SERVER_NAME'], 'dev.redpill.se')
== 0 || strcmp($_SERVER['SERVER_NAME'], 'bk.localhost') == 0)
+ {
+ //return true;
+ }
+ // FIXME!!!!!! REMOVE THIS ONCE ALTINN IS OPERATIONAL
+ if (!$this->is_logged_in())
+ {
+ //return false;
+ }
+ $so = CreateObject('booking.sogroup');
+ $group = $so->read_single($group_id);
+ return
$this->is_organization_admin($group['organization_id']);
+ }
+
+ protected function write_user_orgnr_to_session()
+ {
+ if (!$this->is_logged_in())
+ {
+ throw new LogicException('Cannot write orgnr to
session unless user is logged on');
+ }
+
+ phpgwapi_cache::session_set($this->get_module(),
self::ORGNR_SESSION_KEY, $this->get_user_orgnr());
+ }
+
+ protected function clear_user_orgnr_from_session()
+ {
+ phpgwapi_cache::session_clear($this->get_module(),
self::ORGNR_SESSION_KEY);
+ }
+
+ protected function clear_user_orglist_from_session()
+ {
+# phpgwapi_cache::session_clear($this->get_module(),
self::ORGARRAY_SESSION_KEY);
+ }
+
+ protected function get_user_orgnr_from_session()
+ {
+ try
+ {
+ return
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean(phpgwapi_cache::session_get($this->get_module(),
self::ORGNR_SESSION_KEY));
+ }
+ catch (sfValidatorError $e)
+ {
+ return null;
+ }
+ }
+
+ protected function get_breg_orgs( $fodselsnr )
+ {
+ $breg_conn = pg_connect("host=" .
$GLOBALS['phpgw_domain']['default']['db_host'] . " port=5432 dbname=breg user="
. $GLOBALS['phpgw_domain']['default']['db_user'] . " password=" .
$GLOBALS['phpgw_domain']['default']['db_pass']) or die('connection failed');
+ $sql = "SELECT distinct orgnr FROM breg.personcurrent
WHERE fodselsnr ='" . $fodselsnr . "'";
+ $results = pg_query($breg_conn, $sql);
+ $orgs = pg_fetch_all($results);
+ print_r($sql);
+ print_r($orgs);
+ pg_close($breg_conn);
+ return $orgs;
+ }
+
+ protected function get_user_orgnr_from_auth_header()
+ {
+ $config = CreateObject('phpgwapi.config',
'eventplannerfrontend');
+ $config->read();
+ if ($config->config_data['authentication_method'] ===
'MinId.php')
+ {
+ $ipdp = sha1($_SERVER['HTTP_UID']);
+ $bregorgs = $this->get_breg_orgs($ipdp);
+ $myorgnr = array();
+ if ($bregorgs == array())
+ {
+ $external_user = (object)'ciao';
+ $external_user->login = '000000000';
+ }
+ else
+ {
+ foreach ($bregorgs as $org)
+ {
+ $myorgnr[] = $org['orgnr'];
+ }
+ if (count($myorgnr) > 1)
+ {
+ $external_user = (object)'ciao';
+ $external_user->login =
$myorgnr[0];
+ $orgs = array();
+ foreach ($myorgnr as $org)
+ {
+ $orgs[] =
array('orgnumber' => $org, 'orgname' => $this->get_orgname_from_db($org));
+ }
+
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY,
$orgs);
+ }
+ elseif (count($myorgnr) > 0)
+ {
+
phpgwapi_cache::session_set($this->get_module(), self::ORGARRAY_SESSION_KEY,
NULL);
+ $external_user = (object)'ciao';
+ $external_user->login =
$myorgnr[0];
+ }
+ }
+ }
+ else
+ {
+
+ $header_key =
isset($config->config_data['header_key']) && $config->config_data['header_key']
? $config->config_data['header_key'] : 'Osso-User-Dn';
+ $header_regular_expression =
isset($config->config_data['header_regular_expression']) &&
$config->config_data['header_regular_expression'] ?
$config->config_data['header_regular_expression'] : '/^cn=(.*),cn=users.*$/';
+
+ $headers = getallheaders();
+
+ if (isset($config->config_data['debug']) &&
$config->config_data['debug'])
+ {
+ $this->debug = true;
+ echo 'headers:<br>';
+ _debug_array($headers);
+ }
+
+ if (isset($headers[$header_key]) &&
$headers[$header_key])
+ {
+ $matches = array();
+
preg_match_all($header_regular_expression, $headers[$header_key], $matches);
+ $userid = $matches[1][0];
+
+ if ($this->debug)
+ {
+ echo 'matches:<br>';
+ _debug_array($matches);
+ }
+ }
+
+ $options = array();
+ $options['soap_version'] = SOAP_1_1;
+ $options['location'] =
isset($config->config_data['soap_location']) &&
$config->config_data['soap_location'] ? $config->config_data['soap_location'] :
'';// 'http://soat1a.srv.bergenkom.no:8888/gateway/services/BrukerService-v1';
+ $options['uri'] =
isset($config->config_data['soap_uri']) && $config->config_data['soap_uri'] ?
$config->config_data['soap_uri'] : '';// 'http://soat1a.srv.bergenkom.no';
+ $options['trace'] = 1;
+
+ if
(isset($config->config_data['soap_proxy_host']) &&
$config->config_data['soap_proxy_host'])
+ {
+ $options['proxy_host'] =
$config->config_data['soap_proxy_host'];
+ }
+
+ if
(isset($config->config_data['soap_proxy_port']) &&
$config->config_data['soap_proxy_port'])
+ {
+ $options['proxy_port'] =
$config->config_data['soap_proxy_port'];
+ }
+ $options['encoding'] =
isset($config->config_data['soap_encoding']) &&
$config->config_data['soap_encoding'] ? $config->config_data['soap_encoding'] :
'UTF-8';
+ $options['login'] =
isset($config->config_data['soap_login']) && $config->config_data['soap_login']
? $config->config_data['soap_login'] : '';
+ $options['password'] =
isset($config->config_data['soap_password']) &&
$config->config_data['soap_password'] ? $config->config_data['soap_password'] :
'';
+
+ $wsdl =
isset($config->config_data['soap_wsdl']) && $config->config_data['soap_wsdl'] ?
$config->config_data['soap_wsdl'] : '';//
'http://soat1a.srv.bergenkom.no:8888/gateway/services/BrukerService-v1?wsdl';
+
+ $authentication_method =
isset($config->config_data['authentication_method']) &&
$config->config_data['authentication_method'] ?
$config->config_data['authentication_method'] : '';
+
+ require_once PHPGW_SERVER_ROOT .
"/eventplannerfrontend/inc/custom/default/{$authentication_method}";
+
+ $external_user = new
booking_external_user($wsdl, $options, $userid, $this->debug);
+ // test values
+ //$external_user = (object) 'ciao';
$external_user->login = 994239929;
+ }
+
+ if ($this->debug)
+ {
+ echo 'External user:<br>';
+ _debug_array($external_user);
+ }
+ try
+ {
+ return
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean($external_user->login);
+ }
+ catch (sfValidatorError $e)
+ {
+ if ($this->debug)
+ {
+ echo $e->getMessage();
+ die();
+ }
+ return null;
+ }
+ }
+ }
\ No newline at end of file
Added: trunk/eventplannerfrontend/inc/class.hook_helper.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.hook_helper.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/class.hook_helper.inc.php 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,53 @@
+<?php
+ /**
+ * Bookingfrontend - Hook helper
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2013 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @package Property
+ * @version $Id: class.hook_helper.inc.php 14728 2016-02-11 22:28:46Z
sigurdne $
+ */
+ /*
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /**
+ * Hook helper
+ *
+ * @package eventplannerfrontend
+ */
+ class eventplannerfrontend_hook_helper
+ {
+
+
+ public function set_cookie_domain()
+ {
+ $script_path =
dirname(phpgw::get_var('SCRIPT_FILENAME', 'string', 'SERVER'));
+
+ if(preg_match('/eventplannerfrontend/', $script_path))
+ {
+ //get from local config
+ $config = CreateObject('phpgwapi.config',
'eventplannerfrontend');
+ $config->read();
+
+
$GLOBALS['phpgw_info']['server']['cookie_domain'] =
!empty($GLOBALS['phpgw_info']['server']['cookie_domain']) ?
$GLOBALS['phpgw_info']['server']['cookie_domain'] : '';
+
+ if
(!empty($config->config_data['cookie_domain']))
+ {
+
$GLOBALS['phpgw_info']['server']['cookie_domain'] =
$config->config_data['cookie_domain'];
+ }
+ }
+ }
+ }
\ No newline at end of file
Added: trunk/eventplannerfrontend/inc/class.menu.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.menu.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/class.menu.inc.php 2017-01-22 16:47:39 UTC
(rev 16181)
@@ -0,0 +1,40 @@
+<?php
+
+ class eventplannerfrontend_menu
+ {
+
+ function get_menu()
+ {
+ $incoming_app =
$GLOBALS['phpgw_info']['flags']['currentapp'];
+ $GLOBALS['phpgw_info']['flags']['currentapp'] =
'eventplannerfrontend';
+
+ $menus = array();
+
+ if ($GLOBALS['phpgw']->acl->check('run',
phpgwapi_acl::READ, 'admin') || $GLOBALS['phpgw']->acl->check('admin',
phpgwapi_acl::ADD, 'eventplannerfrontend'))
+ {
+ $menus['admin'] = array
+ (
+ 'index' => array
+ (
+ 'text' => lang('Configuration'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'admin.uiconfig.index',
+ 'appname' =>
'eventplannerfrontend'))
+ ),
+ 'acl' => array(
+ 'text' =>
$GLOBALS['phpgw']->translation->translate('Configure Access Permissions',
array(), true),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'preferences.uiadmin_acl.list_acl',
+ 'acl_app' =>
'eventplannerfrontend'))
+ ),
+ 'metasettings' => array
+ (
+ 'text' => lang('Metadata'),
+ 'url' =>
$GLOBALS['phpgw']->link('/index.php', array('menuaction' =>
'booking.uimetasettings.index',
+ 'appname' =>
'eventplanner'))
+ ),
+ );
+ }
+
+ $GLOBALS['phpgw_info']['flags']['currentapp'] =
$incoming_app;
+ return $menus;
+ }
+ }
\ No newline at end of file
Added: trunk/eventplannerfrontend/inc/class.uibooking.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.uibooking.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/class.uibooking.inc.php 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,28 @@
+<?php
+ phpgw::import_class('eventplanner.uibooking');
+ include_class('eventplanner', 'application', 'inc/model/');
+ class eventplannerfrontend_uibooking extends eventplanner_uibooking
+ {
+
+ public function __construct()
+ {
+ $GLOBALS['phpgw']->translation->add_app('eventplanner');
+ parent::__construct();
+ }
+
+ public function query()
+ {
+ $params = $this->bo->build_default_read_params();
+ $params['filters']['status'] =
eventplanner_application::STATUS_APPROVED;
+ $values = $this->bo->read($params);
+ array_walk($values["results"], array($this,
"_add_links"), "eventplannerfrontend.uibooking.edit");
+
+ return $this->jquery_results($values);
+ }
+
+ public function edit()
+ {
+ parent::edit();
+ }
+
+ }
Added: trunk/eventplannerfrontend/inc/class.uievents.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.uievents.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/class.uievents.inc.php 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,23 @@
+<?php
+ phpgw::import_class('eventplanner.uievents');
+
+ class eventplannerfrontend_uievents extends eventplanner_uievents
+ {
+
+ public function __construct()
+ {
+ $GLOBALS['phpgw']->translation->add_app('eventplanner');
+ parent::__construct();
+ }
+
+ public function query()
+ {
+ $params = $this->bo->build_default_read_params();
+ $params['filters']['status'] =
eventplanner_application::STATUS_APPROVED;
+ $values = $this->bo->read($params);
+ array_walk($values["results"], array($this,
"_add_links"), "eventplannerfrontend.uievents.edit");
+
+ return $this->jquery_results($values);
+ }
+
+ }
\ No newline at end of file
Added: trunk/eventplannerfrontend/inc/class.uivendor.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.uivendor.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/class.uivendor.inc.php 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,23 @@
+<?php
+ phpgw::import_class('eventplanner.uivendor');
+
+ class eventplannerfrontend_uivendor extends eventplanner_uivendor
+ {
+
+ public function __construct()
+ {
+ $GLOBALS['phpgw']->translation->add_app('eventplanner');
+ parent::__construct();
+ }
+
+ public function query()
+ {
+ $params = $this->bo->build_default_read_params();
+ $params['filters']['status'] =
eventplanner_application::STATUS_APPROVED;
+ $values = $this->bo->read($params);
+ array_walk($values["results"], array($this,
"_add_links"), "eventplannerfrontend.uivendor.edit");
+
+ return $this->jquery_results($values);
+ }
+
+ }
Added: trunk/eventplannerfrontend/inc/custom/README
===================================================================
--- trunk/eventplannerfrontend/inc/custom/README
(rev 0)
+++ trunk/eventplannerfrontend/inc/custom/README 2017-01-22 16:47:39 UTC
(rev 16181)
@@ -0,0 +1 @@
+The custom functions are separated by the phpgw_domain - for mulitple domains
- one has to create one catalog for each domain.
Property changes on: trunk/eventplannerfrontend/inc/custom/README
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
===================================================================
--- trunk/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/custom/default/Altinn2_Bergen_kommune.php
2017-01-22 16:47:39 UTC (rev 16181)
@@ -0,0 +1,204 @@
+<?php
+ /**
+ * phpGroupWare
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2010 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package phpgroupware
+ * @subpackage communication
+ * @category core
+ * @version $Id: Altinn_Bergen_kommune.php 4887 2010-02-23 10:33:44Z
sigurd $
+ */
+ /*
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /**
+ * Wrapper for custom methods
+ *
+ * @package phpgroupware
+ * @subpackage bookingfrontend
+ */
+ class bookingfrontend_external_user extends bookingfrontend_bouser
+ {
+
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ public function get_user_org_id()
+ {
+ $headers = getallheaders();
+ if (isset($this->config->config_data['debug']) &&
$this->config->config_data['debug'])
+ {
+ $this->debug = true;
+ echo 'headers:<br>';
+ _debug_array($headers);
+ }
+
+ $fodsels_nr = $headers['uid'];
+
+ if ($this->debug)
+ {
+ echo 'fødselsnr:<br>';
+ _debug_array($fodsels_nr);
+ }
+
+ $request = "<soapenv:Envelope
+
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"
+ xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"
+
xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"
+
xmlns:v1=\"http://bergen.kommune.no/biz/bk/authorization/ReporteesService/v1\">
+ <soapenv:Body>
+ <v1:getOrganisasjonsAvgivere>
+
<fodselsNr>{$fodsels_nr}</fodselsNr>
+ </v1:getOrganisasjonsAvgivere>
+ </soapenv:Body>
+ </soapenv:Envelope>";
+
+ $location_URL =
isset($this->config->config_data['soap_location']) &&
$this->config->config_data['soap_location'] ?
$this->config->config_data['soap_location'] :
"http://wsm01e-t.usrv.ubergenkom.no:8888/gateway/services/AltinnReporteesService";
#A-test
+
+ $soap_login = $this->config->config_data['soap_login'];
+ $soap_password =
$this->config->config_data['soap_password'];
+
+ $client = new SoapClient(null, array(
+ 'location' => $location_URL,
+ 'uri' => "",
+ 'trace' => 1,
+ 'login' => $soap_login,
+ 'password' => $soap_password
+ ));
+
+ try
+ {
+ $action = "";
+ $response = $client->__doRequest($request,
$location_URL, $action, 1);
+ $reader = new XMLReader();
+ $reader->xml($response);
+
+ $orgs = array();
+ $orgs_validate = array();
+ while ($reader->read())
+ {
+ if ($reader->nodeType ==
XMLREADER::ELEMENT && $reader->localName == 'return')
+ {
+ $xml = new DOMDocument('1.0',
'utf-8');
+ $xml->formatOutput = true;
+ $domnode = $reader->expand();
+ $xml->appendChild($domnode);
+ unset($domnode);
+ $_org_id =
$xml->getElementsByTagName('organizationNumber')->item(0)->nodeValue;
+ $orgs[] = array
+ (
+ 'id' => $_org_id,
+ 'name' =>
$xml->getElementsByTagName('name')->item(0)->nodeValue,
+ );
+ $orgs_validate[] = $_org_id;
+ }
+ }
+ }
+ catch (SoapFault $exception)
+ {
+ echo "Dette gikk ikke så bra.";
+ var_dump(get_class($exception));
+ var_dump($exception);
+ }
+
+ $stage = phpgw::get_var('stage');
+ $org_id = phpgw::get_var('org_id');
+
+ if ($stage == 2 && $fodsels_nr && in_array($org_id,
$orgs_validate))
+ {
+ try
+ {
+ return
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean($org_id);
+ }
+ catch (sfValidatorError $e)
+ {
+ if ($this->debug)
+ {
+ echo $e->getMessage();
+ die();
+ }
+ return null;
+ }
+ }
+
+ foreach ($orgs as $org)
+ {
+ $selected = '';
+ if ($org_id == $org['id'])
+ {
+ $selected = 'selected = "selected"';
+ }
+
+ $org_option .= <<<HTML
+ <option
value='{$org['id']}'{$selected}>{$org['name']}</option>
+
+HTML;
+ }
+
+ if ($orgs)
+ {
+ $action =
$GLOBALS['phpgw']->link('/bookingfrontend/login.php', array('stage' => 2));
+ $message = 'Velg organisasjon';
+
+ $org_select = <<<HTML
+ <p>
+ <label
for="org_id">Velg Organisasjon:</label>
+ <select
name="org_id" id="org_id">
+
{$org_option}
+ </select>
+ </p>
+HTML;
+ }
+ else
+ {
+ $action =
$GLOBALS['phpgw']->link('/bookingfrontend/index.php');
+ $message = 'Ikke representant for noen
organisasjon';
+ $org_select = '';
+ }
+
+ $html = <<<HTML
+ <!DOCTYPE html>
+ <html>
+ <head>
+ <title>Velg organisasjon</title>
+ <meta http-equiv="Content-Type"
content="text/html; charset=utf-8">
+ </head>
+ <body>
+ <h2>{$message}</h2>
+ <form action="{$action}" method="post">
+ <fieldset>
+ <legend>
+ Organisasjon
+ </legend>
+ $org_select
+ <p>
+ <input
type="submit" name="submit" value="Fortsett" />
+ </p>
+ </fieldset>
+ </form>
+ </body>
+ </html>
+HTML;
+
+ echo $html;
+
+ $GLOBALS['phpgw']->common->phpgw_exit();
+ }
+ }
\ No newline at end of file
Added: trunk/eventplannerfrontend/inc/custom/default/Altinn_Bergen_kommune.php
===================================================================
--- trunk/eventplannerfrontend/inc/custom/default/Altinn_Bergen_kommune.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/custom/default/Altinn_Bergen_kommune.php
2017-01-22 16:47:39 UTC (rev 16181)
@@ -0,0 +1,340 @@
+<?php
+ /**
+ * phpGroupWare
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2010 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package phpgroupware
+ * @subpackage communication
+ * @category core
+ * @version $Id: Altinn_Bergen_kommune.php 14728 2016-02-11 22:28:46Z
sigurdne $
+ */
+ /*
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /**
+ * Wrapper for custom methods
+ *
+ * @package phpgroupware
+ * @subpackage bookingfrontend
+ */
+ class bookingfrontend_external_user extends bookingfrontend_bouser
+ {
+
+ public function __construct()
+ {
+ parent::__construct();
+ }
+
+ public function get_user_org_id()
+ {
+
+ $header_key =
isset($this->config->config_data['header_key']) &&
$this->config->config_data['header_key'] ?
$this->config->config_data['header_key'] : 'Osso-User-Dn';
+ $header_regular_expression =
isset($this->config->config_data['header_regular_expression']) &&
$this->config->config_data['header_regular_expression'] ?
$this->config->config_data['header_regular_expression'] :
'/^cn=(.*),cn=users.*$/';
+
+ $headers = getallheaders();
+
+ if (isset($this->config->config_data['debug']) &&
$this->config->config_data['debug'])
+ {
+ $this->debug = true;
+ echo 'headers:<br>';
+ _debug_array($headers);
+ }
+
+ if (isset($headers[$header_key]) &&
$headers[$header_key])
+ {
+ $matches = array();
+ preg_match_all($header_regular_expression,
$headers[$header_key], $matches);
+ $userid = $matches[1][0];
+
+ if ($this->debug)
+ {
+ echo 'matches:<br>';
+ _debug_array($matches);
+ }
+ }
+
+ $options = array();
+ $options['soap_version'] = SOAP_1_1;
+ $options['location'] =
isset($this->config->config_data['soap_location']) &&
$this->config->config_data['soap_location'] ?
$this->config->config_data['soap_location'] : '';//
'http://soat1a.srv.bergenkom.no:8888/gateway/services/BrukerService-v1';
+ $options['uri'] =
isset($this->config->config_data['soap_uri']) &&
$this->config->config_data['soap_uri'] ? $this->config->config_data['soap_uri']
: '';// 'http://soat1a.srv.bergenkom.no';
+ $options['trace'] = 1;
+
+ if
(isset($this->config->config_data['soap_proxy_host']) &&
$this->config->config_data['soap_proxy_host'])
+ {
+ $options['proxy_host'] =
$this->config->config_data['soap_proxy_host'];
+ }
+
+ if
(isset($this->config->config_data['soap_proxy_port']) &&
$this->config->config_data['soap_proxy_port'])
+ {
+ $options['proxy_port'] =
$this->config->config_data['soap_proxy_port'];
+ }
+ $options['encoding'] =
isset($this->config->config_data['soap_encoding']) &&
$this->config->config_data['soap_encoding'] ?
$this->config->config_data['soap_encoding'] : 'UTF-8';
+ $options['login'] =
isset($this->config->config_data['soap_login']) &&
$this->config->config_data['soap_login'] ?
$this->config->config_data['soap_login'] : '';
+ $options['password'] =
isset($this->config->config_data['soap_password']) &&
$this->config->config_data['soap_password'] ?
$this->config->config_data['soap_password'] : '';
+
+ $wsdl = isset($this->config->config_data['soap_wsdl'])
&& $this->config->config_data['soap_wsdl'] ?
$this->config->config_data['soap_wsdl'] : '';//
'http://soat1a.srv.bergenkom.no:8888/gateway/services/BrukerService-v1?wsdl';
+
+ try
+ {
+ $BrukerService = new BrukerService($wsdl,
$options);
+ }
+ catch (Exception $e)
+ {
+ if ($this->debug)
+ {
+ echo $e->getMessage();
+ echo '<br>wsdl: ' . $wsdl;
+ echo '<br>options:';
+ _debug_array($options);
+ }
+ }
+
+ $ctx = new UserContext();
+
+ $ctx->appid = 'portico';
+ $ctx->onBehalfOfId = $userid;
+ $ctx->userid = $userid;
+ $ctx->transactionid =
$GLOBALS['phpgw_info']['server']['install_id']; // KAN UTELATES. BENYTTES I.F.M
SUPPORT. LEGG INN EN FOR DEG UNIK ID.
+
+ $request = new retrieveBruker();
+ $request->userContext = $ctx;
+ $request->userid = $userid;
+
+ $response = $BrukerService->retrieveBruker($request);
+ $Bruker = $response->return;
+
+ try
+ {
+ return
createObject('booking.sfValidatorNorwegianOrganizationNumber')->clean($Bruker->ou);
+ }
+ catch (sfValidatorError $e)
+ {
+ if ($this->debug)
+ {
+ echo $e->getMessage();
+ die();
+ }
+ return null;
+ }
+ }
+ }
+ /**
+ * soap client for altinn supported external login service at Bergen
Kommune
+ * this code is generated by the
http://code.google.com/p/wsdl2php-interpreter/
+ *
+ * @package phpgroupware
+ * @subpackage bookingfrontend
+ */
+
+ /**
+ * Bruker
+ */
+ class Bruker
+ {
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $uid;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $mail;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $preferedLocal;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $givenName;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $sn;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $cn;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $ou;
+
+ }
+
+ /**
+ * UserContext
+ */
+ class UserContext
+ {
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $userid;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $onBehalfOfId;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $appid;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $transactionid;
+
+ }
+
+ /**
+ * retrieveBruker
+ */
+ class retrieveBruker
+ {
+
+ /**
+ * @access public
+ * @var UserContext
+ */
+ public $userContext;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $userid;
+
+ }
+
+ /**
+ * retrieveBrukerResponse
+ */
+ class retrieveBrukerResponse
+ {
+
+ /**
+ * @access public
+ * @var Bruker
+ */
+ public $return;
+
+ }
+
+ /**
+ * BrukerService
+ * @author WSDLInterpreter
+ */
+ class BrukerService extends SoapClient
+ {
+
+ /**
+ * Default class map for wsdl=>php
+ * @access private
+ * @var array
+ */
+ private static $classmap = array
+ (
+ "Bruker" => "Bruker",
+ "UserContext" => "UserContext",
+ "retrieveBruker" => "retrieveBruker",
+ "retrieveBrukerResponse" => "retrieveBrukerResponse",
+ );
+
+ /**
+ * Constructor using wsdl location and options array
+ * @param string $wsdl WSDL location for this service
+ * @param array $options Options for the SoapClient
+ */
+ public function __construct( $wsdl = '', $options = array() )
+ {
+ foreach (self::$classmap as $wsdlClassName =>
$phpClassName)
+ {
+ if
(!isset($options['classmap'][$wsdlClassName]))
+ {
+ $options['classmap'][$wsdlClassName] =
$phpClassName;
+ }
+ }
+ parent::__construct($wsdl, $options);
+ }
+
+ /**
+ * Checks if an argument list matches against a valid argument
type list
+ * @param array $arguments The argument list to check
+ * @param array $validParameters A list of valid argument types
+ * @return boolean true if arguments match against
validParameters
+ * @throws Exception invalid function signature message
+ */
+ public function _checkArguments( $arguments, $validParameters )
+ {
+ $variables = "";
+ foreach ($arguments as $arg)
+ {
+ $type = gettype($arg);
+ if ($type == "object")
+ {
+ $type = get_class($arg);
+ }
+ $variables .= "(" . $type . ")";
+ }
+ if (!in_array($variables, $validParameters))
+ {
+ throw new Exception("Invalid parameter types: "
. str_replace(")(", ", ", $variables));
+ }
+ return true;
+ }
+
+ /**
+ * Service Call: retrieveBruker
+ * Parameter options:
+ * (retrieveBruker) parameters
+ * @param mixed,... See function description for parameter
options
+ * @return retrieveBrukerResponse
+ * @throws Exception invalid function signature message
+ */
+ public function retrieveBruker( $mixed = null )
+ {
+ $validParameters = array(
+ "(retrieveBruker)",
+ );
+ $args = func_get_args();
+ $this->_checkArguments($args, $validParameters);
+ return $this->__soapCall("retrieveBruker", $args);
+ }
+ }
\ No newline at end of file
Added: trunk/eventplannerfrontend/inc/custom/default/MinId.php
===================================================================
--- trunk/eventplannerfrontend/inc/custom/default/MinId.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/custom/default/MinId.php 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,304 @@
+<?php
+ /**
+ * phpGroupWare
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2010 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/
+ * @package phpgroupware
+ * @subpackage communication
+ * @category core
+ * @version $Id: Altinn_Bergen_kommune.php 4887 2010-02-23 10:33:44Z
sigurd $
+ */
+ /*
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /**
+ * Wrapper for custom methods
+ *
+ * @package phpgroupware
+ * @subpackage bookingfrontend
+ */
+
+ /**
+ * START WRAPPER
+ */
+ class booking_external_user
+ {
+
+ /**
+ * The resulting external user
+ * @access public
+ * @var string
+ */
+ public $login = 0;
+
+ /**
+ * Debug for testing
+ * @access public
+ * @var bool
+ */
+ public $debug = false;
+ public $orgs = array();
+
+ public function __construct( $wsdl, $options, $userid, $debug =
false )
+ {
+ if ($debug)
+ {
+ $this->debug = true;
+ }
+ try
+ {
+ $BrukerService = new BrukerService($wsdl,
$options);
+ }
+ catch (Exception $e)
+ {
+ if ($this->debug)
+ {
+ echo $e->getMessage();
+ echo '<br>wsdl: ' . $wsdl;
+ echo '<br>options:';
+ _debug_array($options);
+ }
+ }
+
+ if (isset($BrukerService) && $BrukerService)
+ {
+ $ctx = new UserContext();
+
+ $ctx->appid = 'portico';
+ $ctx->onBehalfOfId = $userid;
+ $ctx->userid = $userid;
+ $ctx->transactionid =
$GLOBALS['phpgw_info']['server']['install_id']; // KAN UTELATES. BENYTTES I.F.M
SUPPORT. LEGG INN EN FOR DEG UNIK ID.
+
+ $request = new retrieveBruker();
+ $request->userContext = $ctx;
+ $request->userid = $userid;
+
+ $response =
$BrukerService->retrieveBruker($request);
+ $Bruker = $response->return;
+ $this->login = $Bruker->ou; // organisasjons nr
+ }
+ }
+ }
+ /**
+ * END WRAPPER - custom code beyond this point
+ */
+ /**
+ * soap client for altinn supported external login service at Bergen
Kommune
+ * this code is generated by the
http://code.google.com/p/wsdl2php-interpreter/
+ *
+ * @package phpgroupware
+ * @subpackage bookingfrontend
+ */
+
+ /**
+ * Bruker
+ */
+ class Bruker
+ {
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $uid;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $mail;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $preferedLocal;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $givenName;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $sn;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $cn;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $ou;
+
+ }
+
+ /**
+ * UserContext
+ */
+ class UserContext
+ {
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $userid;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $onBehalfOfId;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $appid;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $transactionid;
+
+ }
+
+ /**
+ * retrieveBruker
+ */
+ class retrieveBruker
+ {
+
+ /**
+ * @access public
+ * @var UserContext
+ */
+ public $userContext;
+
+ /**
+ * @access public
+ * @var string
+ */
+ public $userid;
+
+ }
+
+ /**
+ * retrieveBrukerResponse
+ */
+ class retrieveBrukerResponse
+ {
+
+ /**
+ * @access public
+ * @var Bruker
+ */
+ public $return;
+
+ }
+
+ /**
+ * BrukerService
+ * @author WSDLInterpreter
+ */
+ class BrukerService extends SoapClient
+ {
+
+ /**
+ * Default class map for wsdl=>php
+ * @access private
+ * @var array
+ */
+ private static $classmap = array
+ (
+ "Bruker" => "Bruker",
+ "UserContext" => "UserContext",
+ "retrieveBruker" => "retrieveBruker",
+ "retrieveBrukerResponse" => "retrieveBrukerResponse",
+ );
+
+ /**
+ * Constructor using wsdl location and options array
+ * @param string $wsdl WSDL location for this service
+ * @param array $options Options for the SoapClient
+ */
+ public function __construct( $wsdl = '', $options = array() )
+ {
+ foreach (self::$classmap as $wsdlClassName =>
$phpClassName)
+ {
+ if
(!isset($options['classmap'][$wsdlClassName]))
+ {
+ $options['classmap'][$wsdlClassName] =
$phpClassName;
+ }
+ }
+ parent::__construct($wsdl, $options);
+ }
+
+ /**
+ * Checks if an argument list matches against a valid argument
type list
+ * @param array $arguments The argument list to check
+ * @param array $validParameters A list of valid argument types
+ * @return boolean true if arguments match against
validParameters
+ * @throws Exception invalid function signature message
+ */
+ public function _checkArguments( $arguments, $validParameters )
+ {
+ $variables = "";
+ foreach ($arguments as $arg)
+ {
+ $type = gettype($arg);
+ if ($type == "object")
+ {
+ $type = get_class($arg);
+ }
+ $variables .= "(" . $type . ")";
+ }
+ if (!in_array($variables, $validParameters))
+ {
+ throw new Exception("Invalid parameter types: "
. str_replace(")(", ", ", $variables));
+ }
+ return true;
+ }
+
+ /**
+ * Service Call: retrieveBruker
+ * Parameter options:
+ * (retrieveBruker) parameters
+ * @param mixed,... See function description for parameter
options
+ * @return retrieveBrukerResponse
+ * @throws Exception invalid function signature message
+ */
+ public function retrieveBruker( $mixed = null )
+ {
+ $validParameters = array(
+ "(retrieveBruker)",
+ );
+ $args = func_get_args();
+ $this->_checkArguments($args, $validParameters);
+ return $this->__soapCall("retrieveBruker", $args);
+ }
+ }
\ No newline at end of file
Added: trunk/eventplannerfrontend/inc/hook_config.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/hook_config.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/inc/hook_config.inc.php 2017-01-22 16:47:39 UTC
(rev 16181)
@@ -0,0 +1,77 @@
+<?php
+ /**
+ * Bookingfrontend - configuration hook
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2010 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @package phpgroupware
+ * @subpackage Bookingfrontend
+ * @category hooks
+ * @version $Id: hook_config.inc.php 4237 2009-11-27 23:17:21Z sigurd $
+ */
+ /*
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+ /**
+ * Get HTML selectbox with supported remote authentication
+ *
+ * @param $config
+ * @return string HTML select box
+ */
+ function authentication( $config )
+ {
+ $selected = $config['authentication_method'];
+
+ $dirname = PHPGW_SERVER_ROOT .
"/bookingfrontend/inc/custom/{$GLOBALS['phpgw_info']['user']['domain']}";
+ $dirname = PHPGW_SERVER_ROOT .
"/bookingfrontend/inc/custom/default";
+
+ $find = array('/_/', '/\.php$/');
+ $replace = array(' ', '');
+
+ $file_list = array();
+ $dir = new DirectoryIterator($dirname);
+ if (is_object($dir))
+ {
+ foreach ($dir as $file)
+ {
+
+ if ($file->isDot() || !$file->isFile() ||
!$file->isReadable())
+ {
+ continue;
+ }
+
+ $file_list[] = array
+ (
+ 'id' => (string)$file,
+ 'name' => preg_replace($find, $replace,
$file),
+ 'selected' => $file == $selected ?
'selected' : ''
+ );
+ }
+ }
+
+ $lang_select = lang('select method');
+ $out = <<<HTML
+ <option value="">{$lang_select}</option>";
+HTML;
+
+ foreach ($file_list as $file)
+ {
+ $out .= <<<HTML
+ <option
value="{$file['id']}"{$file['selected']}>{$file['name']}</option>";
+HTML;
+ }
+ return $out;
+ }
Added: trunk/eventplannerfrontend/index.php
===================================================================
--- trunk/eventplannerfrontend/index.php (rev 0)
+++ trunk/eventplannerfrontend/index.php 2017-01-22 16:47:39 UTC (rev
16181)
@@ -0,0 +1,214 @@
+<?php
+ /**
+ * phpGroupWare - property: a Facilities Management System.
+ *
+ * @author Jonas Borgström address@hidden
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2009 Free Software Foundation, Inc.
http://www.fsf.org/
+ * This file is part of phpGroupWare.
+ *
+ * phpGroupWare is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * phpGroupWare is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with phpGroupWare; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
02110-1301 USA
+ *
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package property
+ * @version $Id: index.php 14959 2016-04-30 21:09:01Z sigurdne $
+ */
+ /**
+ * Start page
+ *
+ * This script will check if there is defined a startpage in the users
+ * preferences - and then forward the user to this page
+ */
+ $GLOBALS['phpgw_info']['flags'] = array
+ (
+ 'noheader' => true,
+ 'nonavbar' => true,
+ 'currentapp' => 'login', // To stop functions.inc.php from
validating the session
+ );
+ $GLOBALS['phpgw_info']['flags']['session_name'] =
'eventplannerfrontendsession';
+ $GLOBALS['phpgw_remote_user_fallback'] = 'sql';
+ include_once('../header.inc.php');
+
+ // Make sure we're always logged in
+ if (!phpgw::get_var(session_name()) ||
!$GLOBALS['phpgw']->session->verify())
+ {
+// $login = "bookingguest";
+ $c = createobject('phpgwapi.config', 'eventplannerfrontend');
+ $c->read();
+ $config = $c->config_data;
+
+ $login = $c->config_data['anonymous_user'];
+ $passwd = $c->config_data['anonymous_passwd'];
+ $_POST['submitit'] = "";
+
+ $GLOBALS['sessionid'] =
$GLOBALS['phpgw']->session->create($login, $passwd);
+ if (!$GLOBALS['sessionid'])
+ {
+ $lang_denied = lang('Anonymous access not correctly
configured');
+ if ($GLOBALS['phpgw']->session->reason)
+ {
+ $lang_denied =
$GLOBALS['phpgw']->session->reason;
+ }
+ echo <<<HTML
+ <div class="error">$lang_denied</div>
+HTML;
+ $GLOBALS['phpgw']->common->phpgw_exit(True);
+ }
+ }
+ $GLOBALS['phpgw_info']['flags']['currentapp'] = 'eventplannerfrontend';
+
+/////////////////////////////////////////////////////////////////////////////
+// BEGIN Stuff copied from functions.inc.php
+/////////////////////////////////////////////////////////////////////////////
+
+ if
(isset($GLOBALS['phpgw_info']['user']['preferences']['common']['lang']) &&
$GLOBALS['phpgw_info']['user']['preferences']['common']['lang'] != 'en')
+ {
+
$GLOBALS['phpgw']->translation->set_userlang($GLOBALS['phpgw_info']['user']['preferences']['common']['lang'],
true);
+ }
+
+ /* A few hacker resistant constants that will be used throught the
program */
+ define('PHPGW_TEMPLATE_DIR',
ExecMethod('phpgwapi.phpgw.common.get_tpl_dir', 'phpgwapi'));
+ define('PHPGW_IMAGES_DIR',
ExecMethod('phpgwapi.phpgw.common.get_image_path', 'phpgwapi'));
+ define('PHPGW_IMAGES_FILEDIR',
ExecMethod('phpgwapi.phpgw.common.get_image_dir', 'phpgwapi'));
+ define('PHPGW_APP_ROOT',
ExecMethod('phpgwapi.phpgw.common.get_app_dir'));
+ define('PHPGW_APP_INC',
ExecMethod('phpgwapi.phpgw.common.get_inc_dir'));
+ define('PHPGW_APP_TPL',
ExecMethod('phpgwapi.phpgw.common.get_tpl_dir'));
+ define('PHPGW_IMAGES',
ExecMethod('phpgwapi.phpgw.common.get_image_path'));
+ define('PHPGW_APP_IMAGES_DIR',
ExecMethod('phpgwapi.phpgw.common.get_image_dir'));
+
+ /* *
**********************************************************************\
+ * Load the menuaction
*
+
\*********************************************************************** */
+ $GLOBALS['phpgw_info']['menuaction'] = phpgw::get_var('menuaction');
+ if (!$GLOBALS['phpgw_info']['menuaction'])
+ {
+ unset($GLOBALS['phpgw_info']['menuaction']);
+ }
+
+ /* * ******* This sets the user variables ******** */
+ $GLOBALS['phpgw_info']['user']['private_dir'] =
$GLOBALS['phpgw_info']['server']['files_dir']
+ . '/users/' . $GLOBALS['phpgw_info']['user']['userid'];
+
+ /* This will make sure that a user has the basic default prefs. If not
it will add them */
+ $GLOBALS['phpgw']->preferences->verify_basic_settings();
+
+ /* * ******* Optional classes, which can be disabled for
performance increases ******** */
+ while ($phpgw_class_name = each($GLOBALS['phpgw_info']['flags']))
+ {
+ if ( preg_match('/enable_/', $phpgw_class_name[0]))
+ {
+ $enable_class = str_replace('enable_', '',
$phpgw_class_name[0]);
+ $enable_class = str_replace('_class', '',
$enable_class);
+ $GLOBALS['phpgw']->$enable_class =
createObject("phpgwapi.{$enable_class}");
+ }
+ }
+ unset($enable_class);
+ reset($GLOBALS['phpgw_info']['flags']);
+
+ /* *
***********************************************************************\
+ * These lines load up the templates class
*
+
\************************************************************************ */
+ if (!isset($GLOBALS['phpgw_info']['flags']['disable_Template_class'])
|| !$GLOBALS['phpgw_info']['flags']['disable_Template_class'])
+ {
+ $GLOBALS['phpgw']->template = createObject('phpgwapi.Template',
PHPGW_APP_TPL);
+ $GLOBALS['phpgw']->xslttpl =
createObject('phpgwapi.xslttemplates', PHPGW_APP_TPL);
+ }
+
+ /* *
***********************************************************************\
+ * Verify that the users session is still active otherwise kick them
out *
+
\************************************************************************ */
+ if ($GLOBALS['phpgw_info']['flags']['currentapp'] != 'home' &&
$GLOBALS['phpgw_info']['flags']['currentapp'] != 'about')
+ {
+ if (!$GLOBALS['phpgw']->acl->check('run', PHPGW_ACL_READ,
$GLOBALS['phpgw_info']['flags']['currentapp']))
+ {
+ $GLOBALS['phpgw']->common->phpgw_header(true);
+ $GLOBALS['phpgw']->log->write(array('text' =>
'W-Permissions, Attempted to access %1',
+ 'p1' =>
$GLOBALS['phpgw_info']['flags']['currentapp']));
+
+ $lang_denied = lang('Access not permitted');
+ echo <<<HTML
+ <div class="error">$lang_denied</div>
+
+HTML;
+ $GLOBALS['phpgw']->common->phpgw_exit(True);
+ }
+ }
+
+ // Already called from sessions::verify
+ // $GLOBALS['phpgw']->applications->read_installed_apps(); // to
get translated app-titles
+
+ /* *
***********************************************************************\
+ * Load the header unless the developer turns it off
*
+
\************************************************************************ */
+ if (!isset($GLOBALS['phpgw_info']['flags']['noheader']) ||
!$GLOBALS['phpgw_info']['flags']['noheader'])
+ {
+ $inc_navbar =
!isset($GLOBALS['phpgw_info']['flags']['nonavbar']) ||
!$GLOBALS['phpgw_info']['flags']['nonavbar'];
+ $GLOBALS['phpgw']->common->phpgw_header($inc_navbar);
+ unset($inc_navbar);
+ }
+
+ /* *
***********************************************************************\
+ * Load the app include files if the exists
*
+
\************************************************************************ */
+ /* Then the include file */
+ if (!preg_match("/phpgwapi/i", PHPGW_APP_INC) &&
file_exists(PHPGW_APP_INC . '/functions.inc.php') &&
!isset($GLOBALS['phpgw_info']['menuaction']))
+ {
+ include_once(PHPGW_APP_INC . '/functions.inc.php');
+ }
+ if (address@hidden'phpgw_info']['flags']['noheader'] &&
+ address@hidden'phpgw_info']['flags']['noappheader'] &&
+ file_exists(PHPGW_APP_INC . '/header.inc.php') &&
!isset($GLOBALS['phpgw_info']['menuaction']))
+ {
+ include_once(PHPGW_APP_INC . '/header.inc.php');
+ }
+
+/////////////////////////////////////////////////////////////////////////////
+// END Stuff copied from functions.inc.php
+/////////////////////////////////////////////////////////////////////////////
+
+ if (isset($_GET['menuaction']))
+ {
+ list($app, $class, $method) = explode('.', $_GET['menuaction']);
+ }
+ else
+ {
+ $app = 'eventplannerfrontend';
+ $class = 'uievents';
+ $method = 'index';
+ }
+
+ $GLOBALS[$class] = CreateObject("{$app}.{$class}");
+
+ $invalid_data = false; //FIXME consider whether this should be computed
as in the main index.php
+ if (!$invalid_data && is_object($GLOBALS[$class]) &&
isset($GLOBALS[$class]->public_functions) &&
is_array($GLOBALS[$class]->public_functions) &&
isset($GLOBALS[$class]->public_functions[$method]) &&
$GLOBALS[$class]->public_functions[$method])
+ {
+ if (phpgw::get_var('X-Requested-With', 'string', 'SERVER') ==
'XMLHttpRequest'
+ // deprecated
+ || phpgw::get_var('phpgw_return_as', 'string', 'GET')
== 'json')
+ {
+ // comply with RFC 4627
+ header('Content-Type: application/json');
+ $return_data = $GLOBALS[$class]->$method();
+ echo json_encode($return_data);
+ $GLOBALS['phpgw_info']['flags']['nofooter'] = true;
+ $GLOBALS['phpgw']->common->phpgw_exit();
+ }
+ else
+ {
+ $GLOBALS[$class]->$method();
+ $GLOBALS['phpgw']->common->phpgw_footer();
+ }
+ }
Property changes on: trunk/eventplannerfrontend/index.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/eventplannerfrontend/js/portico/application.edit.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/application.edit.js
(rev 0)
+++ trunk/eventplannerfrontend/js/portico/application.edit.js 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,386 @@
+
+var lang;
+var oArgs = {menuaction: 'eventplanner.uivendor.index', organization_number:
true};
+var strURL = phpGWLink('index.php', oArgs, true);
+JqueryPortico.autocompleteHelper(strURL, 'vendor_name', 'vendor_id',
'vendor_container', 'name');
+
+validate_submit = function ()
+{
+ var active_tab = $("#active_tab").val();
+ conf = {
+ // modules: 'date, security, file',
+ validateOnBlur: false,
+ scrollToTopOnError: true,
+ errorMessagePosition: 'top'
+ // language: validateLanguage
+ };
+
+ var test = $('form').isValid(false, conf);
+ if (!test)
+ {
+ return;
+ }
+ var id = $("#application_id").val();
+
+ if (id > 0)
+ {
+ document.form.submit();
+ return;
+ }
+
+ if (active_tab === 'first_tab')
+ {
+ $('#tab-content').responsiveTabs('activate', 1);
+ $("#save_button").val(lang['save']);
+ $("#save_button_bottom").val(lang['save']);
+ $("#active_tab").val('demands');
+ }
+ else
+ {
+ document.form.submit();
+ }
+};
+
+$(document).ready(function ()
+{
+ check_button_names();
+
+ $("#number_of_units").change(function ()
+ {
+ calculate_total_amount();
+ });
+ $("#charge_per_unit").change(function ()
+ {
+ calculate_total_amount();
+ });
+
+ calculate_total_amount();
+
+ $("#stage_width").change(function ()
+ {
+ calculate_stage_size();
+ });
+ $("#stage_depth").change(function ()
+ {
+ calculate_stage_size();
+ });
+
+ calculate_stage_size();
+
+// $.formUtils.addValidator({
+// name: 'naming',
+// validatorFunction: function (value, $el, config, languaje,
$form)
+// {
+// var v = false;
+// var firstname = $('#firstname').val();
+// var lastname = $('#lastname').val();
+// var company_name = $('#company_name').val();
+// var department = $('#department').val();
+// if ((firstname != "" && lastname != "") ||
(company_name != "" && department != ""))
+// {
+// v = true;
+// }
+// return v;
+// },
+// errorMessage: lang['Name or company is required'],
+// errorMessageKey: ''
+// });
+
+
+ $("#from_").change(function ()
+ {
+ $("#to_").val($("#from_").val());
+ });
+
+
+ $("#submitbox").css({
+ position: 'absolute',
+ right: '10px',
+ border: '1px solid #B5076D',
+ padding: '0 5px 5px 5px',
+ width: $("#submitbox").width() + 'px',
+ "background - color": '#FFF',
+ display: "block"
+ });
+
+ var offset = $("#submitbox").offset();
+ var topPadding = 180;
+
+ if ($("#center_content").length === 1)
+ {
+ $("#center_content").scroll(function ()
+ {
+ if ($("#center_content").scrollTop() > offset.top)
+ {
+ $("#submitbox").stop().animate({
+ marginTop:
$("#center_content").scrollTop() - offset.top + topPadding
+ }, 100);
+ }
+ else
+ {
+ $("#submitbox").stop().animate({
+ marginTop: 0
+ }, 100);
+ }
+ ;
+ });
+ }
+ else
+ {
+ $(window).scroll(function ()
+ {
+ if ($(window).scrollTop() > offset.top)
+ {
+ $("#submitbox").stop().animate({
+ marginTop: $(window).scrollTop() -
offset.top + topPadding
+ }, 100);
+ }
+ else
+ {
+ $("#submitbox").stop().animate({
+ marginTop: 0
+ }, 100);
+ }
+ ;
+ });
+ }
+
+});
+
+check_button_names = function ()
+{
+ var tab = $("#active_tab").val();
+ var id = $("#application_id").val();
+
+ if (tab === 'calendar')
+ {
+ $("#floating-box").hide();
+ $("#submit_group_bottom").hide();
+ }
+ else if (tab === 'first_tab')
+ {
+ if (id > 0)
+ {
+ $("#save_button").val(lang['save']);
+ $("#save_button_bottom").val(lang['save']);
+ }
+ else
+ {
+ $("#save_button").val(lang['next']);
+ $("#save_button_bottom").val(lang['next']);
+ }
+ $("#floating-box").show();
+ $("#submit_group_bottom").show();
+ }
+ else
+ {
+ $("#save_button").val(lang['save']);
+ $("#save_button_bottom").val(lang['save']);
+ $("#floating-box").show();
+ $("#submit_group_bottom").show();
+ }
+};
+
+function set_tab(tab)
+{
+ $("#active_tab").val(tab);
+ check_button_names();
+}
+
+function calculate_total_amount()
+{
+ var total_amount = 0;
+
+ var number_of_units = $("#number_of_units").val();
+ var charge_per_unit = $("#charge_per_unit").val();
+
+ if (charge_per_unit && number_of_units)
+ {
+ total_amount = number_of_units * charge_per_unit;
+ }
+ $("#total_amount").val(total_amount);
+}
+
+function calculate_stage_size()
+{
+ var total_size = 0;
+
+ var stage_width = $("#stage_width").val();
+ var stage_depth = $("#stage_depth").val();
+
+ if (stage_width && stage_depth)
+ {
+ total_size = stage_width * stage_depth;
+ }
+ $("#stage_size").val(total_size);
+}
+
+add_booking = function ()
+{
+ var from_ = $("#from_").val();
+ if (!from_)
+ {
+ return;
+ }
+
+ oArgs = {
+ menuaction: 'eventplanner.uibooking.save_ajax',
+ application_id: $("#application_id").val()
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ var htmlString = '';
+ $("#receipt").html("");
+ var data = {from_: from_, active: 1};
+
+ JqueryPortico.execute_ajax(requestUrl,
+ function (result)
+ {
+ if (result.status_kode === 'ok')
+ {
+ $("#from_").val('');
+ htmlString += "<div class=\"msg_good\">";
+ htmlString += result.msg;
+ }
+ else
+ {
+ htmlString += "<div class=\"error\">";
+ var msg = result.msg;
+ if (typeof (msg) == 'object')
+ {
+ htmlString += msg['error'][0]['msg'];
+ }
+ else
+ {
+ htmlString += result.msg;
+ }
+ }
+
+
+ htmlString += '</div>';
+ $("#receipt").html(htmlString);
+
+
JqueryPortico.updateinlineTableHelper('datatable-container_1');
+
+ }, data, "POST", "json"
+ );
+
+};
+
+update_schedule = function (id)
+{
+ var from_ = $("#from_").val();
+ if (!from_)
+ {
+ return;
+ }
+ oArgs = {menuaction: 'eventplanner.uibooking.update_schedule'};
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ var htmlString = '';
+ $("#receipt").html("");
+
+ var data = {from_: from_, id: id};
+
+ JqueryPortico.execute_ajax(requestUrl,
+ function (result)
+ {
+ if (result.status_kode === 'ok')
+ {
+ $("#from_").val('');
+ htmlString += "<div class=\"msg_good\">";
+ }
+ else
+ {
+ htmlString += "<div class=\"error\">";
+ }
+ htmlString += result.msg;
+ htmlString += '</div>';
+ $("#receipt").html(htmlString);
+
+
JqueryPortico.updateinlineTableHelper('datatable-container_1');
+
+ }, data, "POST", "json"
+ );
+
+};
+
+this.onActionsClick = function (action)
+{
+ $("#receipt").html("");
+ if (action === 'add')
+ {
+ add_booking();
+ return;
+ }
+
+ var api = $('#datatable-container_1').dataTable().api();
+ var selected = api.rows({selected: true}).data();
+
+ var numSelected = selected.length;
+
+ if (numSelected === 0)
+ {
+ alert('None selected');
+ return false;
+ }
+ var ids = [];
+ for (var n = 0; n < selected.length; ++n)
+ {
+ var aData = selected[n];
+ ids.push(aData['id']);
+
+ if (action === 'edit')
+ {
+ if (numSelected > 1)
+ {
+ alert('There must be only one...');
+ return false;
+ }
+ update_schedule(aData['id']);
+ return;
+ }
+ }
+
+ if (ids.length > 0)
+ {
+ var data = {"ids": ids, "action": action, from_:
$("#from_").val()};
+
+ oArgs = {menuaction:
'eventplanner.uibooking.update_active_status'};
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+
+ var htmlString = '';
+ $("#receipt").html("");
+
+ JqueryPortico.execute_ajax(requestUrl,
+ function (result)
+ {
+ if (result.status_kode === 'ok')
+ {
+ $("#from_").val('');
+ htmlString += "<div
class=\"msg_good\">";
+ htmlString += result.msg;
+ }
+ else
+ {
+ htmlString += "<div class=\"error\">";
+ var msg = result.msg;
+ if (typeof (msg) == 'object')
+ {
+ htmlString +=
msg['error'][0]['msg'];
+ }
+ else
+ {
+ htmlString += result.msg;
+ }
+ }
+ htmlString += '</div>';
+ $("#receipt").html(htmlString);
+
+
JqueryPortico.updateinlineTableHelper('datatable-container_1');
+
+ }, data, "POST", "json"
+ );
+ }
+};
Added: trunk/eventplannerfrontend/js/portico/application.index.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/application.index.js
(rev 0)
+++ trunk/eventplannerfrontend/js/portico/application.index.js 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,4 @@
+function requestWithVendorFilter(request)
+{
+ return request + '&organization_number=1';
+}
Added: trunk/eventplannerfrontend/js/portico/booking.edit.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/booking.edit.js
(rev 0)
+++ trunk/eventplannerfrontend/js/portico/booking.edit.js 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,190 @@
+var customer_id_selection;
+var lang;
+var oArgs = {menuaction: 'eventplanner.uicustomer.index', organization_number:
true};
+var strURL = phpGWLink('index.php', oArgs, true);
+JqueryPortico.autocompleteHelper(strURL, 'customer_name', 'customer_id',
'customer_container', 'name');
+
+$(window).on('load', function ()
+{
+ customer_id = $('#customer_id').val();
+ if (customer_id)
+ {
+ customer_id_selection = customer_id;
+ }
+ $("#customer_name").on("autocompleteselect", function (event, ui)
+ {
+ var customer_id = ui.item.value;
+ if (customer_id != customer_id_selection)
+ {
+ populateCustomerContact(customer_id);
+ }
+ });
+});
+
+function populateCustomerContact(customer_id)
+{
+ customer_id = customer_id || $('#customer_id').val();
+
+ if (!customer_id)
+ {
+ return;
+ }
+ oArgs = {
+ menuaction: 'eventplanner.uicustomer.get',
+ id: customer_id
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs, true);
+ var data = {};
+
+ JqueryPortico.execute_ajax(requestUrl,
+ function (result)
+ {
+ $("#customer_contact_name").val(result.contact_name);
+ $("#customer_contact_email").val(result.contact_email);
+ $("#customer_contact_phone").val(result.contact_phone);
+
+ var location = result.address_1;
+ if (result.address_2)
+ {
+ location += "\n" + result.address_2;
+ }
+ location += "\n" + result.zip_code;
+ location += ' ' + result.city;
+ $("#location").val(location);
+
+ }, data, "POST", "json"
+ );
+}
+
+function set_tab(tab)
+{
+ $("#active_tab").val(tab);
+ if (tab === 'reports')
+ {
+ $("#floating-box").hide();
+ $("#submit_group_bottom").hide();
+ }
+ else
+ {
+ $("#floating-box").show();
+ $("#submit_group_bottom").show();
+ }
+}
+
+add_report = function (type)
+{
+ var oArgs;
+ var win;
+ var booking_id = $("#booking_id").val();
+ if (type === 'vendor')
+ {
+ oArgs = {
+ menuaction: 'eventplanner.uivendor_report.add',
+ booking_id: booking_id
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs);
+ win = window.open(requestUrl, '_blank');
+ win.focus();
+
+ }
+ else if (type === 'customer')
+ {
+ oArgs = {
+ menuaction: 'eventplanner.uicustomer_report.add',
+ booking_id: booking_id
+ };
+
+ var requestUrl = phpGWLink('index.php', oArgs);
+ win = window.open(requestUrl, '_blank');
+ win.focus();
+
+ }
+
+};
+validate_submit = function ()
+{
+// var active_tab = $("#active_tab").val();
+ conf = {
+ validateOnBlur: false,
+ scrollToTopOnError: true,
+ errorMessagePosition: 'top'
+ };
+
+ var test = $('form').isValid(false, conf);
+ if (!test)
+ {
+ return;
+ }
+
+ document.form.submit();
+
+};
+
+
+$(document).ready(function ()
+{
+
+ $("#submitbox").css({
+ position: 'absolute',
+ right: '10px',
+ border: '1px solid #B5076D',
+ padding: '0 5px 5px 5px',
+ width: $("#submitbox").width() + 'px',
+ "background - color": '#FFF',
+ display: "block"
+ });
+ var tab = $("#active_tab").val();
+ if (tab === 'reports')
+ {
+ $("#floating-box").hide();
+ $("#submit_group_bottom").hide();
+ }
+ else
+ {
+ $("#floating-box").show();
+ $("#submit_group_bottom").show();
+ }
+
+ var offset = $("#submitbox").offset();
+ var topPadding = 180;
+
+ if ($("#center_content").length === 1)
+ {
+ $("#center_content").scroll(function ()
+ {
+ if ($("#center_content").scrollTop() > offset.top)
+ {
+ $("#submitbox").stop().animate({
+ marginTop:
$("#center_content").scrollTop() - offset.top + topPadding
+ }, 100);
+ }
+ else
+ {
+ $("#submitbox").stop().animate({
+ marginTop: 0
+ }, 100);
+ }
+ });
+ }
+ else
+ {
+ $(window).scroll(function ()
+ {
+ if ($(window).scrollTop() > offset.top)
+ {
+ $("#submitbox").stop().animate({
+ marginTop: $(window).scrollTop() -
offset.top + topPadding
+ }, 100);
+ }
+ else
+ {
+ $("#submitbox").stop().animate({
+ marginTop: 0
+ }, 100);
+ }
+ ;
+ });
+ }
+});
\ No newline at end of file
Added: trunk/eventplannerfrontend/js/portico/booking.index.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/booking.index.js
(rev 0)
+++ trunk/eventplannerfrontend/js/portico/booking.index.js 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,4 @@
+function requestWithApplicationFilter(request)
+{
+ return request// + '&filter_active=1';
+}
Added: trunk/eventplannerfrontend/js/portico/customer.index.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/customer.index.js
(rev 0)
+++ trunk/eventplannerfrontend/js/portico/customer.index.js 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,4 @@
+function requestWithCategoryFilter(request)
+{
+ return request + '&type=customer_category&type_id=0';
+}
Added: trunk/eventplannerfrontend/js/portico/events.index.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/events.index.js
(rev 0)
+++ trunk/eventplannerfrontend/js/portico/events.index.js 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,4 @@
+function requestWithVendorFilter(request)
+{
+ return request + '&organization_number=1';
+}
Added: trunk/eventplannerfrontend/login.php
===================================================================
--- trunk/eventplannerfrontend/login.php (rev 0)
+++ trunk/eventplannerfrontend/login.php 2017-01-22 16:47:39 UTC (rev
16181)
@@ -0,0 +1,40 @@
+<?php
+ $phpgw_info = array();
+
+ $GLOBALS['phpgw_info']['flags'] = array
+ (
+ 'disable_template_class' => true,
+ 'login' => true,
+ 'currentapp' => 'login',
+ 'noheader' => true
+ );
+
+ $GLOBALS['phpgw_info']['flags']['session_name'] =
'eventplannerfrontendsession';
+
+ if (file_exists('../header.inc.php'))
+ {
+ include_once('../header.inc.php');
+ $GLOBALS['phpgw']->sessions = createObject('phpgwapi.sessions');
+ }
+
+// $login = "bookingguest";
+ $c = createobject('phpgwapi.config', 'eventplannerfrontend');
+ $c->read();
+ $config = $c->config_data;
+ $login = $c->config_data['anonymous_user'];
+ $passwd = $c->config_data['anonymous_passwd'];
+ $_POST['submitit'] = "";
+ $GLOBALS['sessionid'] = $GLOBALS['phpgw']->session->create($login,
$passwd);
+
+ $GLOBALS['phpgw']->hooks->process('login');
+
+ $bouser = CreateObject('eventplannerfrontend.bouser');
+ $bouser->log_in();
+
+ $after = str_replace('&', '&', urldecode(phpgw::get_var('after',
'string')));
+ if (!$after)
+ {
+ $after = array('menuaction' =>
'eventplannerfrontend.uievents.index');
+ }
+ $GLOBALS['phpgw']->redirect_link('/eventplannerfrontend/index.php',
$after);
+ exit;
Added: trunk/eventplannerfrontend/logout.php
===================================================================
--- trunk/eventplannerfrontend/logout.php (rev 0)
+++ trunk/eventplannerfrontend/logout.php 2017-01-22 16:47:39 UTC (rev
16181)
@@ -0,0 +1,117 @@
+<?php
+ $phpgw_info = array();
+
+ $GLOBALS['phpgw_info']['flags'] = array
+ (
+ 'disable_template_class' => true,
+ 'currentapp' => 'logout',
+ 'noheader' => true,
+ 'nofooter' => true,
+ 'nonavbar' => true,
+ );
+ $GLOBALS['phpgw_info']['flags']['session_name'] =
'eventplannerfrontendsession';
+
+ if (file_exists('../header.inc.php'))
+ {
+ include_once('../header.inc.php');
+ $GLOBALS['phpgw']->sessions = createObject('phpgwapi.sessions');
+ }
+
+ $sessionid = phpgw::get_var('eventplannerfrontendsession');
+
+ $verified = $GLOBALS['phpgw']->session->verify();
+
+ $eventplannerfrontend_host = '';
+ $external_logout = '';
+ if ($verified)
+ {
+ $config = CreateObject('phpgwapi.config',
'eventplannerfrontend');
+ $config->read();
+
+ $eventplannerfrontend_host =
isset($config->config_data['eventplannerfrontend_host']) &&
$config->config_data['eventplannerfrontend_host'] ?
$config->config_data['eventplannerfrontend_host'] : '';
+ $eventplannerfrontend_host = rtrim($eventplannerfrontend_host,
'/');
+ $external_logout =
isset($config->config_data['external_logout']) &&
$config->config_data['external_logout'] ?
$config->config_data['external_logout'] : '';
+// $external_logout =
"https://login-vip.bergen.kommune.no/SSO/logout?p_done_url=";//https://www.bergen.kommune.no"
+
+ $frontend_user = CreateObject('eventplannerfrontend.bouser');
+ $frontend_user->log_off();
+ /*
+ // testing external logout
+
+
+ $arguments = array('p_done_url' =>
'https://www.bergen.kommune.no');
+ $query = http_build_query($arguments);
+ $auth_url = $_integration_config['auth_url'];
+ $request =
"https://login-vip.bergen.kommune.no/SSO/logout?{$query}";
+
+ $aContext = array
+ (
+ 'https' => array
+ (
+ 'request_fulluri' => true,
+ ),
+ );
+
+
if(isset($GLOBALS['phpgw_info']['server']['httpproxy_server']))
+ {
+ $aContext['http']['proxy'] =
"{$GLOBALS['phpgw_info']['server']['httpproxy_server']}:{$GLOBALS['phpgw_info']['server']['httpproxy_port']}";
+ }
+
+ $cxContext = stream_context_create($aContext);
+ $response = file_get_contents($request, False, $cxContext);
+ */
+
+ execMethod('phpgwapi.menu.clear');
+ $GLOBALS['phpgw']->hooks->process('logout');
+ $GLOBALS['phpgw']->session->destroy($sessionid);
+ }
+
+ $forward = phpgw::get_var('phpgw_forward', 'int');
+
+ if ($forward)
+ {
+ $extra_vars['phpgw_forward'] = $forward;
+ foreach ($_GET as $name => $value)
+ {
+ if (preg_match('/phpgw_/', $name))
+ {
+ $extra_vars[$name] = phpgw::clean_value($value);
+ }
+ }
+ }
+
+ $redirect = phpgw::get_var('redirect_menuaction', 'string');
+
+ if ($redirect)
+ {
+ $matches = array();
+ $extra_vars['menuaction'] = $redirect;
+ foreach ($_GET as $name => $value)
+ {
+ if (preg_match('/^redirect_([\w\_\-]+)/', $name,
$matches) && $matches[1] != 'menuaction')
+ {
+ $extra_vars[$matches[1]] =
phpgw::clean_value($value);
+ }
+ }
+ }
+
+ if (!isset($extra_vars['menuaction']))
+ {
+ $extra_vars['menuaction'] =
'eventplannerfrontend.uievents.index';
+ }
+
+ if (!$external_logout)
+ {
+ $GLOBALS['phpgw']->redirect_link('/eventplannerfrontend/',
$extra_vars);
+ }
+ else
+ {
+ $result_redirect = '';
+ if (substr($external_logout, -1) == '=')
+ {
+ $result_redirect =
$GLOBALS['phpgw']->link('/eventplannerfrontend/', $extra_vars, true);
+ }
+ $external_logout_url =
"{$external_logout}{$eventplannerfrontend_host}{$result_redirect}";
+ Header("Location: {$external_logout_url}");
+ }
+ exit;
Added: trunk/eventplannerfrontend/setup/default_records.inc.php
===================================================================
--- trunk/eventplannerfrontend/setup/default_records.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/setup/default_records.inc.php 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,61 @@
+<?php
+ $GLOBALS['phpgw']->locations->add('.', 'Tom', 'eventplannerfrontend');
+ $GLOBALS['phpgw']->locations->add('.admin', 'admin',
'eventplannerfrontend');
+ $GLOBALS['phpgw']->locations->add('.application', 'application',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
+ $GLOBALS['phpgw']->locations->add('.resource', 'resource',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
+ $GLOBALS['phpgw']->locations->add('.customer', 'customer',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
+ $GLOBALS['phpgw']->locations->add('.vendor', 'vendor',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
+ $GLOBALS['phpgw']->locations->add('.booking', 'booking',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
+ $GLOBALS['phpgw']->locations->add('.vendor_report', 'vendor_report',
'eventplannerfrontend', $allow_grant = true, $custom_tbl = '', $c_function =
true);
+ $GLOBALS['phpgw']->locations->add('.customer_report',
'customer_report', 'eventplannerfrontend', $allow_grant = true, $custom_tbl =
'', $c_function = true);
+
+
+// Default user
+ $GLOBALS['phpgw']->accounts = createObject('phpgwapi.accounts');
+ $GLOBALS['phpgw']->acl = CreateObject('phpgwapi.acl');
+
+ $modules = array
+ (
+ 'eventplannerfrontend',
+ );
+
+
+ if (!$GLOBALS['phpgw']->accounts->exists('eventplannerguest')) // no
guest account already exists
+ {
+ $passwd = $GLOBALS['phpgw']->common->randomstring(6) . "ABab1!";
+
+ $GLOBALS['phpgw_info']['server']['password_level'] = '8CHAR';
+ $account = new phpgwapi_user();
+ $account->lid = 'eventplannerguest';
+ $account->firstname = 'Eventplanner';
+ $account->lastname = 'Guest';
+ $account->passwd = $passwd;
+ $account->enabled = true;
+ $account->expires = -1;
+ $eventplannerguest =
$GLOBALS['phpgw']->accounts->create($account, array(), array(), $modules);
+
+ $preferences = createObject('phpgwapi.preferences');
+ $preferences->set_account_id($eventplannerguest);
+ $preferences->add('common', 'template_set', 'bookingfrontend');
+ $preferences->save_repository(true, $GLOBALS['type']);
+ $config = CreateObject('phpgwapi.config',
'eventplannerfrontend');
+ $config->read();
+ $config->value('anonymous_user', 'eventplannerguest');
+ $config->value('anonymous_passwd', $passwd);
+ $config->save_repository();
+ }
+
+ $eventplannerguest =
$GLOBALS['phpgw']->accounts->name2id('eventplannerguest');
+
+ $aclobj = & $GLOBALS['phpgw']->acl;
+ $aclobj->set_account_id($eventplannerguest, true);
+ $aclobj->add('eventplannerfrontend', 'run', 1);
+ $aclobj->add('eventplannerfrontend', '.application', 1);
+ $aclobj->add('eventplannerfrontend', '.resource', 1);
+ $aclobj->add('eventplannerfrontend', '.customer', 1 | 2 | 4);
+ $aclobj->add('eventplannerfrontend', '.vendor', 1 | 2 | 4);
+ $aclobj->add('eventplannerfrontend', '.booking', 1 | 2 | 4);
+ $aclobj->add('eventplannerfrontend', '.vendor_report', 1 | 2 | 4);
+ $aclobj->add('eventplannerfrontend', '.customer_report', 1 | 2 | 4);
+ $aclobj->save_repository();
+
\ No newline at end of file
Added: trunk/eventplannerfrontend/setup/phpgw_no.lang
===================================================================
--- trunk/eventplannerfrontend/setup/phpgw_no.lang
(rev 0)
+++ trunk/eventplannerfrontend/setup/phpgw_no.lang 2017-01-22 16:47:39 UTC
(rev 16181)
@@ -0,0 +1 @@
+eventplannerfrontend common no TurneplanleggerFrontend
\ No newline at end of file
Added: trunk/eventplannerfrontend/setup/setup.inc.php
===================================================================
--- trunk/eventplannerfrontend/setup/setup.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/setup/setup.inc.php 2017-01-22 16:47:39 UTC
(rev 16181)
@@ -0,0 +1,45 @@
+<?php
+ /**
+ * phpGroupWare - eventplanner: a eventplanner application.
+ *
+ * @author Sigurd Nes <address@hidden>
+ * @copyright Copyright (C) 2003-2005 Free Software Foundation, Inc.
http://www.fsf.org/
+ * @license http://www.gnu.org/licenses/gpl.html GNU General Public
License
+ * @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
+ * @package eventplanner
+ * @subpackage setup
+ * @version $Id: setup.inc.php 14728 2016-02-11 22:28:46Z sigurdne $
+ */
+ $setup_info['eventplannerfrontend']['name'] = 'eventplannerfrontend';
+ $setup_info['eventplannerfrontend']['version'] = '0.1.1';
+ $setup_info['eventplannerfrontend']['app_order'] = 9;
+ $setup_info['eventplannerfrontend']['enable'] = 1;
+ $setup_info['eventplannerfrontend']['app_group'] = 'office';
+
+ $setup_info['eventplannerfrontend']['description'] = 'Bergen kommune
eventplannerfrontend';
+
+ $setup_info['eventplannerfrontend']['author'][] = array
+ (
+ 'name' => 'Sigurd Nes',
+ 'email' => 'address@hidden'
+ );
+
+ /* Dependencies for this app to work */
+ $setup_info['eventplannerfrontend']['depends'][] = array(
+ 'appname' => 'phpgwapi',
+ 'versions' => Array('0.9.17', '0.9.18')
+ );
+
+ $setup_info['eventplannerfrontend']['depends'][] = array(
+ 'appname' => 'eventplanner',
+ 'versions' => array('0.9.18')
+ );
+
+
+ /* The hooks this app includes, needed for hooks registration */
+ $setup_info['eventplannerfrontend']['hooks'] = array
+ (
+ 'menu' => 'eventplannerfrontend.menu.get_menu',
+ 'set_cookie_domain' =>
'eventplannerfrontend.hook_helper.set_cookie_domain',
+ 'config'
+ );
Property changes on: trunk/eventplannerfrontend/setup/setup.inc.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/eventplannerfrontend/setup/tables_current.inc.php
===================================================================
--- trunk/eventplannerfrontend/setup/tables_current.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/setup/tables_current.inc.php 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,2 @@
+<?php
+ $phpgw_baseline = array();
Property changes on: trunk/eventplannerfrontend/setup/tables_current.inc.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/eventplannerfrontend/setup/tables_update.inc.php
===================================================================
--- trunk/eventplannerfrontend/setup/tables_update.inc.php
(rev 0)
+++ trunk/eventplannerfrontend/setup/tables_update.inc.php 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1 @@
+<?php
Added: trunk/eventplannerfrontend/templates/base/access_denied.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/access_denied.xsl
(rev 0)
+++ trunk/eventplannerfrontend/templates/base/access_denied.xsl 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,9 @@
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+
+ <div class="content">
+ <div class="error">
+ <xsl:value-of select="php:function('lang', 'Access
denied')" />
+ </div>
+ </div>
+
+</xsl:template>
Added: trunk/eventplannerfrontend/templates/base/app_data.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/app_data.xsl
(rev 0)
+++ trunk/eventplannerfrontend/templates/base/app_data.xsl 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,2 @@
+<xsl:template name="dummy">
+</xsl:template>
Property changes on: trunk/eventplannerfrontend/templates/base/app_data.xsl
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: trunk/eventplannerfrontend/templates/base/application_info.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/application_info.xsl
(rev 0)
+++ trunk/eventplannerfrontend/templates/base/application_info.xsl
2017-01-22 16:47:39 UTC (rev 16181)
@@ -0,0 +1,85 @@
+
+<xsl:template name="application_info" xmlns:php="http://php.net/xsl">
+ <xsl:param name="application" />
+ <xsl:param name="application_type_list" />
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang', 'vendor')"/>
+ </label>
+ <xsl:value-of select="application/vendor_name"/>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang', 'event')"/>
+ </label>
+ <xsl:value-of select="application/title"/>
+ </div>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang', 'remark')"/>
+ </label>
+ <xsl:value-of select="application/remark"/>
+ </div>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang', 'contact
name')"/>
+ </label>
+ <xsl:value-of select="application/contact_name"/>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang', 'contact
email')"/>
+ </label>
+ <xsl:value-of select="application/contact_email"/>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang', 'contact
phone')"/>
+ </label>
+ <xsl:value-of select="application/contact_phone"/>
+
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang', 'program
type')"/>
+ </label>
+ <div class="pure-custom">
+ <table class="pure-table pure-table-bordered"
border="0" cellspacing="2" cellpadding="2">
+ <thead>
+ <tr>
+ <th>
+ </th>
+ <th>
+ <xsl:value-of
select="php:function('lang', 'program type')"/>
+ </th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each
select="application_type_list">
+ <tr>
+ <td>
+ <xsl:if
test="selected = 1">
+
<xsl:text>X</xsl:text>
+ </xsl:if>
+ </td>
+ <td>
+ <xsl:value-of
disable-output-escaping="yes" select="name"/>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of select="php:function('lang',
'event timespan')"/>
+ </label>
+ <xsl:value-of select="application/timespan"/>
+ </div>
+
+ </div>
+
+</xsl:template>
Added: trunk/eventplannerfrontend/templates/base/booking.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/booking.xsl
(rev 0)
+++ trunk/eventplannerfrontend/templates/base/booking.xsl 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,476 @@
+
+<!-- $Id: price_item.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
+<xsl:template match="data">
+ <xsl:choose>
+ <xsl:when test="edit">
+ <xsl:apply-templates select="edit" />
+ </xsl:when>
+ <xsl:when test="view">
+ <xsl:apply-templates select="view" />
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<!-- add / edit -->
+<xsl:template xmlns:php="http://php.net/xsl" match="edit">
+ <style type="text/css">
+ #floating-box {
+ position: relative;
+ z-index: 1000;
+ }
+ #submitbox {
+ display: none;
+ }
+ </style>
+ <xsl:variable name="date_format">
+ <xsl:value-of select="php:function('get_phpgw_info',
'user|preferences|common|dateformat')" />
+ <xsl:text> H:i</xsl:text>
+ </xsl:variable>
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
+ <xsl:variable name="mode">
+ <xsl:value-of select="mode"/>
+ </xsl:variable>
+
+ <div class="content">
+ <script type="text/javascript">
+ var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required', 'customer')"/>;
+ </script>
+ <form id="form" name="form" method="post"
action="{$form_action}" class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <div id="floating-box">
+ <div id="submitbox">
+ <table width="200px">
+ <tbody>
+ <tr>
+ <td
width="200px">
+
<xsl:variable name="lang_save">
+
<xsl:value-of select="php:function('lang', 'save')"/>
+
</xsl:variable>
+
<input type="button" class="pure-button pure-button-primary" name="save"
id="save_button" onClick="validate_submit();">
+
<xsl:attribute name="value">
+
<xsl:value-of select="$lang_save"/>
+
</xsl:attribute>
+
<xsl:attribute name="title">
+
<xsl:value-of select="$lang_save"/>
+
</xsl:attribute>
+
</input>
+ </td>
+ <td>
+
<xsl:variable name="lang_cancel">
+
<xsl:value-of select="php:function('lang', 'cancel')"/>
+
</xsl:variable>
+
<input type="button" class="pure-button pure-button-primary" name="done"
value="{$lang_cancel}" onClick="window.location = '{cancel_url}';">
+
<xsl:attribute name="title">
+
<xsl:value-of select="php:function('lang', 'Back to the ticket
list')"/>
+
</xsl:attribute>
+
</input>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ <input type="hidden" id="active_tab"
name="active_tab" value="{value_active_tab}"/>
+ <div id="first_tab">
+ <xsl:if test="booking/id > 0">
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'id')"/>
+ </label>
+ <input type="hidden"
id="booking_id" name="id" value="{booking/id}"/>
+ <input type="hidden"
name="application_id" value="{booking/application_id}"/>
+ <xsl:value-of
select="booking/id"/>
+ </div>
+ </xsl:if>
+ <fieldset>
+ <legend>
+ <xsl:value-of
select="php:function('lang', 'vendor')"/>
+ </legend>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'vendor')"/>
+ </label>
+ <xsl:value-of
select="application/vendor_name"/>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <a
href="{application_url}" target="_blank">
+
<xsl:value-of select="php:function('lang', 'application')"/>
+ </a>
+
+ </label>
+ <xsl:value-of
select="booking/application_name"/>
+ </div>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'remark')"/>
+ </label>
+ <xsl:value-of
select="application/remark"/>
+ </div>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'contact name')"/>
+ </label>
+ <xsl:value-of
select="application/contact_name"/>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'contact email')"/>
+ </label>
+ <xsl:value-of
select="application/contact_email"/>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'contact phone')"/>
+ </label>
+ <xsl:value-of
select="application/contact_phone"/>
+
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'program type')"/>
+ </label>
+ <div
class="pure-custom">
+ <table
class="pure-table pure-table-bordered" border="0" cellspacing="2"
cellpadding="2">
+ <thead>
+
<tr>
+
<th>
+
<xsl:value-of select="php:function('lang', 'select')"/>
+
</th>
+
<th>
+
<xsl:value-of select="php:function('lang', 'program type')"/>
+
</th>
+
</tr>
+ </thead>
+ <tbody>
+
<xsl:for-each select="application_type_list">
+
<tr>
+
<td>
+
<xsl:if test="selected = 1">
+
<xsl:text>X</xsl:text>
+
</xsl:if>
+
</td>
+
<td>
+
<xsl:value-of disable-output-escaping="yes"
select="name"/>
+
</td>
+
</tr>
+
</xsl:for-each>
+ </tbody>
+ </table>
+ </div>
+
+ </div>
+ </fieldset>
+
+ <fieldset>
+
+ <legend>
+ <xsl:value-of
select="php:function('lang', 'customer')"/>
+ </legend>
+
+ <div class="pure-control-group">
+ <xsl:variable
name="lang_customer">
+ <xsl:value-of
select="php:function('lang', 'customer')"/>
+ </xsl:variable>
+ <label>
+ <xsl:choose>
+
<xsl:when test="booking/customer_id > 0">
+
<div id="customer_url">
+
<a href="{customer_url}" target="_blank">
+
<xsl:value-of select="$lang_customer"/>
+
</a>
+
</div>
+
</xsl:when>
+
<xsl:otherwise>
+
<div id="customer_url">
+
<xsl:value-of select="$lang_customer"/>
+
</div>
+
</xsl:otherwise>
+ </xsl:choose>
+ </label>
+ <input type="hidden"
id="customer_id" name="customer_id" value="{booking/customer_id}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="data-validation-error-msg">
+
<xsl:value-of select="$lang_customer"/>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="$lang_customer"/>
+ </xsl:attribute>
+ </input>
+ <input type="text"
id="customer_name" name="customer_name" value="{booking/customer_name}">
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="$lang_customer"/>
+ </xsl:attribute>
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ </input>
+ <xsl:text> </xsl:text>
+ <a
href="{new_customer_url}" target="_blank">
+ <xsl:value-of
select="php:function('lang', 'new')"/>
+ </a>
+ <div
id="customer_container"/>
+ </div>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'contact name')"/>
+ </label>
+ <input type="text"
id="customer_contact_name" name="customer_contact_name"
value="{booking/customer_contact_name}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'contact_name')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'email')"/>
+ </label>
+ <input type="text"
id="customer_contact_email" name="customer_contact_email"
value="{booking/customer_contact_email}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>email</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'email')"/>
+ </xsl:attribute>
+ </input>
+ <xsl:choose>
+ <xsl:when
test="valid_email = 1">
+
<xsl:text> </xsl:text>
+ <a
href="{link_create_user}">
+
<xsl:value-of select="php:function('lang', 'create_user_based_on_email_link')"/>
+ </a>
+ </xsl:when>
+ </xsl:choose>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'contact phone')"/>
+ </label>
+ <input type="text"
id="customer_contact_phone" name="customer_contact_phone"
value="{booking/customer_contact_phone}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'contact_phone')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ </fieldset>
+
+ <fieldset>
+
+ <legend>
+ <xsl:value-of
select="php:function('lang', 'booking')"/>
+ </legend>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'active')"/>
+ </label>
+ <input type="checkbox"
name="active" id="active" value="1" readonly="readonly">
+ <xsl:if
test="booking/active = 1">
+
<xsl:attribute name="checked" value="checked"/>
+ </xsl:if>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'completed')"/>
+ </label>
+ <input type="checkbox"
name="completed" id="completed" value="1">
+ <xsl:if
test="booking/completed = 1">
+
<xsl:attribute name="checked" value="checked"/>
+ </xsl:if>
+ </input>
+ </div>
+
+ <div class="pure-control-group">
+ <xsl:variable
name="lang_from">
+ <xsl:value-of
select="php:function('lang', 'from')"/>
+ </xsl:variable>
+ <label>
+ <xsl:value-of
select="$lang_from"/>
+ </label>
+ <input type="text"
id="from_" name="from_" size="16" readonly="readonly">
+ <xsl:if
test="booking/from_ != 0 and booking/from_ != ''">
+
<xsl:attribute name="value">
+
<xsl:value-of select="php:function('show_date', number(booking/from_),
$date_format)"/>
+
</xsl:attribute>
+ </xsl:if>
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="data-validation-error-msg">
+
<xsl:value-of select="$lang_from"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'event timespan')"/>
+ </label>
+ <xsl:value-of
select="application/timespan"/>
+ </div>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'to')"/>
+ </label>
+ <xsl:value-of
select="php:function('show_date', number(booking/to_), $date_format)"/>
+ </div>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'location')"/>
+ </label>
+ <textarea cols="47"
rows="7" id="location" name="location">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:value-of
select="booking/location"/>
+ </textarea>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'remark')"/>
+ </label>
+ <textarea cols="47"
rows="7" name="remark">
+ <xsl:value-of
select="booking/remark"/>
+ </textarea>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'comment')"/>
+ </label>
+ <textarea cols="47"
rows="7" name="comment">
+ <xsl:value-of
select="booking/comment"/>
+ </textarea>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'details')"/>
+ </label>
+ <div
class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_0'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+
</xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div id="reports">
+ <fieldset>
+ <legend>
+ <xsl:value-of
select="php:function('lang', 'vendor report')"/>
+ </legend>
+ <div class="pure-control-group">
+ <div
class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_1'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="tabletools" select ='tabletools'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+
</xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+
+ </fieldset>
+ <fieldset>
+ <legend>
+ <xsl:value-of
select="php:function('lang', 'customer report')"/>
+ </legend>
+ <div class="pure-control-group">
+ <div
class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_2'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="tabletools" select ='tabletools'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+
</xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+
+ </fieldset>
+
+ </div>
+ </div>
+ <div id="submit_group_bottom">
+ <input type="button" class="pure-button
pure-button-primary" name="save" onClick="validate_submit();">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'save')"/>
+ </xsl:attribute>
+ </input>
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="cancel_url"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" onClick="window.location = '{cancel_url}';">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'cancel')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ </form>
+ </div>
+
+</xsl:template>
+
+<xsl:template match="options">
+ <option value="{id}">
+ <xsl:if test="selected != 0">
+ <xsl:attribute name="selected" value="selected"/>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes" select="name"/>
+ </option>
+</xsl:template>
+
+
+<xsl:template xmlns:php="http://php.net/xsl" match="view">
+ <div>
+ <form id="form" name="form" method="post" action=""
class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <div id="showing">
+
+ </div>
+ </div>
+ <div class="proplist-col">
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="cancel_url"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" value="{lang_cancel}"
onMouseout="window.status='';return true;" onClick="window.location =
'{cancel_url}';"/>
+ </div>
+ </form>
+ </div>
+</xsl:template>
Added: trunk/eventplannerfrontend/templates/base/config.tpl
===================================================================
--- trunk/eventplannerfrontend/templates/base/config.tpl
(rev 0)
+++ trunk/eventplannerfrontend/templates/base/config.tpl 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,132 @@
+<!-- BEGIN header -->
+<form method="POST" action="{action_url}">
+ <table class="pure-table pure-table-bordered">
+ <tr class="th">
+ <td colspan="2"> <b>{title}</b></td>
+ </tr>
+ <!-- END header -->
+ <!-- BEGIN body -->
+ <tr class="row_on">
+ <td colspan="2"> </td>
+ </tr>
+ <tr class="row_off">
+ <td
colspan="2"> <b>{lang_bookingfrontend_settings}</b></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_site_title}</td>
+ <td><input name="newsettings[site_title]"
value="{value_site_title}"></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_footer_info}</td>
+ <td><input name="newsettings[footer_info]"
value="{value_footer_info}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_remote_authentication}:</td>
+ <td>
+ <select
name="newsettings[authentication_method]">
+ {hook_authentication}
+ </select>
+ </td>
+ </tr>
+ <tr class="row_on">
+
<td>{lang_cookie_domain_for_sessions_-_if_Same_as_framework_leave_empty}</td>
+ <td><input name="newsettings[cookie_domain]"
value="{value_cookie_domain}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_Anonymous_user}:</td>
+ <td><input name="newsettings[anonymous_user]"
value="{value_anonymous_user}"></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_Anonymous_password}:</td>
+ <td><input type="password"
name="newsettings[anonymous_passwd]" value="{value_anonymous_passwd}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_custom_login_url}:</td>
+ <td><input name="newsettings[custom_login_url]"
value="{value_custom_login_url}"></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_custom_login_url_parameter}:</td>
+ <td><input name="newsettings[login_parameter]"
value="{value_login_parameter}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_login_header_key}:</td>
+ <td><input name="newsettings[header_key]"
value="{value_header_key}"></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_login_header_regular_expression}:</td>
+ <td><input
name="newsettings[header_regular_expression]"
value="{value_header_regular_expression}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_login_soap_client_location}:</td>
+ <td><input name="newsettings[soap_location]"
value="{value_soap_location}"></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_login_soap_client_uri}:</td>
+ <td><input name="newsettings[soap_uri]"
value="{value_soap_uri}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_login_soap_client_proxy_host}:</td>
+ <td><input name="newsettings[soap_proxy_host]"
value="{value_soap_proxy_host}"></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_login_soap_client_proxy_port}:</td>
+ <td><input name="newsettings[soap_proxy_port]"
value="{value_soap_proxy_port}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_login_soap_client_encoding}:</td>
+ <td><input name="newsettings[soap_encoding]"
value="{value_soap_encoding}"></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_login_soap_client_login}:</td>
+ <td><input name="newsettings[soap_login]"
value="{value_soap_login}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_login_soap_client_password}:</td>
+ <td><input type ="password"
name="newsettings[soap_password]" value="{value_soap_password}"></td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_login_soap_client_wsdl}:</td>
+ <td><input name="newsettings[soap_wsdl]"
value="{value_soap_wsdl}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_Debug}:</td>
+ <td>
+ <select name="newsettings[debug]">
+ <option value=""
{selected_debug_}>NO</option>
+ <option value="1"
{selected_debug_1}>YES</option>
+ </select>
+ </td>
+ </tr>
+ <tr class="row_on">
+ <td>{lang_google_tracker_id}:</td>
+ <td><input name="newsettings[tracker_id]"
value="{value_tracker_id}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_url_to_external_logout}:
+ <br/> Redirect is computed if url ends with '='
+ </td>
+ <td><input name="newsettings[external_logout]"
value="{value_external_logout}"></td>
+ </tr>
+ <tr class="row_off">
+ <td>{lang_bookingfrontend_host}:
+ <br/> Needed for the return from the
external_logout
+ </td>
+ <td><input name="newsettings[bookingfrontend_host]"
value="{value_bookingfrontend_host}"></td>
+ </tr>
+
+ <!-- END body -->
+ <!-- BEGIN footer -->
+ <tr class="th">
+ <td colspan="2">
+
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input type="submit" name="submit"
value="{lang_submit}">
+ <input type="submit" name="cancel"
value="{lang_cancel}">
+ </td>
+ </tr>
+ </table>
+</form>
+<!-- END footer -->
Added: trunk/eventplannerfrontend/templates/base/customer.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/customer.xsl
(rev 0)
+++ trunk/eventplannerfrontend/templates/base/customer.xsl 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,299 @@
+
+<!-- $Id: price_item.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
+<xsl:template match="data">
+ <xsl:choose>
+ <xsl:when test="edit">
+ <xsl:apply-templates select="edit" />
+ </xsl:when>
+ <xsl:when test="view">
+ <xsl:apply-templates select="view" />
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<!-- add / edit -->
+<xsl:template xmlns:php="http://php.net/xsl" match="edit">
+ <xsl:variable name="date_format">
+ <xsl:value-of select="php:function('get_phpgw_info',
'user|preferences|common|dateformat')" />
+ </xsl:variable>
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
+ <xsl:variable name="mode">
+ <xsl:value-of select="mode"/>
+ </xsl:variable>
+
+ <div>
+ <script type="text/javascript">
+ var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required')"/>;
+ </script>
+ <form id="form" name="form" method="post"
action="{$form_action}" class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <input type="hidden" id="active_tab"
name="active_tab" value="{value_active_tab}"/>
+ <div id="first_tab">
+ <fieldset>
+ <xsl:if test="customer/id > 0">
+ <div
class="pure-control-group">
+ <label>
+
<xsl:value-of select="php:function('lang', 'id')"/>
+ </label>
+ <input
type="hidden" name="id" value="{customer/id}"/>
+ <xsl:value-of
select="customer/id"/>
+ </div>
+ </xsl:if>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'active')"/>
+ </label>
+ <input type="checkbox"
name="active" id="active" value="1">
+ <xsl:if
test="customer/active = 1">
+
<xsl:attribute name="checked" value="checked"/>
+ </xsl:if>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <xsl:variable
name="lang_category">
+ <xsl:value-of
select="php:function('lang', 'category')"/>
+ </xsl:variable>
+ <label>
+ <xsl:value-of
select="$lang_category"/>
+ </label>
+ <select
name="category_id">
+ <xsl:attribute
name="title">
+
<xsl:value-of select="$lang_category"/>
+ </xsl:attribute>
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="data-validation-error-msg">
+
<xsl:value-of select="$lang_category"/>
+ </xsl:attribute>
+
<xsl:apply-templates select="category_list/options"/>
+ </select>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'name')"/>
+ </label>
+ <input type="text"
name="name" value="{customer/name}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'name')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <xsl:variable
name="lang_address_1">
+ <xsl:value-of
select="php:function('lang', 'address_1')"/>
+ </xsl:variable>
+ <xsl:variable
name="lang_address_2">
+ <xsl:value-of
select="php:function('lang', 'address_2')"/>
+ </xsl:variable>
+ <label>
+ <xsl:value-of
select="php:function('lang', 'address')"/>
+ </label>
+ <input type="text"
name="address_1" value="{customer/address_1}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="$lang_address_1"/>
+ </xsl:attribute>
+
+ </input>
+ <input type="text"
name="address_2" value="{customer/address_2}">
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="$lang_address_2"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'postal_code_place')"/>
+ </label>
+ <input type="text"
name="zip_code" value="{customer/zip_code}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'zip_code')"/>
+ </xsl:attribute>
+ </input>
+ <input type="text"
name="city" value="{customer/city}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'city')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'customer_organization_number')"/>
+ </label>
+ <input type="text"
id="lastname" name="customer_organization_number"
value="{customer/customer_organization_number}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'customer_organization_number')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'contact name')"/>
+ </label>
+ <input type="text"
name="contact_name" value="{customer/contact_name}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'contact_name')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'email')"/>
+ </label>
+ <input type="text"
name="contact_email" id="contact_email" value="{customer/contact_email}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>email</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'email')"/>
+ </xsl:attribute>
+ </input>
+ <xsl:choose>
+ <xsl:when
test="valid_email = 1">
+
<xsl:text> </xsl:text>
+ <a
href="{link_create_user}">
+
<xsl:value-of select="php:function('lang', 'create_user_based_on_email_link')"/>
+ </a>
+ </xsl:when>
+ </xsl:choose>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'contact phone')"/>
+ </label>
+ <input type="text"
name="contact_phone" value="{customer/contact_phone}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'contact_phone')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'account_number')"/>
+ </label>
+ <input type="text"
name="account_number" value="{customer/account_number}">
+ <xsl:attribute
name="data-validation">
+
<xsl:text>required</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute
name="placeholder">
+
<xsl:value-of select="php:function('lang', 'account_number')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'description')"/>
+ </label>
+ <textarea cols="47"
rows="7" name="description">
+ <xsl:value-of
select="customer/description"/>
+ </textarea>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'remark')"/>
+ </label>
+ <textarea cols="47"
rows="7" name="remark">
+ <xsl:value-of
select="customer/remark"/>
+ </textarea>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'comment')"/>
+ </label>
+ <textarea cols="47"
rows="7" name="comment">
+ <xsl:value-of
select="customer/comment"/>
+ </textarea>
+ </div>
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'details')"/>
+ </label>
+ <div
class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_0'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+
</xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ </div>
+ <div class="proplist-col">
+ <input type="submit" class="pure-button
pure-button-primary" name="save">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'save')"/>
+ </xsl:attribute>
+ </input>
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="cancel_url"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" onClick="window.location = '{cancel_url}';">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'cancel')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ </form>
+ </div>
+</xsl:template>
+
+<xsl:template match="options">
+ <option value="{id}">
+ <xsl:if test="selected != 0">
+ <xsl:attribute name="selected" value="selected"/>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes" select="name"/>
+ </option>
+</xsl:template>
+
+
+<xsl:template xmlns:php="http://php.net/xsl" match="view">
+ <div>
+ <form id="form" name="form" method="post" action=""
class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <div id="showing">
+
+ </div>
+ </div>
+ <div class="proplist-col">
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="cancel_url"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" value="{lang_cancel}"
onMouseout="window.status='';return true;" onClick="window.location =
'{cancel_url}';"/>
+ </div>
+ </form>
+ </div>
+</xsl:template>
Added: trunk/eventplannerfrontend/templates/base/events.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/events.xsl
(rev 0)
+++ trunk/eventplannerfrontend/templates/base/events.xsl 2017-01-22
16:47:39 UTC (rev 16181)
@@ -0,0 +1,138 @@
+
+<!-- $Id: price_item.xsl 12604 2015-01-15 17:06:11Z nelson224 $ -->
+<xsl:template match="data">
+ <xsl:choose>
+ <xsl:when test="edit">
+ <xsl:apply-templates select="edit" />
+ </xsl:when>
+ <xsl:when test="view">
+ <xsl:apply-templates select="view" />
+ </xsl:when>
+ </xsl:choose>
+
+</xsl:template>
+
+<!-- add / edit -->
+<xsl:template xmlns:php="http://php.net/xsl" match="edit">
+ <xsl:variable name="date_format">
+ <xsl:value-of select="php:function('get_phpgw_info',
'user|preferences|common|dateformat')" />
+ <xsl:text> H:i</xsl:text>
+ </xsl:variable>
+ <xsl:variable name="form_action">
+ <xsl:value-of select="form_action"/>
+ </xsl:variable>
+ <xsl:variable name="mode">
+ <xsl:value-of select="mode"/>
+ </xsl:variable>
+
+ <div>
+ <script type="text/javascript">
+ var lang = <xsl:value-of
select="php:function('js_lang', 'Name or company is required')"/>;
+ </script>
+ <form id="form" name="form" method="post"
action="{$form_action}" class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <input type="hidden" id="active_tab"
name="active_tab" value="{value_active_tab}"/>
+ <div id="first_tab">
+ <xsl:if test="booking/id > 0">
+ <div class="pure-control-group">
+ <label>
+ <a
href="{booking_url}">
+
<xsl:value-of select="php:function('lang', 'booking')"/>
+ </a>
+ </label>
+ <input type="hidden"
name="booking_id" value="{booking/id}"/>
+ <xsl:value-of
select="booking/id"/>
+ </div>
+ </xsl:if>
+ <xsl:if test="vendor_report/id > 0">
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'report')"/>
+ </label>
+ <input type="hidden"
name="id" value="{vendor_report/id}"/>
+ <xsl:value-of
select="vendor_report/id"/>
+ </div>
+ </xsl:if>
+ <xsl:call-template
name="application_info">
+ <xsl:with-param
name="application" select ='application'/>
+ <xsl:with-param
name="application_type_list" select ='application_type_list'/>
+ </xsl:call-template>
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'category')"/>
+ </label>
+ <xsl:value-of
select="category_name"/>
+ </div>
+
+
+ <div class="pure-control-group">
+ <label>
+ <xsl:value-of
select="php:function('lang', 'event dates')"/>
+ </label>
+ <div class="pure-custom">
+ <xsl:for-each
select="datatable_def">
+ <xsl:if
test="container = 'datatable-container_0'">
+
<xsl:call-template name="table_setup">
+
<xsl:with-param name="container" select ='container'/>
+
<xsl:with-param name="requestUrl" select ='requestUrl'/>
+
<xsl:with-param name="ColumnDefs" select ='ColumnDefs'/>
+
<xsl:with-param name="tabletools" select ='tabletools'/>
+
<xsl:with-param name="data" select ='data'/>
+
<xsl:with-param name="config" select ='config'/>
+
</xsl:call-template>
+ </xsl:if>
+ </xsl:for-each>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <div class="proplist-col">
+ <!--input type="submit" class="pure-button
pure-button-primary" name="save">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'save')"/>
+ </xsl:attribute>
+ </input-->
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="cancel_url"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" onClick="window.location = '{cancel_url}';">
+ <xsl:attribute name="value">
+ <xsl:value-of
select="php:function('lang', 'cancel')"/>
+ </xsl:attribute>
+ </input>
+ </div>
+ </form>
+ </div>
+</xsl:template>
+
+<xsl:template match="options">
+ <option value="{id}">
+ <xsl:if test="selected != 0">
+ <xsl:attribute name="selected" value="selected"/>
+ </xsl:if>
+ <xsl:value-of disable-output-escaping="yes" select="name"/>
+ </option>
+</xsl:template>
+
+
+<xsl:template xmlns:php="http://php.net/xsl" match="view">
+ <div>
+ <form id="form" name="form" method="post" action=""
class="pure-form pure-form-aligned">
+ <div id="tab-content">
+ <xsl:value-of disable-output-escaping="yes"
select="tabs"/>
+ <div id="showing">
+
+ </div>
+ </div>
+ <div class="proplist-col">
+ <xsl:variable name="cancel_url">
+ <xsl:value-of select="cancel_url"/>
+ </xsl:variable>
+ <input type="button" class="pure-button
pure-button-primary" name="cancel" value="{lang_cancel}"
onMouseout="window.status='';return true;" onClick="window.location =
'{cancel_url}';"/>
+ </div>
+ </form>
+ </div>
+</xsl:template>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16181] more on eventplanner,
sigurdne <=