File tree Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Expand file tree Collapse file tree 3 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -457,6 +457,9 @@ input[type = radio]:checked + label.label-radio .check {
457
457
font-style : italic;
458
458
margin : 0 4px ;
459
459
}
460
+
461
+ /* CONDITIONS */
462
+
460
463
.div_show_condition_field , .div_show_condition_operator ,
461
464
.div_show_condition_value , .div_show_condition_logic ,
462
465
.div_show_condition_add , .div_show_condition_remove {
@@ -491,12 +494,12 @@ input[type = radio]:checked + label.label-radio .check {
491
494
width : 12px ;
492
495
vertical-align : middle;
493
496
}
494
- /* jQuery UI Combobox*/
495
- .pq-select-multiple {
496
- display : inline-block;
497
- width : 85% !important ;
497
+ tr [data-itemtype = "PluginFormcreatorCondition" ] .div_show_condition_logic {
498
+ visibility : hidden;
499
+ }
500
+ tr [data-itemtype = "PluginFormcreatorCondition" ] ~ tr [data-itemtype = "PluginFormcreatorCondition" ] .div_show_condition_logic {
501
+ visibility : visible;
498
502
}
499
-
500
503
.select2-container + select {
501
504
display : none !important ;
502
505
}
Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ public function export($remove_uuid = false) {
199
199
* get conditions applied to an item
200
200
*
201
201
* @param PluginFormcreatorConditionnableInterface $item
202
- * @return array array of PluginFotrmcreatorCondition
202
+ * @return PluginFotrmcreatorCondition[]
203
203
*/
204
204
public function getConditionsFromItem (PluginFormcreatorConditionnableInterface $ item ) {
205
205
global $ DB ;
@@ -250,6 +250,10 @@ public function showConditionsForItem(CommonDBTM $item) {
250
250
echo '</td> ' ;
251
251
echo '</tr> ' ;
252
252
253
+ if ($ item ->fields ['show_rule ' ] == PluginFormcreatorCondition::SHOW_RULE_ALWAYS ) {
254
+ return ;
255
+ }
256
+
253
257
// Get existing conditions for the item
254
258
$ conditions = $ this ->getConditionsFromItem ($ item );
255
259
foreach ($ conditions as $ condition ) {
Original file line number Diff line number Diff line change @@ -815,7 +815,7 @@ function plugin_formcreator_toggleCondition(target) {
815
815
function plugin_formcreator_addEmptyCondition(target) {
816
816
var form = $(target).closest('form');
817
817
var itemtype = form.attr('data-itemtype');
818
- // value if the hidden id input field
818
+ // value of the hidden id input field
819
819
var id = form.find('[name="id"]').val();
820
820
var parentKey;
821
821
var parentId;
@@ -834,13 +834,11 @@ function plugin_formcreator_addEmptyCondition(target) {
834
834
data: data
835
835
}).done(function (data) {
836
836
$(target).parents('tr').after(data);
837
- $('.plugin_formcreator_logicRow .div_show_condition_logic').first().hide();
838
837
});
839
838
}
840
839
841
840
function plugin_formcreator_removeNextCondition(target) {
842
841
$(target).parents('tr').remove();
843
- $('.plugin_formcreator_logicRow .div_show_condition_logic').first().hide();
844
842
}
845
843
846
844
function plugin_formcreator_changeDropdownItemtype(rand) {
You can’t perform that action at this time.
0 commit comments