[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [14262] fixing forms
From: |
Saul |
Subject: |
[Fmsystem-commits] [14262] fixing forms |
Date: |
Sat, 31 Oct 2015 00:12:25 +0000 |
Revision: 14262
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=14262
Author: psaul
Date: 2015-10-31 00:12:24 +0000 (Sat, 31 Oct 2015)
Log Message:
-----------
fixing forms
Modified Paths:
--------------
branches/dev-syncromind/bookingfrontend/templates/base/building.xsl
branches/dev-syncromind/bookingfrontend/templates/base/resource.xsl
branches/dev-syncromind/bookingfrontend/templates/base/resource_schedule.xsl
Added Paths:
-----------
branches/dev-syncromind/bookingfrontend/templates/base/application_new.xsl
Added:
branches/dev-syncromind/bookingfrontend/templates/base/application_new.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/application_new.xsl
(rev 0)
+++ branches/dev-syncromind/bookingfrontend/templates/base/application_new.xsl
2015-10-31 00:12:24 UTC (rev 14262)
@@ -0,0 +1,245 @@
+<xsl:template match="data" xmlns:php="http://php.net/xsl">
+ <div id="content">
+
+ <h3><xsl:value-of select="php:function('lang', 'New
application')"/></h3>
+ <xsl:call-template name="msgbox"/>
+ <!--xsl:call-template name="yui_booking_i18n"/-->
+
+ <form action="" method="POST" id='application_form'>
+ <xsl:if test="config/application_new_application">
+ <p style="width: 750px;">
+ <xsl:value-of
select="config/application_new_application"/>
+ </p>
+ </xsl:if>
+
+ <dl class="form-2col">
+ <div class="heading">1. <xsl:value-of
select="php:function('lang', 'Why?')" /></div>
+ <dt>
+ <label for="field_activity"><xsl:value-of
select="php:function('lang', 'Activity')" /></label>
+ <xsl:if test="config/application_activities">
+ <p>
+ <xsl:value-of
select="config/application_activities"/>
+ </p>
+ </xsl:if>
+ </dt>
+ <dd>
+ <select name="activity_id" id="field_activity">
+ <option value=""><xsl:value-of
select="php:function('lang', '-- select an activity --')" /></option>
+ <xsl:for-each select="activities">
+ <option>
+ <xsl:if
test="../application/activity_id = id">
+ <xsl:attribute
name="selected">selected</xsl:attribute>
+ </xsl:if>
+ <xsl:attribute
name="value"><xsl:value-of select="id"/></xsl:attribute>
+ <xsl:value-of
select="name"/>
+ </option>
+ </xsl:for-each>
+ </select>
+ </dd>
+ <dt>
+ <label for="field_description"><xsl:value-of
select="php:function('lang', 'Information about the event')" /></label>
+ <xsl:if test="config/application_description">
+ <p>
+ <xsl:value-of
select="config/application_description"/>
+ </p>
+ </xsl:if>
+ </dt>
+ <dd>
+ <textarea id="field_description"
class="full-width" name="description"><xsl:value-of
select="application/description"/></textarea>
+ </dd>
+ <dt>
+ <xsl:if test="config/application_equipment">
+ <p>
+ <xsl:value-of select="config/application_equipment"/>
+ </p>
+ </xsl:if>
+ </dt>
+ <dd>
+ <textarea id="field_equipment" class="full-width"
name="equipment"><xsl:value-of select="application/equipment"/></textarea>
+ </dd>
+ </dl>
+ <dl class="form-col">
+ <div class="heading">2. <xsl:value-of
select="php:function('lang', 'How many?')" /></div>
+ <xsl:if test="config/application_howmany">
+ <p>
+ <xsl:value-of
select="config/application_howmany"/>
+ </p>
+ </xsl:if>
+ <dt><label for="field_activity"><xsl:value-of
select="php:function('lang', 'Estimated number of participants')"
/></label></dt>
+ <dd>
+ <table id="agegroup">
+ <tr><th/><th><xsl:value-of
select="php:function('lang', 'Male')" /></th>
+ <th><xsl:value-of
select="php:function('lang', 'Female')" /></th></tr>
+ <xsl:for-each select="agegroups">
+ <xsl:variable
name="id"><xsl:value-of select="id"/></xsl:variable>
+ <tr>
+ <th><xsl:value-of
select="name"/></th>
+ <td>
+ <input
type="text">
+
<xsl:attribute name="name">male[<xsl:value-of select="id"/>]</xsl:attribute>
+
<xsl:attribute name="value"><xsl:value-of
select="../application/agegroups/male[../agegroup_id = $id]"/></xsl:attribute>
+ </input>
+ </td>
+ <td>
+ <input
type="text">
+
<xsl:attribute name="name">female[<xsl:value-of select="id"/>]</xsl:attribute>
+
<xsl:attribute name="value"><xsl:value-of
select="../application/agegroups/female[../agegroup_id = $id]"/></xsl:attribute>
+ </input>
+ </td>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </dd>
+ </dl>
+ <div class="clr"/>
+ <dl class="form-col">
+ <div class="heading">3. <xsl:value-of
select="php:function('lang', 'Where?')" /></div>
+ <xsl:if test="config/application_where">
+ <p>
+ <xsl:value-of
select="config/application_where"/>
+ </p>
+ </xsl:if>
+ <dt><label for="field_building"><xsl:value-of
select="php:function('lang', 'Building')" /></label></dt>
+ <dd>
+ <div class="autocomplete">
+ <input id="field_building_id"
name="building_id" type="hidden">
+ <xsl:attribute
name="value"><xsl:value-of select="application/building_id"/></xsl:attribute>
+ </input>
+ <input id="field_building_name"
name="building_name" type="text">
+ <xsl:attribute
name="value"><xsl:value-of select="application/building_name"/></xsl:attribute>
+ </input>
+ <div id="building_container"/>
+ </div>
+ </dd>
+ <dt><label for="field_resources"><xsl:value-of
select="php:function('lang', 'Resources')" /></label></dt>
+ <dd>
+ <div id="resources_container"><xsl:value-of
select="php:function('lang', 'Select a building first')" /></div>
+ </dd>
+ </dl>
+ <dl class="form-col">
+ <div class="heading">4. <xsl:value-of
select="php:function('lang', 'When?')" /></div>
+ <xsl:if test="config/application_when">
+ <p>
+ <xsl:value-of
select="config/application_when"/>
+ </p>
+ </xsl:if>
+ <div id="dates-container">
+ <xsl:for-each select="application/dates">
+ <div class="date-container">
+ <a href="#"
class="close-btn">-</a>
+ <dt><label
for="field_from"><xsl:value-of select="php:function('lang', 'From')"
/></label></dt>
+ <dd class="datetime-picker">
+ <input id="field_from"
name="from_[]" type="text">
+ <xsl:attribute
name="value"><xsl:value-of select="from_"/></xsl:attribute>
+ </input>
+ </dd>
+ <dt><label
for="field_to"><xsl:value-of select="php:function('lang', 'To')" /></label></dt>
+ <dd class="datetime-picker">
+ <input id="field_to"
name="to_[]" type="text">
+ <xsl:attribute
name="value"><xsl:value-of select="to_"/></xsl:attribute>
+ </input>
+ </dd>
+ </div>
+ </xsl:for-each>
+ </div>
+
+
+ <dt><a href="#" id="add-date-link"><xsl:value-of
select="php:function('lang', 'Add another date')" /></a></dt>
+ </dl>
+ <dl class="form-col">
+ <div class="heading">5. <xsl:value-of
select="php:function('lang', 'Who?')" /></div>
+ <xsl:if test="config/application_who">
+ <p>
+ <xsl:value-of
select="config/application_who"/>
+ </p>
+ </xsl:if>
+ <dt><label for="field_from"><xsl:value-of
select="php:function('lang', 'Target audience')" /></label></dt>
+ <dd>
+ <div id="audience_container"> </div>
+ </dd>
+ </dl>
+ <div class="clr"/>
+ <dl class="form-col">
+ <div class="heading"><br />6. <xsl:value-of
select="php:function('lang', 'Contact information')" /></div>
+ <xsl:if test="config/application_contact_information">
+ <p>
+ <xsl:value-of
select="config/application_contact_information"/>
+ </p>
+ </xsl:if>
+ <dt><label for="field_contact_name"><xsl:value-of
select="php:function('lang', 'Name')" /></label></dt>
+ <dd>
+ <input id="field_contact_name"
name="contact_name" type="text">
+ <xsl:attribute
name="value"><xsl:value-of select="application/contact_name"/></xsl:attribute>
+ </input>
+ </dd>
+ <dt><label for="field_contact_email"><xsl:value-of
select="php:function('lang', 'E-mail address')" /></label></dt>
+ <dd>
+ <input id="field_contact_email"
name="contact_email" type="text">
+ <xsl:attribute
name="value"><xsl:value-of select="application/contact_email"/></xsl:attribute>
+ </input>
+ </dd>
+ <dt><label for="field_contact_email2"><xsl:value-of
select="php:function('lang', 'Confirm e-mail address')" /></label></dt>
+ <dd>
+ <input id="field_contact_email2"
name="contact_email2" type="text">
+ <xsl:attribute
name="value"><xsl:value-of select="application/contact_email2"/></xsl:attribute>
+ </input>
+ </dd>
+ <dt><label for="field_contact_phone"><xsl:value-of
select="php:function('lang', 'Phone')" /></label></dt>
+ <dd>
+ <input id="field_contact_phone"
name="contact_phone" type="text">
+ <xsl:attribute
name="value"><xsl:value-of select="application/contact_phone"/></xsl:attribute>
+ </input>
+ </dd>
+ </dl>
+ <dl class="form-col">
+ <div class="heading">7. <xsl:value-of
select="php:function('lang', 'responsible applicant')" /> / <xsl:value-of
select="php:function('lang', 'invoice information')" /></div>
+ <xsl:if test="config/application_responsible_applicant">
+ <p>
+ <xsl:value-of
select="config/application_responsible_applicant"/>
+ </p>
+ </xsl:if>
+ <xsl:copy-of
select="phpgw:booking_customer_identifier(application, '')"/>
+ <br />
+ <xsl:if test="config/application_invoice_information">
+ <p>
+ <xsl:value-of
select="config/application_invoice_information"/>
+ </p>
+ </xsl:if>
+ </dl>
+ <dl class="form-col">
+ <div class="heading"><br />8. <xsl:value-of
select="php:function('lang', 'Terms and conditions')" /></div>
+ <xsl:if test="config/application_terms">
+ <p>
+ <xsl:value-of
select="config/application_terms"/>
+ </p>
+ </xsl:if>
+ <br />
+ <div id='regulation_documents'> </div>
+ <br />
+ <xsl:if test="config/application_terms2">
+ <p>
+ <xsl:value-of
select="config/application_terms2"/>
+ </p>
+ </xsl:if>
+ </dl>
+ <div class="form-buttons">
+ <input type="submit">
+ <xsl:attribute name="value"><xsl:value-of
select="php:function('lang', 'Send')"/></xsl:attribute>
+ </input>
+ <a class="cancel">
+ <xsl:attribute name="href"><xsl:value-of
select="application/cancel_link"/></xsl:attribute>
+ <xsl:value-of select="php:function('lang',
'Cancel')" />
+ </a>
+ <p style="width: 750px; margin-top: 10px;">Trykker du
<strong>SEND</strong>-knappen får du opp en rød melding øverst om noen
opplysninger mangler, er alt OK kommer det opp en grønn melding. Det blir sendt
en bekreftelse til din e-post, og en lenke hvor du kan gå inn og se status og
legge til ekstra opplysninger i saken.<br /><br />
+ Trykker du <strong>Avbryt</strong> blir
søknaden ikke sendt eller lagret, og du går tilbake til kalenderen.</p>
+ </div>
+ </form>
+ </div>
+ <script type="text/javascript">
+ var initialDocumentSelection = <xsl:value-of
select="application/accepted_documents_json"/>;
+ var initialAcceptAllTerms = false;
+ var initialSelection = <xsl:value-of
select="application/resources_json"/>;
+ var initialAudience = <xsl:value-of
select="application/audience_json"/>;
+ var lang = <xsl:value-of select="php:function('js_lang',
'From', 'To', 'Resource Type', 'Name', 'Accepted', 'Document', 'You must accept
to follow all terms and conditions of lease first.')"/>;
+ </script>
+</xsl:template>
Modified: branches/dev-syncromind/bookingfrontend/templates/base/building.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/building.xsl
2015-10-31 00:10:30 UTC (rev 14261)
+++ branches/dev-syncromind/bookingfrontend/templates/base/building.xsl
2015-10-31 00:12:24 UTC (rev 14262)
@@ -83,24 +83,29 @@
<script type="text/javascript">
var building_id = <xsl:value-of select="id"/>;
var lang = <xsl:value-of
select="php:function('js_lang', 'Name', 'Category', 'Activity', 'Resource
Type')"/>;
- <![CDATA[
- var resourcesURL =
'index.php?menuaction=booking.uiresource.index&sort=name&filter_building_id=' +
building_id + '&phpgw_return_as=json&';
- var documentURL =
'index.php?menuaction=bookingfrontend.uidocument_building.index&sort=name&no_images=1&filter_owner_id='
+ building_id + '&phpgw_return_as=json&';
- var building_usersURL =
'index.php?menuaction=bookingfrontend.uiorganization.building_users&sort=name&building_id='
+ building_id + '&phpgw_return_as=json&';
- var document_buildingURL =
'index.php?menuaction=bookingfrontend.uidocument_building.index_images&sort=name&filter_owner_id='
+ building_id + '&phpgw_return_as=json&';
- ]]>
-
- var rBuilding_users = [{n: 'ResultSet'},{n:
'Result'}];
-
- var colDefsResources = [{key: 'name', label:
lang['Name'], formatter: genericLink}, {key: 'type', label: lang['Resource
Type']}, {key: 'activity_name', label: lang['Activity']}];
- var colDefsDocument = [{key: 'description',
label: lang['Name'], formatter: genericLink}];
- var colDefsBuilding_users = [{key: 'name',
label: lang['Name'], formatter: genericLink}, {key: 'activity_name', label:
lang['Activity']}];
-
- createTable('resources_container',
resourcesURL, colDefsResources, 'data', 'bookingfrontend-table
bookingfrontend-table-striped');
- createTable('documents_container',
documentURL, colDefsDocument, 'data', 'bookingfrontend-table
bookingfrontend-table-striped');
- createTable('building_users_container',
building_usersURL, colDefsBuilding_users, rBuilding_users,
'bookingfrontend-table bookingfrontend-table-striped');
- //createnInlineImages('images_container',
'document_buildingURL');
+ <![CDATA[
+ var resourcesURL =
'index.php?menuaction=bookingfrontend.uiresource.index_json&sort=name&filter_building_id='
+ building_id + '&phpgw_return_as=json&';
+ var documentURL =
'index.php?menuaction=bookingfrontend.uidocument_building.index&sort=name&no_images=1&filter_owner_id='
+ building_id + '&phpgw_return_as=json&';
+ var building_usersURL =
'index.php?menuaction=bookingfrontend.uiorganization.building_users&sort=name&building_id='
+ building_id + '&phpgw_return_as=json&';
+ var document_buildingURL =
'index.php?menuaction=bookingfrontend.uidocument_building.index_images&sort=name&filter_owner_id='
+ building_id + '&phpgw_return_as=json&';
+ ]]>
+
+ var rResources = 'results';
+ var rBuilding_users = [{n: 'ResultSet'},{n: 'Result'}];
+ var colDefsResources = [{key: 'name', label: lang['Name'],
formatter: genericLink}, {key: 'type', label: lang['Resource Type']}, {key:
'activity_name', label: lang['Activity']}];
+ var colDefsDocument = [{key: 'description', label:
lang['Name'], formatter: genericLink}];
+ var colDefsBuilding_users = [{key: 'name', label:
lang['Name'], formatter: genericLink}, {key: 'activity_name', label:
lang['Activity']}];
+
+ var paginatorTableBuilding_users = new Array();
+ paginatorTableBuilding_users.limit = 10;
+ createPaginatorTable('building_users_container',
paginatorTableBuilding_users);
+
+ createTable('resources_container', resourcesURL,
colDefsResources, rResources, 'bookingfrontend-table
bookingfrontend-table-striped');
+ createTable('documents_container', documentURL,
colDefsDocument, 'data', 'bookingfrontend-table bookingfrontend-table-striped');
+ createTable('building_users_container', building_usersURL,
colDefsBuilding_users, rBuilding_users, 'bookingfrontend-table
bookingfrontend-table-striped', paginatorTableBuilding_users);
+ //createnInlineImages('images_container',
'document_buildingURL');
+
/*
<![CDATA[
Modified: branches/dev-syncromind/bookingfrontend/templates/base/resource.xsl
===================================================================
--- branches/dev-syncromind/bookingfrontend/templates/base/resource.xsl
2015-10-31 00:10:30 UTC (rev 14261)
+++ branches/dev-syncromind/bookingfrontend/templates/base/resource.xsl
2015-10-31 00:12:24 UTC (rev 14262)
@@ -46,15 +46,16 @@
<script type="text/javascript">
var resource_id = <xsl:value-of select="resource/id"/>;
var lang = <xsl:value-of select="php:function('js_lang',
'Name', 'category', 'Activity')"/>;
-
- var documentResourceURL =
'index.php?menuaction=bookingfrontend.uidocument_resource.index&sort=name&no_images=1&filter_owner_id='
+ resource_id + '&phpgw_return_as=json&';
- var documentResourceImagesURL =
'index.php?menuaction=bookingfrontend.uidocument_resource.index_images&sort=name&filter_owner_id='
+ resource_id + '&phpgw_return_as=json&';
-
- var colDefsDocumentResource = [{key: 'name', label:
lang['Name'], formatter: genericLink}];
-
- createTable = ('documents_container', documentsResourceURL,
colDefsDocumentResource);
- createnInlineImages('images_container',
'documentResourceImagesURL');
+ <![CDATA[
+ var documentsResourceURL =
'index.php?menuaction=bookingfrontend.uidocument_resource.index&sort=name&no_images=1&filter_owner_id='
+ resource_id + '&phpgw_return_as=json&';
+ var documentsResourceImagesURL =
'index.php?menuaction=bookingfrontend.uidocument_resource.index_images&sort=name&filter_owner_id='
+ resource_id + '&phpgw_return_as=json&';
+ ]]>
+ var colDefsDocumentsResource = [{key: 'name', label: lang['Name'],
formatter: genericLink}];
+
+ createTable('documents_container', documentsResourceURL,
colDefsDocumentsResource, 'data', 'bookingfrontend-table
bookingfrontend-table-striped');
+ //createnInlineImages('images_container', 'documentResourceImagesURL');
+
/*
<![CDATA[
YAHOO.util.Event.addListener(window, "load", function() {
Modified:
branches/dev-syncromind/bookingfrontend/templates/base/resource_schedule.xsl
===================================================================
---
branches/dev-syncromind/bookingfrontend/templates/base/resource_schedule.xsl
2015-10-31 00:10:30 UTC (rev 14261)
+++
branches/dev-syncromind/bookingfrontend/templates/base/resource_schedule.xsl
2015-10-31 00:12:24 UTC (rev 14262)
@@ -24,25 +24,40 @@
<button
onclick="window.location.href='{resource/application_link}'"><xsl:value-of
select="php:function('lang', 'New booking application')" /></button>
<xsl:call-template name="msgbox"/>
- <ul id="week-selector">
+ <!--ul id="week-selector">
<li><a href="#" onclick="YAHOO.booking.prevWeek();
return false"><xsl:value-of select="php:function('lang', 'Previous
week')"/></a></li>
<li id="cal_container"/>
<li><a href="#" onclick="YAHOO.booking.nextWeek();
return false"><xsl:value-of select="php:function('lang', 'Next
week')"/></a></li>
- </ul>
+ </ul-->
+ <ul id="week-selector">
+ <li><a id="btnPrevWeek" class="moveWeek"
onclick="schedule.prevWeek(); return false"><xsl:value-of
select="php:function('lang', 'Previous week')"/></a></li>
+ <li id="cal_container">
+ <div>
+ <span><xsl:value-of select="php:function('lang', 'Week')"
/>: </span>
+ <label id="numberWeek"></label>
+ <input type="text" id="datepicker" />
+ <img id="pickerImg" src="{resource/picker_img}" />
+ </div>
+ </li>
+ <li><a id="btnPrevWeek" class="moveWeek"
onclick="schedule.nextWeek(); return false"><xsl:value-of
select="php:function('lang', 'Next week')"/></a></li>
+ </ul>
<div id="schedule_container"/>
</div>
+ <div id="dialog_schedule"></div>
<script type="text/javascript">
+ schedule.createDialogSchedule(300);
$(window).load(function(){
schedule.setupWeekPicker('cal_container');
schedule.datasourceUrl = '<xsl:value-of
select="resource/datasource_url" />';
schedule.newApplicationUrl = '<xsl:value-of
select="resource/application_link" />';
schedule.includeResource = false;
- schedule.colFormatter = 'frontendScheduleColorFormatter';
+ schedule.colFormatter = 'frontendScheduleDateColumn';
+ schedule.classTable = 'bookingfrontend-table';
var handleHistoryNavigation = function (state) {
schedule.date = parseISO8601(state);
- schedule.renderSchedule('schedule_container',
schedule.datasourceUrl, schedule.date, schedule.colFormatter,
schedule.includeResource);
+ schedule.renderSchedule('schedule_container',
schedule.datasourceUrl, schedule.date, schedule.colFormatter,
schedule.includeResource, schedule.classTable);
}
var initialRequest = getUrlData("date") || '<xsl:value-of
select="resource/date" />';
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [14262] fixing forms,
Saul <=