Skip to content

Commit

Permalink
Merge pull request #1403 from jaanusnurmoja/patch-45
Browse files Browse the repository at this point in the history
Show group - display:none for details only and form only
  • Loading branch information
cheesegrits committed Mar 8, 2015
2 parents 51ed3f9 + c88f775 commit 0293c03
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,7 @@ COM_FABRIK_SHORT_NAME="Element short name (element_name)"
COM_FABRIK_SHOW_ALL_OPTIONS="Show all"
COM_FABRIK_SHOW_DATA_RECORDED_IN_TABLE="Show table data"
COM_FABRIK_SHOW_DATA_RECORDED_IN_VIEW="Recorded data"
COM_FABRIK_SHOW_GROUP_DESC="Determine if the group is visible when the form is loaded"
COM_FABRIK_SHOW_GROUP_DESC="Determine if the group is visible when the form or details view is loaded and how it should be shown or hidden. NOTE: 'Not shown' means that the group data is neither visible, nor available in HTML source. 'Hidden' means that the group is not visible, but its data is still available in form and/or details view HTML. <br />EXAMPLE - when you have a group of elements that have some js enabled to show/hide other elements, and you don't want to show it in details then you need option Yes, but 'hidden' (details only). The visitors can see this data only if they look at the page source code. If you want some group to be not shown in details view at all (even not in html) then you may choose 'Form view only' or some ACL setting. But in this case the group elements javascript would not work as js needs the html data to be available."
COM_FABRIK_SHOW_GROUP_LABEL="Show group"
COM_FABRIK_SHOW_GROUP_USABLE_ELEMENTS_ONLY="Hide if no usable elements"
COM_FABRIK_SHOW_GROUP_ALWAYS_READ_ONLY="Always show as read only"
Expand Down Expand Up @@ -1121,7 +1121,9 @@ COM_FABRIK_WHAT_TO_REMOVE_WITH_LIST_LABEL="What should be deleted"
COM_FABRIK_WHERE_THIS=" when this "
COM_FABRIK_WIP="Work in progress"
COM_FABRIK_WYSIWYG_FOR_ELEMENT_LABELS="WYSIWYG editor for element labels"
COM_FABRIK_YES_BUT_HIDDEN="Yes, but hidden"
COM_FABRIK_YES_BUT_HIDDEN="Yes, but 'hidden'"
COM_FABRIK_YES_BUT_HIDDEN_FORM="Yes, but 'hidden' (form only)"
COM_FABRIK_YES_BUT_HIDDEN_DETAILS="Yes, but 'hidden' (details only)"
COM_FABRIK_YESTERDAY="Yesterday"
COM_FABRIK_YOU_MUST_SAVE_THIS_CNN="The details stored for this connection are not the same as your Joomla database connection details, we have pre-filled in the correct details (except for the password) please ensure the password is correctly entered and press save."

Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_fabrik/models/forms/group.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@
<field default="1" description="COM_FABRIK_SHOW_GROUP_DESC" label="COM_FABRIK_SHOW_GROUP_LABEL" name="repeat_group_show_first" type="list">
<option value="1">JYES</option>
<option value="-1">COM_FABRIK_YES_BUT_HIDDEN</option>
<option value="-2">COM_FABRIK_YES_BUT_HIDDEN_FORM</option>
<option value="-3">COM_FABRIK_YES_BUT_HIDDEN_DETAILS</option>
<option value="2">COM_FABRIK_DETAILS_VIEW_ONLY</option>
<option value="3">COM_FABRIK_FORM_VIEW_ONLY</option>
<option value="4">COM_FABRIK_SHOW_GROUP_USABLE_ELEMENTS_ONLY</option>
Expand Down
2 changes: 1 addition & 1 deletion components/com_fabrik/models/group.php
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ public function getGroupProperties(&$formModel)
*/

if (array_key_exists($startpage, $pages) && is_array($pages[$startpage])
&& !in_array($groupTable->id, $pages[$startpage]) || $showGroup == -1 || $showGroup == 0)
&& !in_array($groupTable->id, $pages[$startpage]) || $showGroup == -1 || $showGroup == 0 || ($view == 'form' && $showGroup == -2) || ($view == 'details' && $showGroup == -3))
{
$groupTable->css .= ";display:none;";
}
Expand Down

0 comments on commit 0293c03

Please sign in to comment.