function display($arrParam = array()) { if ($arrParam["value"] === "0") { $unlimited = "true"; $old_value = "on"; } else { $unlimited = "false"; $old_value = ""; } parent::display($arrParam); print " " . _T("Unlimited quota", "mail") . ' <input type="hidden" name="old_unlimitedquota" value="' . $old_value . '" /> <input type="checkbox" id="unlimitedquota" name="unlimitedquota" onclick="unlimitedquotaclick();"'; if ($unlimited == "true") { print ' checked="checked"'; } print '/> <script type="text/javascript"> jQuery("#mailuserquota, #domainquota").prop("disabled", ' . $unlimited . '); function unlimitedquotaclick() { var disabled = !jQuery("#mailuserquota, #domainquota").prop("disabled"); jQuery("#mailuserquota, #domainquota").prop("disabled", disabled); if (disabled) jQuery("#mailuserquota, #domainquota").val("0"); else jQuery("#mailuserquota, #domainquota").val(""); } </script>'; }
function Display($arrParam) { if ($arrParam["value"] === "0") { $checked = "CHECKED"; $old_value = "on"; $disabled = "1"; } else { $checked = ""; $disabled = "0"; $old_value = ""; } parent::display($arrParam); print " " . _T("Unlimited quota", "mail") . ' <input type="hidden" name="old_unlimitedquota" value="' . $old_value . '" /> <input type="checkbox" id="unlimitedquota" name="unlimitedquota" ' . $checked . ' onclick="unlimitedquotaclick();">'; print '<script type="text/javascript"> $("mailuserquota").disabled = ' . $disabled . '; function unlimitedquotaclick() { $("mailuserquota").disabled = !$("mailuserquota").disabled; } </script>'; }
function display($arrParam) { print '<div id="div' . $this->name . '">'; //print '<table cellspacing="0">'; $i = 0; foreach (array('days' => array(_T('Days: '), 4), 'hours' => array(_T('Hours: '), 2), 'minutes' => array(_T('Minutes: '), 2), 'seconds' => array(_T('Seconds: '), 2)) as $elem => $a_params) { $e = new InputTpl($this->name . '_' . $elem, '/^\\d*$/'); $e->setSize($a_params[1]); print $a_params[0]; print " "; $e->display(array('value' => $arrParam["value"][$elem], 'onchange' => ' var elem = document.getElementById("' . $this->name . '"); var date = elem.value; var part = ' . $i . '; var value = document.getElementById("' . $this->name . '_' . $elem . '").value; var newdate = changePartDate(date, part, value); elem.value = newdate; ')); print " "; $i += 1; } print '<input name="' . $this->name . '" id="' . $this->name . '" type="hidden" value="' . $this->stringValue($arrParam["value"]) . '"/>'; //print '</table>'; print '</div>'; print '<script type="text/javascript"> function changePartDate(date, part, value) { var re = new RegExp("/", "g"); var adate = date.split(re); adate[part] = value; return adate.join("/"); } </script>'; }
function display($arrParam) { print '<div id="div' . $this->name . '">'; print '<table cellspacing="0">'; $i = 0; foreach (array('year' => array(_('Year: '), 4), 'month' => array(_('Month: '), 2), 'day' => array(_('Day: '), 2), 'hour' => array(_('Hour: '), 2), 'min' => array(_('Min.: '), 2), 'sec' => array(_('Sec.: '), 2)) as $elem => $a_params) { $e = new InputTpl($this->name . '_' . $elem); //, array('value'=>$arrParam[$elem])); $e->setSize($a_params[1]); print $a_params[0]; $e->display(array('value' => $arrParam[$elem], 'onchange' => ' var elem = document.getElementById("' . $this->name . '"); var date = elem.value; var part = ' . $i . '; var value = document.getElementById("' . $this->name . '_' . $elem . '").value; var newdate = changePartDate(date, part, value); elem.value = newdate; ')); $i += 1; } print '<input name="' . $this->name . '" id="' . $this->name . '" type="hidden" value="0000/00/00/00/00/00"/>'; print '</table>'; print '</div>'; print '<script type="text/javascript"> function changePartDate(date, part, value) { var re = new RegExp("/", "g"); var adate = date.split(re); adate[part] = value; return adate.join("/"); } </script>'; }
function display($arrParam = array()) { if (in_array($_GET['add_param'], array("Entity"))) { $frequency = 1.0; } else { $frequency = 2.0; } parent::display(array("value" => $this->val)); $extra = ''; if ($this->extracriterion != '') { $extra = '+jQuery(\'#' . $this->extracriterion . '\').val()'; } ?> <script src="jsframework/lib/jquery.jqEasySuggest.min.js" type="text/javascript"> </script> <script type="text/javascript"> jQuery(function() { jQuery('#<?php echo $this->name; ?> ').jqEasySuggest({ ajax_file_path: function(){ return('<?php echo $this->ajaxfile; ?> ' + '&modulename=<?php echo $this->module; ?> ' + '&criterion=<?php echo $this->criterion; ?> ' + '&field=<?php echo $this->name; ?> ' + '&extracriterion='<?php echo $extra; ?> )}, min_keyword_length: <?php echo $this->limit; ?> , showLoadingImage: false, //focus_color : "red", keyupDelay: 100, sql_match_type: "starts", es_width: "215", es_opacity: 0.95, es_max_results: 10, es_offset_left: 0, es_offset_top: 0 }); }); </script> <style type="text/css"> .easy_suggest { background-color: #e5e5e5; border: 1px solid #ccc; border-width: 0px 1px; -moz-box-shadow: 0 2px 4px #ccc; -webkit-box-shadow: 0 2px 4px #ccc; box-shadow: 0 2px 4px #ccc; -webkit-border-bottom-right-radius: 8px; -webkit-border-bottom-left-radius: 8px; -moz-border-radius-bottomright: 8px; -moz-border-radius-bottomleft: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; display: none; overflow: hidden; position: absolute; z-index: 9999; } .easy_list { list-style-type: none; margin: 0px; padding: 0px; width: 100%; } .easy_list li { border: 1px solid #ccc; border-width: 0px 1px 1px 0px; font-size: 12px; list-style: none; text-align: left; width: 100%; } .easy_list li a { color: #000; display: block; padding: 5px; text-decoration: none; } .easy_list li.selected { background-color: #678FD6; color: #fff; } .easy_list li.selected a { color: #fff; } </style> <?php }
function InputTplTitle($name, $title = null, $regexp = '/.+/') { $this->title = $title; parent::InputTpl($name, $regexp); }
function display($arrParam) { $arrParam['disabled'] = ' style="width:40px;" '; parent::display($arrParam); }
function display($arrParam){ parent::display($arrParam); print '<script type="text/javascript">'; if (isset($arrParam["onkeyup"])) { print '$(\''.$this->name.'\').onkeyup = function() {' . $arrParam["onkeyup"] . '};'; } print '</script>'; }
function display($arrParam) { $arrParam['disabled'] = ' style="width:80px;" readonly=1'; parent::display($arrParam); }