header.modal.html.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * The header.modal view of common module of XXB.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd., www.zentao.net)
  6. * @license ZOSL (https://zpl.pub/page/zoslv1.html)
  7. * @author Yidong Wang <yidong@cnezsoft.com>
  8. * @package common
  9. * @version $Id$
  10. * @link https://xuanim.com
  11. */
  12. ?>
  13. <?php if(helper::isAjaxRequest()):?>
  14. <?php
  15. $webRoot = $config->webRoot;
  16. $jsRoot = $webRoot . "js/";
  17. $themeRoot = $webRoot . "theme/";
  18. $modalSizeList = array('lg' => '900px', 'sm' => '300px');
  19. if(!isset($modalWidth)) $modalWidth = 700;
  20. if(is_numeric($modalWidth))
  21. {
  22. $modalWidth .= 'px';
  23. }
  24. else if(isset($modalSizeList[$modalWidth]))
  25. {
  26. $modalWidth = $modalSizeList[$modalWidth];
  27. }
  28. if(isset($pageCSS)) css::internal($pageCSS);
  29. /* set requiredField. */
  30. if(isset($config->$moduleName->require->$methodName))
  31. {
  32. $requiredFields = str_replace(' ', '', $config->$moduleName->require->$methodName);
  33. }
  34. ?>
  35. <div class="modal-dialog" style="width:<?php echo $modalWidth;?>;">
  36. <div class="modal-content">
  37. <div class="modal-header">
  38. <?php echo html::closeButton();?>
  39. <strong class="modal-title"><?php if(!empty($title)) echo $title; ?></strong>
  40. <?php if(!empty($subtitle)) echo "<label class='text-important'>" . $subtitle . '</label>'; ?>
  41. </div>
  42. <div class="modal-body">
  43. <?php else:?>
  44. <?php include $this->app->getModuleRoot() . 'common/view/header.lite.html.php';?>
  45. <?php endif;?>