fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [17107] more on eventplanner


From: sigurdne
Subject: [Fmsystem-commits] [17107] more on eventplanner
Date: Thu, 21 Sep 2017 11:31:39 -0400 (EDT)

Revision: 17107
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=17107
Author:   sigurdne
Date:     2017-09-21 11:31:38 -0400 (Thu, 21 Sep 2017)
Log Message:
-----------
more on eventplanner

Modified Paths:
--------------
    trunk/eventplannerfrontend/inc/class.uimetasettings.inc.php
    trunk/eventplannerfrontend/inc/model/class.metasettings.inc.php
    trunk/eventplannerfrontend/js/portico/application.edit.js
    trunk/eventplannerfrontend/templates/base/application.xsl
    trunk/eventplannerfrontend/templates/base/config.tpl
    trunk/eventplannerfrontend/templates/base/metasettings.xsl

Modified: trunk/eventplannerfrontend/inc/class.uimetasettings.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/class.uimetasettings.inc.php 2017-09-21 
15:31:19 UTC (rev 17106)
+++ trunk/eventplannerfrontend/inc/class.uimetasettings.inc.php 2017-09-21 
15:31:38 UTC (rev 17107)
@@ -97,6 +97,8 @@
                        $meta['tabs'] = 
phpgwapi_jquery::tabview_generate($tabs, $active_tab);
                        self::rich_text_editor('field_frontpage_text');
                        self::rich_text_editor('application_condition');
+                       self::rich_text_editor('user_agreement_text_1');
+                       self::rich_text_editor('user_agreement_text_2');
 
                        self::render_template_xsl('metasettings', 
array('config_data' => $config->config_data,
                                'meta' => $meta));

Modified: trunk/eventplannerfrontend/inc/model/class.metasettings.inc.php
===================================================================
--- trunk/eventplannerfrontend/inc/model/class.metasettings.inc.php     
2017-09-21 15:31:19 UTC (rev 17106)
+++ trunk/eventplannerfrontend/inc/model/class.metasettings.inc.php     
2017-09-21 15:31:38 UTC (rev 17107)
@@ -82,6 +82,14 @@
                                'application_condition' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
                                        'type' => 'html',
                                        'history'       => false
+                                       ),
+                               'user_agreement_text_1' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                       'type' => 'html',
+                                       'history'       => false
+                                       ),
+                               'user_agreement_text_2' => array('action'=> 
PHPGW_ACL_ADD | PHPGW_ACL_EDIT,
+                                       'type' => 'html',
+                                       'history'       => false
                                        )
                        );
                        return $fields;

Modified: trunk/eventplannerfrontend/js/portico/application.edit.js
===================================================================
--- trunk/eventplannerfrontend/js/portico/application.edit.js   2017-09-21 
15:31:19 UTC (rev 17106)
+++ trunk/eventplannerfrontend/js/portico/application.edit.js   2017-09-21 
15:31:38 UTC (rev 17107)
@@ -147,7 +147,7 @@
                "background - color": '#FFF',
                display: "block"
        });
-
+/*
        var offset = $("#submitbox").offset();
        var topPadding = 180;
 
@@ -189,7 +189,7 @@
                        ;
                });
        }
-
+*/
 });
 
 check_button_names = function ()
@@ -476,7 +476,71 @@
        errorMessage: 'Type is required',
        errorMessageKey: 'application_types'
 });
+$.formUtils.addValidator({
+       name: 'publishing',
+       validatorFunction: function (value, $el, config, language, $form)
+       {
+               var n = 0;
+               $('#user_agreement_publishing input').each(function ()
+               {
+                       if ($(this).prop("checked"))
+                       {
+                               n++;
+                       }
+               });
+               var v = (n > 0) ? true : false;
 
+               if (v === false)
+               {
+                       $('#user_agreement_publishing').css("background-color", 
"#f2dede");
+                       $('#user_agreement_publishing').css("border", "#b94a48 
1px solid");
+               }
+               else
+               {
+                       $('#user_agreement_publishing').css("background-color", 
"white");
+                       $('#user_agreement_publishing').css("border", "black");
+               }
+
+               return v;
+       },
+       errorMessage: 'User agreement publishing is required',
+       errorMessageKey: 'user_agreement_1'
+});
+
+$.formUtils.addValidator({
+       name: 'user_agreement_2',
+       validatorFunction: function (value, $el, config, language, $form)
+       {
+               var n = 0;
+               $('#user_agreement_table input').each(function ()
+               {
+                       if ($(this).prop("checked"))
+                       {
+                               n++;
+                       }
+               });
+               var v = (n > 0) ? true : false;
+
+               if (v === false)
+               {
+                       $('#user_agreement_table').css("background-color", 
"#f2dede");
+                       $('#user_agreement_table').css("border", "#b94a48 1px 
solid");
+               }
+               else
+               {
+                       $('#user_agreement_table').css("background-color", 
"white");
+                       $('#user_agreement_table').css("border", "black");
+               }
+
+               return v;
+       },
+       errorMessage: 'User agreement is required',
+       errorMessageKey: 'user_agreement_2'
+});
+
+
+
+
 this.fileuploader = function (section)
 {
        multi_upload_parans.section = section;

Modified: trunk/eventplannerfrontend/templates/base/application.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/application.xsl   2017-09-21 
15:31:19 UTC (rev 17106)
+++ trunk/eventplannerfrontend/templates/base/application.xsl   2017-09-21 
15:31:38 UTC (rev 17107)
@@ -81,8 +81,82 @@
                                        -->
                                        <input type="hidden" id="active_tab" 
name="active_tab" value="{value_active_tab}"/>
                                        <div id="first_tab">
-                                       <xsl:value-of 
disable-output-escaping="yes" select="application_condition"/>
                                                <fieldset>
+                                                       <xsl:value-of 
disable-output-escaping="yes" select="application_condition"/>
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'publishing')"/>
+                                                               </label>
+                                                               <table 
id="user_agreement_publishing" class="pure-table pure-custom pure-input-1-2" 
border="0" cellspacing="2" cellpadding="2">
+                                                                       <tr>
+                                                                               
<td colspan = "2">
+                                                                               
        <xsl:value-of disable-output-escaping="yes" 
select="user_agreement_text_1"/>
+                                                                               
</td>
+                                                                       </tr>
+                                                                       <tr>
+                                                                               
<th style="text-align:left">
+                                                                               
        <xsl:value-of select="php:function('lang', 'yes')"/>
+                                                                               
</th>
+                                                                               
<th style="text-align:left">
+                                                                               
        <xsl:value-of select="php:function('lang', 'no')"/>
+                                                                               
</th>
+                                                                       </tr>
+                                                                       <tr>
+                                                                               
<td>
+                                                                               
        <input type="radio" name="agreement_1" id="agreement_1_1" value="1">
+                                                                               
                <xsl:if test="application/agreement_1 = 1">
+                                                                               
                        <xsl:attribute name="checked" value="checked"/>
+                                                                               
                </xsl:if>
+                                                                               
        </input>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <input type="radio" name="agreement_1" id="agreement_1_2" value="2">
+                                                                               
                <xsl:if test="application/agreement_1 = 2">
+                                                                               
                        <xsl:attribute name="checked" value="checked"/>
+                                                                               
                </xsl:if>
+                                                                               
        </input>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </table>
+                                                               <input 
type="text" data-validation="publishing" size="1" style="visibility: hidden;">
+                                                                       
<xsl:attribute name="data-validation-error-msg">
+                                                                               
<xsl:value-of select="php:function('lang', 'publishing')"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </div>
+                                                       <div 
class="pure-control-group">
+                                                               <label>
+                                                                       
<xsl:value-of select="php:function('lang', 'user agreement')"/>
+                                                               </label>
+                                                               <table 
id="user_agreement_table" class="pure-table pure-custom pure-input-1-2" 
border="0" cellspacing="2" cellpadding="2">
+                                                                       <tr>
+                                                                               
<td>
+                                                                               
        <xsl:value-of disable-output-escaping="yes" 
select="user_agreement_text_2"/>
+                                                                               
</td>
+                                                                       </tr>
+                                                                       <tr>
+                                                                               
<th style="text-align:left" class="pure-input-1-2">
+                                                                               
        <xsl:value-of select="php:function('lang', 'yes')"/>
+                                                                               
</th>
+                                                                       </tr>
+                                                                       <tr>
+                                                                               
<td style="text-align:left">
+                                                                               
        <input type="checkbox" name="agreement_2" id="agreement_2" value="1">
+                                                                               
                <xsl:if test="application/agreement_2 = 1">
+                                                                               
                        <xsl:attribute name="checked" value="checked"/>
+                                                                               
                </xsl:if>
+                                                                               
        </input>
+                                                                               
</td>
+                                                                       </tr>
+                                                               </table>
+                                                               <input 
type="text" data-validation="user_agreement_2" size="1" style="visibility: 
hidden;">
+                                                                       
<xsl:attribute name="data-validation-error-msg">
+                                                                               
<xsl:value-of select="php:function('lang', 'user agreement')"/>
+                                                                       
</xsl:attribute>
+                                                               </input>
+                                                       </div>
+                                               </fieldset>
+                                               <fieldset>
                                                        <legend>
                                                                <xsl:value-of 
select="php:function('lang', 'application')"/>
                                                        </legend>
@@ -444,7 +518,7 @@
                                                                        
<xsl:value-of select="php:function('lang', 'size of stage')"/>
                                                                </label>
                                                                <div 
class="pure-custom">
-                                                                       <table 
class="pure-table" border="0" cellspacing="2" cellpadding="2">
+                                                                       <table 
class="pure-table pure-input-1-2" border="0" cellspacing="2" cellpadding="2">
                                                                                
<thead>
                                                                                
        <tr>
                                                                                
                <th>
@@ -498,7 +572,7 @@
                                                                <label>
                                                                        
<xsl:value-of select="php:function('lang', 'stage requirement')"/>
                                                                </label>
-                                                               <textarea 
cols="47" rows="7" name="stage_requirement">
+                                                               <textarea 
cols="47" rows="7" name="stage_requirement" class="pure-input-1-2">
                                                                        
<xsl:value-of select="application/stage_requirement"/>
                                                                </textarea>
                                                        </div>
@@ -538,7 +612,7 @@
                                                                <label>
                                                                </label>
                                                                <div 
class="pure-custom">
-                                                                       <table 
class="pure-table pure-table-bordered" border="0" cellspacing="2" 
cellpadding="2">
+                                                                       <table 
class="pure-table pure-table-bordered pure-input-1-2" border="0" 
cellspacing="2" cellpadding="2">
                                                                                
<thead>
                                                                                
        <tr>
                                                                                
                <th></th>
@@ -685,7 +759,7 @@
                                                        <div 
class="pure-control-group">
                                                                <label>
                                                                </label>
-                                                               <textarea 
cols="47" rows="7" name="raider">
+                                                               <textarea 
cols="47" rows="7" name="raider" class="pure-input-1-2">
                                                                        
<xsl:value-of select="application/raider"/>
                                                                </textarea>
                                                        </div>

Modified: trunk/eventplannerfrontend/templates/base/config.tpl
===================================================================
--- trunk/eventplannerfrontend/templates/base/config.tpl        2017-09-21 
15:31:19 UTC (rev 17106)
+++ trunk/eventplannerfrontend/templates/base/config.tpl        2017-09-21 
15:31:38 UTC (rev 17107)
@@ -14,11 +14,11 @@
                </tr>
                <tr>
                        <td>{lang_site_title}</td>
-                       <td><input name="newsettings[site_title]" 
value="{value_site_title}"></td>
+                       <td><input name="newsettings[site_title]" 
value='{value_site_title}'></td>
                </tr>
                <tr>
                        <td>{lang_footer_info}</td>
-                       <td><input name="newsettings[footer_info]" 
value="{value_footer_info}"></td>
+                       <td><input name="newsettings[footer_info]" 
value='{value_footer_info}'></td>
                </tr>
                <tr>
                        <td>{lang_auth_type}:</td>

Modified: trunk/eventplannerfrontend/templates/base/metasettings.xsl
===================================================================
--- trunk/eventplannerfrontend/templates/base/metasettings.xsl  2017-09-21 
15:31:19 UTC (rev 17106)
+++ trunk/eventplannerfrontend/templates/base/metasettings.xsl  2017-09-21 
15:31:38 UTC (rev 17107)
@@ -9,7 +9,7 @@
                                                <label 
for="field_metatag_author">
                                                        <xsl:value-of 
select="php:function('lang', 'Author')"/>
                                                </label>
-                                               <input 
id="field_metatag_author" name="metatag_author" type="text" size="50">
+                                               <input 
id="field_metatag_author" name="metatag_author" type="text" size="50" 
class="pure-input-1-2">
                                                        <xsl:attribute 
name="value">
                                                                <xsl:value-of 
select="config_data/metatag_author"/>
                                                        </xsl:attribute>
@@ -19,7 +19,7 @@
                                                <label 
for="field_metatag_robots">
                                                        <xsl:value-of 
select="php:function('lang', 'Robots')"/>
                                                </label>
-                                               <input 
id="field_metatag_robots" name="metatag_robots" type="text" size="50">
+                                               <input 
id="field_metatag_robots" name="metatag_robots" type="text" size="50" 
class="pure-input-1-2">
                                                        <xsl:attribute 
name="value">
                                                                <xsl:value-of 
select="config_data/metatag_robots"/>
                                                        </xsl:attribute>
@@ -29,7 +29,7 @@
                                                <label 
for="field_metatag_keywords">
                                                        <xsl:value-of 
select="php:function('lang', 'keywords')"/>
                                                </label>
-                                               <input 
id="field_metatag_keywords" name="metatag_keywords" type="text" size="50">
+                                               <input 
id="field_metatag_keywords" name="metatag_keywords" type="text" size="50" 
class="pure-input-1-2">
                                                        <xsl:attribute 
name="value">
                                                                <xsl:value-of 
select="config_data/metatag_keywords"/>
                                                        </xsl:attribute>
@@ -39,11 +39,9 @@
                                                <label 
for="field_metatag_description">
                                                        <xsl:value-of 
select="php:function('lang', 'description')"/>
                                                </label>
-                                               <div class="pure-custom">
-                                                       <textarea 
id="field_metatag_description" class="full-width" name="metatag_description">
-                                                               <xsl:value-of 
select="config_data/metatag_description"/>
-                                                       </textarea>
-                                               </div>
+                                               <textarea 
id="field_metatag_description" name="metatag_description" rows="10" 
class="pure-custom pure-input-1-2">
+                                                       <xsl:value-of 
select="config_data/metatag_description"/>
+                                               </textarea>
                                        </div>
 
                                        <div class="pure-control-group">
@@ -51,7 +49,7 @@
                                                        <xsl:value-of 
select="php:function('lang', 'Frontpage text')"/>
                                                </label>
                                                <div class="pure-custom">
-                                                       <textarea 
id="field_frontpage_text" class="full-width" name="frontpage_text">
+                                                       <textarea 
id="field_frontpage_text"  class="pure-input-1-2" name="frontpage_text">
                                                                <xsl:value-of 
disable-output-escaping="yes" select="config_data/frontpage_text"/>
                                                        </textarea>
                                                </div>
@@ -66,6 +64,31 @@
                                                        </textarea>
                                                </div>
                                        </div>
+                                       <div class="pure-control-group">
+                                               <label 
for="user_agreement_text_1">
+                                                       <xsl:value-of 
select="php:function('lang', 'user agreement 1')"/>
+                                               </label>
+                                               <div class="pure-custom">
+                                                       <textarea 
id="user_agreement_text_1" class="full-width" name="user_agreement_text_1">
+                                                               <xsl:value-of 
disable-output-escaping="yes" select="config_data/user_agreement_text_1"/>
+                                                       </textarea>
+                                               </div>
+                                       </div>
+                                       <div class="pure-control-group">
+                                               <label 
for="user_agreement_text_2">
+                                                       <xsl:value-of 
select="php:function('lang', 'user agreement 2')"/>
+                                               </label>
+                                               <div class="pure-custom">
+                                                       <textarea 
id="user_agreement_text_2" class="full-width" name="user_agreement_text_2">
+                                                               <xsl:value-of 
disable-output-escaping="yes" select="config_data/user_agreement_text_2"/>
+                                                       </textarea>
+                                               </div>
+                                       </div>
+
+
+
+
+
                                </div>
                        </div>
                        <div class="form-buttons">




reply via email to

[Prev in Thread] Current Thread [Next in Thread]