Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added plugin tags to menu item parameters.

Modified the plugin tags parameter to support "useglobal"
  • Loading branch information...
commit 4d58056e5d1cd30affd04ccf25efc381f504ea85 1 parent 91472db
@Bakual authored
View
14 SermonSpeaker4.0/com_sermonspeaker/admin/models/fields/tag.php
@@ -40,15 +40,25 @@ class JFormFieldTag extends JFormField
*/
protected function getInput()
{
+ $html = '';
+ $disabled = '';
+ // Add a Use Global option if useglobal="true" in XML file
+ if ($this->element['useglobal'] == 'true'){
+ $active0 = (!$this->value) ? ' checked="checked"' : '';
+ $active1 = ($this->value) ? ' checked="checked"' : '';
+ $disabled = (!$this->value) ? ' disabled="disabled"' : '';
+ $html .= '<input type="radio" name="'.$this->fieldname.'_radio" id="'.$this->id.'_radio0" value="0" onclick="this.form.elements[\''.$this->id.'_start\'].disabled = true; this.form.elements[\''.$this->id.'_end\'].disabled = true;"'.$active0.' /><input type="text" class="readonly" disabled="disabled" value="'.JText::_('JGLOBAL_USE_GLOBAL').'" />';
+ $html .= '<span class="faux-label"></span><input type="radio" name="'.$this->fieldname.'_radio" id="'.$this->id.'_radio1" value="1" onclick="this.form.elements[\''.$this->id.'_start\'].disabled = false; this.form.elements[\''.$this->id.'_end\'].disabled = false;"'.$active1.' />';
+ }
if (!isset($this->value[0])){
$this->value[0] = '';
}
if (!isset($this->value[1])){
$this->value[1] = '';
}
- $html = '<input type="text" size="10" name="'.$this->name.'" id="'.$this->id.'_start" value="'.htmlspecialchars($this->value[0], ENT_COMPAT, 'UTF-8').'" class="inputbox" />'
+ $html .= '<input type="text" size="10" name="'.$this->name.'" id="'.$this->id.'_start" value="'.htmlspecialchars($this->value[0], ENT_COMPAT, 'UTF-8').'" class="inputbox"'.$disabled.' />'
. '<span class="faux-label" style="clear:none; min-width:0px; margin-left:2px; margin-right:2px;">John 3,16</span>'
- . '<input type="text" size="5" name="'.$this->name.'" id="'.$this->id.'_end" value="'.htmlspecialchars($this->value[1], ENT_COMPAT, 'UTF-8').'" class="inputbox" />'
+ . '<input type="text" size="5" name="'.$this->name.'" id="'.$this->id.'_end" value="'.htmlspecialchars($this->value[1], ENT_COMPAT, 'UTF-8').'" class="inputbox"'.$disabled.' />'
;
return $html;
View
8 SermonSpeaker4.0/com_sermonspeaker/site/views/categories/metadata.xml
@@ -92,6 +92,14 @@
<option value="speakers">COM_SERMONSPEAKER_SPEAKERS</option>
</field>
</fieldset>
+ <fieldset name="advanced"
+ addfieldpath="/administrator/components/com_sermonspeaker/models/fields" >
+ <field name="plugin_tag"
+ type="tag"
+ label="COM_SERMONSPEAKER_PARAM_PLUGIN_LABEL"
+ description="COM_SERMONSPEAKER_PARAM_PLUGIN_DESC"
+ useglobal="true" />
+ </fieldset>
<fieldset name="layout"
label="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_LABEL"
description="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_DESC" >
View
8 SermonSpeaker4.0/com_sermonspeaker/site/views/serie/metadata.xml
@@ -38,6 +38,14 @@
<option value="speakers">COM_SERMONSPEAKER_SPEAKERS</option>
</field>
</fieldset>
+ <fieldset name="advanced"
+ addfieldpath="/administrator/components/com_sermonspeaker/models/fields" >
+ <field name="plugin_tag"
+ type="tag"
+ label="COM_SERMONSPEAKER_PARAM_PLUGIN_LABEL"
+ description="COM_SERMONSPEAKER_PARAM_PLUGIN_DESC"
+ useglobal="true" />
+ </fieldset>
<fieldset name="layout"
label="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_LABEL"
description="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_DESC" >
View
8 SermonSpeaker4.0/com_sermonspeaker/site/views/series/metadata.xml
@@ -18,6 +18,14 @@
show_root="true"
/>
</fieldset>
+ <fieldset name="advanced"
+ addfieldpath="/administrator/components/com_sermonspeaker/models/fields" >
+ <field name="plugin_tag"
+ type="tag"
+ label="COM_SERMONSPEAKER_PARAM_PLUGIN_LABEL"
+ description="COM_SERMONSPEAKER_PARAM_PLUGIN_DESC"
+ useglobal="true" />
+ </fieldset>
<fieldset name="layout"
label="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_LABEL"
description="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_DESC" >
View
8 SermonSpeaker4.0/com_sermonspeaker/site/views/seriessermon/metadata.xml
@@ -18,6 +18,14 @@
show_root="true"
/>
</fieldset>
+ <fieldset name="advanced"
+ addfieldpath="/administrator/components/com_sermonspeaker/models/fields" >
+ <field name="plugin_tag"
+ type="tag"
+ label="COM_SERMONSPEAKER_PARAM_PLUGIN_LABEL"
+ description="COM_SERMONSPEAKER_PARAM_PLUGIN_DESC"
+ useglobal="true" />
+ </fieldset>
<fieldset name="layout"
label="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_LABEL"
description="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_DESC" >
View
8 SermonSpeaker4.0/com_sermonspeaker/site/views/sermon/metadata.xml
@@ -22,6 +22,14 @@
</fieldset>
</fields>
<fields name="params">
+ <fieldset name="advanced"
+ addfieldpath="/administrator/components/com_sermonspeaker/models/fields" >
+ <field name="plugin_tag"
+ type="tag"
+ label="COM_SERMONSPEAKER_PARAM_PLUGIN_LABEL"
+ description="COM_SERMONSPEAKER_PARAM_PLUGIN_DESC"
+ useglobal="true" />
+ </fieldset>
<fieldset name="layout"
label="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_LABEL"
description="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_DESC" >
View
8 SermonSpeaker4.0/com_sermonspeaker/site/views/sermons/metadata.xml
@@ -33,6 +33,14 @@
size="2"
/>
</fieldset>
+ <fieldset name="advanced"
+ addfieldpath="/administrator/components/com_sermonspeaker/models/fields" >
+ <field name="plugin_tag"
+ type="tag"
+ label="COM_SERMONSPEAKER_PARAM_PLUGIN_LABEL"
+ description="COM_SERMONSPEAKER_PARAM_PLUGIN_DESC"
+ useglobal="true" />
+ </fieldset>
<fieldset name="layout"
label="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_LABEL"
description="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_DESC" >
View
8 SermonSpeaker4.0/com_sermonspeaker/site/views/speaker/metadata.xml
@@ -38,6 +38,14 @@
<option value="series">COM_SERMONSPEAKER_SERIES</option>
</field>
</fieldset>
+ <fieldset name="advanced"
+ addfieldpath="/administrator/components/com_sermonspeaker/models/fields" >
+ <field name="plugin_tag"
+ type="tag"
+ label="COM_SERMONSPEAKER_PARAM_PLUGIN_LABEL"
+ description="COM_SERMONSPEAKER_PARAM_PLUGIN_DESC"
+ useglobal="true" />
+ </fieldset>
<fieldset name="layout"
label="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_LABEL"
description="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_DESC" >
View
8 SermonSpeaker4.0/com_sermonspeaker/site/views/speakers/metadata.xml
@@ -18,6 +18,14 @@
show_root="true"
/>
</fieldset>
+ <fieldset name="advanced"
+ addfieldpath="/administrator/components/com_sermonspeaker/models/fields" >
+ <field name="plugin_tag"
+ type="tag"
+ label="COM_SERMONSPEAKER_PARAM_PLUGIN_LABEL"
+ description="COM_SERMONSPEAKER_PARAM_PLUGIN_DESC"
+ useglobal="true" />
+ </fieldset>
<fieldset name="layout"
label="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_LABEL"
description="COM_SERMONSPEAKER_FIELDSET_LAYOUTS_DESC" >
Please sign in to comment.
Something went wrong with that request. Please try again.