当前位置: 首页>>代码示例>>PHP>>正文


PHP Theme::RenderReturn方法代码示例

本文整理汇总了PHP中Theme::RenderReturn方法的典型用法代码示例。如果您正苦于以下问题:PHP Theme::RenderReturn方法的具体用法?PHP Theme::RenderReturn怎么用?PHP Theme::RenderReturn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Theme的用法示例。


在下文中一共展示了Theme::RenderReturn方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: DisplayList

 /**
  * Shows a list of displays
  */
 public function DisplayList()
 {
     $user =& $this->user;
     $response = new ResponseManager();
     $displayGroupIDs = Kit::GetParam('DisplayGroupIDs', _SESSION, _ARRAY);
     $filter_name = Kit::GetParam('filter_name', _POST, _STRING);
     // Build 2 lists
     $groups = array();
     $displays = array();
     foreach ($user->DisplayGroupList(0, $filter_name) as $display) {
         $display['checked_text'] = in_array($display['displaygroupid'], $displayGroupIDs) ? 'checked' : '';
         if ($display['isdisplayspecific'] == 1) {
             $displays[] = $display;
         } else {
             $groups[] = $display;
         }
     }
     Theme::Set('id', 'DisplayList');
     Theme::Set('group_list_items', $groups);
     Theme::Set('display_list_items', $displays);
     $output = Theme::RenderReturn('schedule_page_display_list');
     $response->SetGridResponse($output);
     $response->callBack = 'DisplayListRender';
     $response->Respond();
 }
开发者ID:abbeet,项目名称:server39,代码行数:28,代码来源:schedule.class.php

示例2: EditForm

 /**
  * Return the Edit Form as HTML
  * @return
  */
 public function EditForm()
 {
     $db =& $this->db;
     $layoutid = $this->layoutid;
     $regionid = $this->regionid;
     $mediaid = $this->mediaid;
     // Permissions
     if (!$this->auth->edit) {
         $this->response->SetError('You do not have permission to edit this assignment.');
         $this->response->keepOpen = true;
         return $this->response;
     }
     Theme::Set('form_id', 'ModuleForm');
     Theme::Set('form_action', 'index.php?p=module&mod=' . $this->type . '&q=Exec&method=EditMedia');
     Theme::Set('form_meta', '<input type="hidden" name="layoutid" value="' . $layoutid . '"><input type="hidden" id="iRegionId" name="regionid" value="' . $regionid . '"><input type="hidden" name="showRegionOptions" value="' . $this->showRegionOptions . '" /><input type="hidden" id="mediaid" name="mediaid" value="' . $mediaid . '">');
     Theme::Set('windowsCommand', htmlentities(urldecode($this->GetOption('windowsCommand'))));
     Theme::Set('linuxCommand', htmlentities(urldecode($this->GetOption('linuxCommand'))));
     $this->response->html = Theme::RenderReturn('media_form_shellcommand_edit');
     if ($this->showRegionOptions) {
         $this->response->AddButton(__('Cancel'), 'XiboSwapDialog("index.php?p=timeline&layoutid=' . $layoutid . '&regionid=' . $regionid . '&q=RegionOptions")');
     } else {
         $this->response->AddButton(__('Cancel'), 'XiboDialogClose()');
     }
     $this->response->AddButton(__('Save'), '$("#ModuleForm").submit()');
     $this->response->dialogTitle = __('Edit Shell Command');
     $this->response->dialogSize = true;
     $this->response->dialogWidth = '450px';
     $this->response->dialogHeight = '250px';
     return $this->response;
 }
开发者ID:abbeet,项目名称:server39,代码行数:34,代码来源:shellcommand.module.php

示例3: displayPage

 function displayPage()
 {
     Theme::Set('version', VERSION);
     Theme::Set('text', Theme::RenderReturn('about_text'));
     // Render the Theme and output
     Theme::Render('about_page');
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:7,代码来源:license.class.php

示例4: Grid

 public function Grid()
 {
     $db =& $this->db;
     $user =& $this->user;
     $response = new ResponseManager();
     $SQL = '';
     $SQL .= 'SELECT TransitionID, ';
     $SQL .= '   Transition, ';
     $SQL .= '   Code, ';
     $SQL .= '   HasDuration, ';
     $SQL .= '   HasDirection, ';
     $SQL .= '   AvailableAsIn, ';
     $SQL .= '   AvailableAsOut ';
     $SQL .= '  FROM `transition` ';
     $SQL .= ' ORDER BY Transition ';
     if (!($transitions = $db->GetArray($SQL))) {
         trigger_error($db->error());
         trigger_error(__('Unable to get the list of transitions'), E_USER_ERROR);
     }
     $cols = array(array('name' => 'name', 'title' => __('Name')), array('name' => 'hasduration', 'title' => __('Has Duration'), 'icons' => true), array('name' => 'hasdirection', 'title' => __('Has Direction'), 'icons' => true), array('name' => 'enabledforin', 'title' => __('Enabled for In'), 'icons' => true), array('name' => 'enabledforout', 'title' => __('Enabled for Out'), 'icons' => true));
     Theme::Set('table_cols', $cols);
     $rows = array();
     foreach ($transitions as $transition) {
         $row = array();
         $row['transitionid'] = Kit::ValidateParam($transition['TransitionID'], _INT);
         $row['name'] = Kit::ValidateParam($transition['Transition'], _STRING);
         $row['hasduration'] = Kit::ValidateParam($transition['HasDuration'], _INT);
         $row['hasdirection'] = Kit::ValidateParam($transition['HasDirection'], _INT);
         $row['enabledforin'] = Kit::ValidateParam($transition['AvailableAsIn'], _INT);
         $row['enabledforout'] = Kit::ValidateParam($transition['AvailableAsOut'], _INT);
         // Initialise array of buttons, because we might not have any
         $row['buttons'] = array();
         // If the module config is not locked, present some buttons
         if (Config::GetSetting('TRANSITION_CONFIG_LOCKED_CHECKB') != 'Checked') {
             // Edit button
             $row['buttons'][] = array('id' => 'transition_button_edit', 'url' => 'index.php?p=transition&q=EditForm&TransitionID=' . $row['transitionid'], 'text' => __('Edit'));
         }
         $rows[] = $row;
     }
     Theme::Set('table_rows', $rows);
     $output = Theme::RenderReturn('table_render');
     $response->SetGridResponse($output);
     $response->Respond();
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:44,代码来源:transition.class.php

示例5: Grid

 function Grid()
 {
     $cols = array(array('name' => 'name', 'title' => __('Name')), array('name' => 'type', 'title' => __('Type')), array('name' => 'isdefault', 'title' => __('Default'), 'icons' => true));
     Theme::Set('table_cols', $cols);
     $rows = array();
     foreach ($this->user->DisplayProfileList() as $profile) {
         // Default Layout
         $profile['buttons'][] = array('id' => 'displayprofile_button_edit', 'url' => 'index.php?p=displayprofile&q=EditForm&displayprofileid=' . $profile['displayprofileid'], 'text' => __('Edit'));
         if ($profile['del'] == 1) {
             $profile['buttons'][] = array('id' => 'displayprofile_button_delete', 'url' => 'index.php?p=displayprofile&q=DeleteForm&displayprofileid=' . $profile['displayprofileid'], 'text' => __('Delete'));
         }
         $rows[] = $profile;
     }
     Theme::Set('table_rows', $rows);
     $output = Theme::RenderReturn('table_render');
     $response = new ResponseManager();
     $response->SetGridResponse($output);
     $response->Respond();
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:19,代码来源:displayprofile.class.php

示例6: Grid

    public function Grid()
    {
        $db =& $this->db;
        $user =& $this->user;
        $response = new ResponseManager();
        //display the display table
        $SQL = <<<SQL
        SELECT HelpID, Topic, Category, Link
          FROM `help`
        ORDER BY Topic, Category
SQL;
        // Load results into an array
        $helplinks = $db->GetArray($SQL);
        if (!is_array($helplinks)) {
            trigger_error($db->error());
            trigger_error(__('Error getting list of helplinks'), E_USER_ERROR);
        }
        $cols = array(array('name' => 'topic', 'title' => __('Topic')), array('name' => 'category', 'title' => __('Category')), array('name' => 'link', 'title' => __('Link')));
        Theme::Set('table_cols', $cols);
        $rows = array();
        foreach ($helplinks as $row) {
            $row['helpid'] = Kit::ValidateParam($row['HelpID'], _INT);
            $row['topic'] = Kit::ValidateParam($row['Topic'], _STRING);
            $row['category'] = Kit::ValidateParam($row['Category'], _STRING);
            $row['link'] = Kit::ValidateParam($row['Link'], _STRING);
            $row['buttons'] = array();
            // we only want to show certain buttons, depending on the user logged in
            if ($user->usertypeid == 1) {
                // Edit
                $row['buttons'][] = array('id' => 'help_button_edit', 'url' => 'index.php?p=help&q=EditForm&HelpID=' . $row['helpid'], 'text' => __('Edit'));
                // Delete
                $row['buttons'][] = array('id' => 'help_button_delete', 'url' => 'index.php?p=help&q=DeleteForm&HelpID=' . $row['helpid'], 'text' => __('Delete'));
                // Test
                $row['buttons'][] = array('id' => 'help_button_test', 'url' => HelpManager::Link($row['topic'], $row['category']), 'text' => __('Test'));
            }
            $rows[] = $row;
        }
        Theme::Set('table_rows', $rows);
        $output = Theme::RenderReturn('table_render');
        $response->SetGridResponse($output);
        $response->Respond();
    }
开发者ID:fignew,项目名称:xibo-cms,代码行数:42,代码来源:help.class.php

示例7: ImportForm

 public function ImportForm()
 {
     global $session;
     $db =& $this->db;
     $response = new ResponseManager();
     // Set the Session / Security information
     $sessionId = session_id();
     $securityToken = CreateFormToken();
     $session->setSecurityToken($securityToken);
     // Find the max file size
     $maxFileSizeBytes = convertBytes(ini_get('upload_max_filesize'));
     // Set some information about the form
     Theme::Set('form_id', 'LayoutImportForm');
     Theme::Set('form_action', 'index.php?p=layout&q=Import');
     Theme::Set('form_meta', '<input type="hidden" id="txtFileName" name="txtFileName" readonly="true" /><input type="hidden" name="hidFileID" id="hidFileID" value="" /><input type="hidden" name="template" value="' . Kit::GetParam('template', _GET, _STRING, 'false') . '" />');
     Theme::Set('form_upload_id', 'file_upload');
     Theme::Set('form_upload_action', 'index.php?p=content&q=FileUpload');
     Theme::Set('form_upload_meta', '<input type="hidden" id="PHPSESSID" value="' . $sessionId . '" /><input type="hidden" id="SecurityToken" value="' . $securityToken . '" /><input type="hidden" name="MAX_FILE_SIZE" value="' . $maxFileSizeBytes . '" />');
     Theme::Set('prepend', Theme::RenderReturn('form_file_upload_single'));
     $formFields = array();
     $formFields[] = FormManager::AddText('layout', __('Name'), NULL, __('The Name of the Layout - (1 - 50 characters). Leave blank to use the name from the import.'), 'n');
     $formFields[] = FormManager::AddCheckbox('replaceExisting', __('Replace Existing Media?'), NULL, __('If the import finds existing media with the same name, should it be replaced in the Layout or should the Layout use that media.'), 'r');
     if (Kit::GetParam('template', _GET, _STRING, 'false') != 'true') {
         $formFields[] = FormManager::AddCheckbox('importTags', __('Import Tags?'), NULL, __('Would you like to import any tags contained on the layout.'), 't');
     }
     Theme::Set('form_fields', $formFields);
     $response->SetFormRequestResponse(NULL, __('Import Layout'), '350px', '200px');
     $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('DataSet', 'ImportCsv') . '")');
     $response->AddButton(__('Cancel'), 'XiboDialogClose()');
     $response->AddButton(__('Import'), '$("#LayoutImportForm").submit()');
     $response->Respond();
 }
开发者ID:rovak73,项目名称:xibo-cms,代码行数:32,代码来源:layout.class.php

示例8: PermissionsForm

 /**
  * Permissions form
  */
 public function PermissionsForm()
 {
     $db =& $this->db;
     $user =& $this->user;
     $response = new ResponseManager();
     $helpManager = new HelpManager($db, $user);
     $templateId = Kit::GetParam('templateid', _GET, _INT);
     if ($templateId == 0) {
         trigger_error(__('No template selected'), E_USER_ERROR);
     }
     // Is this user allowed to delete this template?
     $auth = $this->user->TemplateAuth($templateId, true);
     // Set some information about the form
     Theme::Set('form_id', 'TemplatePermissionsForm');
     Theme::Set('form_action', 'index.php?p=template&q=Permissions');
     Theme::Set('form_meta', '<input type="hidden" name="templateid" value="' . $templateId . '" />');
     // List of all Groups with a view/edit/delete checkbox
     $SQL = '';
     $SQL .= 'SELECT `group`.GroupID, `group`.`Group`, View, Edit, Del, `group`.IsUserSpecific ';
     $SQL .= '  FROM `group` ';
     $SQL .= '   LEFT OUTER JOIN lktemplategroup ';
     $SQL .= '   ON lktemplategroup.GroupID = group.GroupID ';
     $SQL .= '       AND lktemplategroup.TemplateID = %d ';
     $SQL .= ' WHERE `group`.GroupID <> %d ';
     $SQL .= 'ORDER BY `group`.IsEveryone DESC, `group`.IsUserSpecific, `group`.`Group` ';
     $SQL = sprintf($SQL, $templateId, $user->getGroupFromId($user->userid, true));
     if (!($results = $db->query($SQL))) {
         trigger_error($db->error());
         trigger_error(__('Unable to get permissions for this template'), E_USER_ERROR);
     }
     $checkboxes = array();
     while ($row = $db->get_assoc_row($results)) {
         $groupId = $row['GroupID'];
         $rowClass = $row['IsUserSpecific'] == 0 ? 'strong_text' : '';
         $checkbox = array('id' => $groupId, 'name' => Kit::ValidateParam($row['Group'], _STRING), 'class' => $rowClass, 'value_view' => $groupId . '_view', 'value_view_checked' => $row['View'] == 1 ? 'checked' : '', 'value_edit' => $groupId . '_edit', 'value_edit_checked' => $row['Edit'] == 1 ? 'checked' : '', 'value_del' => $groupId . '_del', 'value_del_checked' => $row['Del'] == 1 ? 'checked' : '');
         $checkboxes[] = $checkbox;
     }
     Theme::Set('form_rows', $checkboxes);
     $form = Theme::RenderReturn('campaign_form_permissions');
     $response->SetFormRequestResponse($form, __('Permissions'), '350px', '500px');
     $response->AddButton(__('Help'), 'XiboHelpRender("' . $helpManager->Link('Template', 'Permissions') . '")');
     $response->AddButton(__('Cancel'), 'XiboDialogClose()');
     $response->AddButton(__('Save'), '$("#TemplatePermissionsForm").submit()');
     $response->Respond();
 }
开发者ID:abbeet,项目名称:server39,代码行数:48,代码来源:template.class.php

示例9: Step6

 public function Step6()
 {
     // Form to collect the library location and server key
     $formFields = array();
     $formFields[] = FormManager::AddHidden('step', 7);
     $formFields[] = FormManager::AddText('library_location', __('Library Location'), NULL, sprintf(__('%s needs somewhere to store the things you upload to be shown. Ideally, this should be somewhere outside the root of your web server - that is such that is not accessible by a web browser. Please input the full path to this folder. If the folder does not already exist, we will attempt to create it for you.'), Theme::GetConfig('app_name')), 'n');
     $formFields[] = FormManager::AddText('server_key', __('Server Key'), Install::gen_secret(6), sprintf(__('%s needs you to choose a "key". This will be required each time you set-up a new client. It should be complicated, and hard to remember. It is visible in the CMS interface, so it need not be written down separately.'), Theme::GetConfig('app_name')), 'n');
     $formFields[] = FormManager::AddCheckbox('stats', __('Statistics'), 1, sprintf(__('We\'d love to know you\'re running %s. If you\'re happy for us to collect anonymous statistics (version number, number of displays) then please leave the box ticked. Please un tick the box if your server does not have direct access to the internet.'), Theme::GetConfig('app_name')), 'n');
     // Put up an error message if one has been set (and then unset it)
     if ($this->errorMessage != '') {
         Theme::Set('message', $this->errorMessage);
         Theme::Set('prepend', Theme::RenderReturn('message_box'));
         $this->errorMessage == '';
     }
     // Return a rendered form
     Theme::Set('form_action', 'install.php');
     Theme::Set('form_fields', $formFields);
     Theme::Set('form_buttons', array(FormManager::AddButton(__('Next'))));
     return Theme::RenderReturn('form_render');
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:20,代码来源:install.class.php

示例10: UserTokens

 /**
  * Shows the Authorised applications this user has
  */
 public function UserTokens()
 {
     $db =& $this->db;
     $user =& $this->user;
     $response = new ResponseManager();
     $store = OAuthStore::instance();
     try {
         $list = $store->listConsumerTokens(Kit::GetParam('userID', _GET, _INT));
     } catch (OAuthException $e) {
         trigger_error($e->getMessage());
         trigger_error(__('Error listing Log.'), E_USER_ERROR);
     }
     $rows = array();
     foreach ($list as $app) {
         $app['application_title'] = Kit::ValidateParam($app['application_title'], _STRING);
         $app['enabled'] = Kit::ValidateParam($app['enabled'], _STRING);
         $app['status'] = Kit::ValidateParam($app['status'], _STRING);
         $rows[] = $app;
     }
     Theme::Set('table_rows', $rows);
     $output = Theme::RenderReturn('application_form_user_applications');
     $response->SetFormRequestResponse($output, __('Authorized applications for user'), '650', '450');
     $response->AddButton(__('Help'), "XiboHelpRender('" . HelpManager::Link('User', 'Applications') . "')");
     $response->AddButton(__('Close'), 'XiboDialogClose()');
     $response->Respond();
 }
开发者ID:abbeet,项目名称:server39,代码行数:29,代码来源:oauth.class.php

示例11: MemberOfForm

 /**
  * Member of Display Groups Form
  */
 public function MemberOfForm()
 {
     $db =& $this->db;
     $response = new ResponseManager();
     $displayID = Kit::GetParam('DisplayID', _REQUEST, _INT);
     // Auth
     $auth = $this->user->DisplayGroupAuth($this->GetDisplayGroupId($displayID), true);
     if (!$auth->modifyPermissions) {
         trigger_error(__('You do not have permission to change Display Groups on this display'), E_USER_ERROR);
     }
     // There needs to be two lists here.
     //  - DisplayGroups this Display is already assigned to
     //  - DisplayGroups this Display could be assigned to
     // Set some information about the form
     Theme::Set('displaygroups_assigned_id', 'displaysIn');
     Theme::Set('displaygroups_available_id', 'displaysOut');
     Theme::Set('displaygroups_assigned_url', 'index.php?p=display&q=SetMemberOf&DisplayID=' . $displayID);
     // Display Groups Assigned
     $SQL = "";
     $SQL .= "SELECT displaygroup.DisplayGroupID, ";
     $SQL .= "       displaygroup.DisplayGroup, ";
     $SQL .= "       CONCAT('DisplayGroupID_', displaygroup.DisplayGroupID) AS list_id ";
     $SQL .= "FROM   displaygroup ";
     $SQL .= "   INNER JOIN lkdisplaydg ON lkdisplaydg.DisplayGroupID = displaygroup.DisplayGroupID ";
     $SQL .= sprintf("WHERE  lkdisplaydg.DisplayID   = %d ", $displayID);
     $SQL .= " AND displaygroup.IsDisplaySpecific = 0 ";
     $SQL .= " ORDER BY displaygroup.DisplayGroup ";
     $displaygroupsAssigned = $db->GetArray($SQL);
     if (!is_array($displaygroupsAssigned)) {
         trigger_error($db->error());
         trigger_error(__('Error getting Display Groups'), E_USER_ERROR);
     }
     Theme::Set('displaygroups_assigned', $displaygroupsAssigned);
     // Display Groups not assigned
     $SQL = "";
     $SQL .= "SELECT displaygroup.DisplayGroupID, ";
     $SQL .= "       displaygroup.DisplayGroup, ";
     $SQL .= "       CONCAT('DisplayGroupID_', displaygroup.DisplayGroupID) AS list_id ";
     $SQL .= "  FROM displaygroup ";
     $SQL .= " WHERE displaygroup.IsDisplaySpecific = 0 ";
     $SQL .= " AND displaygroup.DisplayGroupID NOT IN ";
     $SQL .= "       (SELECT lkdisplaydg.DisplayGroupID ";
     $SQL .= "          FROM lkdisplaydg ";
     $SQL .= sprintf(" WHERE  lkdisplaydg.DisplayID   = %d ", $displayID);
     $SQL .= "       )";
     $SQL .= " ORDER BY displaygroup.DisplayGroup ";
     Debug::LogEntry('audit', $SQL);
     $displaygroups_available = $db->GetArray($SQL);
     if (!is_array($displaygroups_available)) {
         trigger_error($db->error());
         trigger_error(__('Error getting Display Groups'), E_USER_ERROR);
     }
     Theme::Set('displaygroups_available', $displaygroups_available);
     // Render the theme
     $form = Theme::RenderReturn('display_form_group_assign');
     $response->SetFormRequestResponse($form, __('Manage Membership'), '400', '375', 'DisplayGroupManageMembersCallBack');
     $response->AddButton(__('Help'), 'XiboHelpRender("' . HelpManager::Link('DisplayGroup', 'Members') . '")');
     $response->AddButton(__('Cancel'), 'XiboDialogClose()');
     $response->AddButton(__('Save'), 'DisplayGroupMembersSubmit()');
     $response->Respond();
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:64,代码来源:display.class.php

示例12: EditForm

 /**
  * Return the Edit Form as HTML
  * @return
  */
 public function EditForm()
 {
     $this->response = new ResponseManager();
     // Edit calls are the same as add calls, except you will to check the user has permissions to do the edit
     if (!$this->auth->edit) {
         $this->response->SetError('You do not have permission to edit this assignment.');
         $this->response->keepOpen = false;
         return $this->response;
     }
     // All forms should set some meta data about the form.
     // Usually, you would want this meta data to remain the same.
     Theme::Set('form_id', 'ModuleForm');
     Theme::Set('form_action', 'index.php?p=module&mod=' . $this->type . '&q=Exec&method=EditMedia');
     Theme::Set('form_meta', '<input type="hidden" name="layoutid" value="' . $this->layoutid . '"><input type="hidden" id="iRegionId" name="regionid" value="' . $this->regionid . '"><input type="hidden" name="showRegionOptions" value="' . $this->showRegionOptions . '" /><input type="hidden" id="mediaid" name="mediaid" value="' . $this->mediaid . '">');
     // Extract the format from the raw node in the XLF
     $rawXml = new DOMDocument();
     $rawXml->loadXML($this->GetRaw());
     $formatNodes = $rawXml->getElementsByTagName('format');
     $formatNode = $formatNodes->item(0);
     $formFields = array();
     // Offer a choice of clock type
     $formFields[] = FormManager::AddCombo('clockTypeId', __('Clock Type'), $this->GetOption('clockTypeId'), array(array('clockTypeId' => '1', 'clockType' => 'Analogue'), array('clockTypeId' => '2', 'clockType' => 'Digital'), array('clockTypeId' => '3', 'clockType' => 'Flip Clock')), 'clockTypeId', 'clockType', __('Please select the type of clock to display.'), 'c');
     $formFields[] = FormManager::AddNumber('duration', __('Duration'), $this->duration, __('The duration in seconds this item should be displayed'), 'd', 'required');
     $formFields[] = FormManager::AddNumber('offset', __('Offset'), $this->GetOption('offset'), __('The offset in minutes that should be applied to the current time.'), 'o', NULL, 'offset-control-group');
     // Offer a choice of theme
     $formFields[] = FormManager::AddCombo('themeid', __('Theme'), $this->GetOption('theme'), array(array('themeid' => '1', 'theme' => 'Light'), array('themeid' => '2', 'theme' => 'Dark')), 'themeid', 'theme', __('Please select a theme for the clock.'), 't', 'analogue-control-group');
     $formFields[] = FormManager::AddMessage(sprintf(__('Enter a format for the Digital Clock below. e.g. [HH:mm] or [DD/MM/YYYY]. See the <a href="%s" target="_blank">format guide</a> for more information.'), HelpManager::Link('Widget', 'ClockFormat')), 'digital-control-group');
     $formFields[] = FormManager::AddMultiText('ta_text', NULL, $formatNode != NULL ? $formatNode->nodeValue : '', __('Enter a format for the clock'), 'f', 10, '', 'digital-control-group');
     Theme::Set('form_fields', $formFields);
     // Dependencies (some fields should be shown / hidden)
     $this->SetFieldDependencies();
     // Modules should be rendered using the theme engine.
     $this->response->html = Theme::RenderReturn('form_render');
     $this->response->dialogTitle = __('Edit Clock');
     $this->response->callBack = 'text_callback';
     // The response object outputs the required JSON object to the browser
     // which is then processed by the CMS JavaScript library (xibo-cms.js).
     if ($this->showRegionOptions) {
         $this->response->AddButton(__('Cancel'), 'XiboSwapDialog("index.php?p=timeline&layoutid=' . $this->layoutid . '&regionid=' . $this->regionid . '&q=RegionOptions")');
     } else {
         $this->response->AddButton(__('Cancel'), 'XiboDialogClose()');
     }
     $this->response->AddButton(__('Apply'), 'XiboDialogApply("#ModuleForm")');
     $this->response->AddButton(__('Save'), '$("#ModuleForm").submit()');
     // The response must be returned.
     return $this->response;
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:51,代码来源:clock.module.php

示例13: EditForm

 /**
  * Edit Form
  */
 public function EditForm()
 {
     $db =& $this->db;
     $user =& $this->user;
     $response = new ResponseManager();
     $helpManager = new HelpManager($db, $user);
     // Can we edit?
     if (Config::GetSetting('MODULE_CONFIG_LOCKED_CHECKB') == 'Checked') {
         trigger_error(__('Module Config Locked'), E_USER_ERROR);
     }
     $moduleId = Kit::GetParam('ModuleID', _GET, _INT);
     // Pull the currently known info from the DB
     $SQL = '';
     $SQL .= 'SELECT ModuleID, ';
     $SQL .= '   Name, ';
     $SQL .= '   Enabled, ';
     $SQL .= '   Description, ';
     $SQL .= '   RegionSpecific, ';
     $SQL .= '   ValidExtensions, ';
     $SQL .= '   ImageUri, ';
     $SQL .= '   PreviewEnabled ';
     $SQL .= '  FROM `module` ';
     $SQL .= ' WHERE ModuleID = %d ';
     $SQL = sprintf($SQL, $moduleId);
     if (!($row = $db->GetSingleRow($SQL))) {
         trigger_error($db->error());
         trigger_error(__('Error getting Module'));
     }
     Theme::Set('validextensions', Kit::ValidateParam($row['ValidExtensions'], _STRING));
     Theme::Set('imageuri', Kit::ValidateParam($row['ImageUri'], _STRING));
     Theme::Set('isregionspecific', Kit::ValidateParam($row['RegionSpecific'], _INT));
     Theme::Set('enabled_checked', Kit::ValidateParam($row['Enabled'], _INT) ? 'checked' : '');
     Theme::Set('preview_enabled_checked', Kit::ValidateParam($row['PreviewEnabled'], _INT) ? 'checked' : '');
     // Set some information about the form
     Theme::Set('form_id', 'ModuleEditForm');
     Theme::Set('form_action', 'index.php?p=module&q=Edit');
     Theme::Set('form_meta', '<input type="hidden" name="ModuleID" value="' . $moduleId . '" />');
     $form = Theme::RenderReturn('module_form_edit');
     $response->SetFormRequestResponse($form, __('Edit Module'), '350px', '325px');
     $response->AddButton(__('Help'), 'XiboHelpRender("' . $helpManager->Link('Module', 'Edit') . '")');
     $response->AddButton(__('Cancel'), 'XiboDialogClose()');
     $response->AddButton(__('Save'), '$("#ModuleEditForm").submit()');
     $response->Respond();
 }
开发者ID:abbeet,项目名称:server39,代码行数:47,代码来源:module.class.php

示例14: EditForm

 /**
  * Return the Edit Form as HTML
  * @return 
  */
 public function EditForm()
 {
     $db =& $this->db;
     $layoutid = $this->layoutid;
     $regionid = $this->regionid;
     $mediaid = $this->mediaid;
     // Can this user edit?
     if (!$this->auth->edit) {
         $this->response->SetError('You do not have permission to edit this media.');
         $this->response->keepOpen = false;
         return $this->response;
     }
     Theme::Set('form_id', 'ModuleForm');
     Theme::Set('form_action', 'index.php?p=module&mod=' . $this->type . '&q=Exec&method=EditMedia');
     Theme::Set('form_meta', '<input type="hidden" name="layoutid" value="' . $layoutid . '"><input type="hidden" id="iRegionId" name="regionid" value="' . $regionid . '"><input type="hidden" name="showRegionOptions" value="' . $this->showRegionOptions . '" /><input type="hidden" id="mediaid" name="mediaid" value="' . $mediaid . '">');
     // Get the embedded HTML out of RAW
     $rawXml = new DOMDocument();
     $rawXml->loadXML($this->GetRaw());
     Debug::LogEntry('audit', 'Raw XML returned: ' . $this->GetRaw());
     // Get the HTML Node out of this
     $textNodes = $rawXml->getElementsByTagName('embedHtml');
     $textNode = $textNodes->item(0);
     Theme::Set('embedHtml', $textNode->nodeValue);
     $textNodes = $rawXml->getElementsByTagName('embedScript');
     $textNode = $textNodes->item(0);
     Theme::Set('embedScript', $textNode->nodeValue);
     Theme::Set('duration', $this->duration);
     Theme::Set('durationFieldEnabled', $this->auth->modifyPermissions ? '' : ' readonly');
     // Is the transparency option set?
     if ($this->GetOption('transparency')) {
         Theme::Set('transparency_checked', 'checked');
     }
     //Output the form
     $form = Theme::RenderReturn('media_form_embedded_edit');
     if ($this->showRegionOptions) {
         $this->response->AddButton(__('Cancel'), 'XiboSwapDialog("index.php?p=timeline&layoutid=' . $layoutid . '&regionid=' . $regionid . '&q=RegionOptions")');
     } else {
         $this->response->AddButton(__('Cancel'), 'XiboDialogClose()');
     }
     $this->response->html = $form;
     $this->response->dialogTitle = 'Edit Embedded HTML';
     $this->response->dialogSize = true;
     $this->response->dialogWidth = '650px';
     $this->response->dialogHeight = '450px';
     $this->response->AddButton(__('Save'), '$("#ModuleForm").submit()');
     return $this->response;
 }
开发者ID:abbeet,项目名称:server39,代码行数:51,代码来源:embedded.module.php

示例15: LibraryAssignView

 /**
  * Show the library
  * @return 
  */
 function LibraryAssignView()
 {
     $db =& $this->db;
     $user =& $this->user;
     $response = new ResponseManager();
     //Input vars
     $mediatype = Kit::GetParam('filter_type', _POST, _STRING);
     $name = Kit::GetParam('filter_name', _POST, _STRING);
     // Get a list of media
     $mediaList = $user->MediaList(NULL, array('type' => $mediatype, 'name' => $name));
     $rows = array();
     // Add some extra information
     foreach ($mediaList as $row) {
         $row['duration_text'] = sec2hms($row['duration']);
         $row['list_id'] = 'MediaID_' . $row['mediaid'];
         $rows[] = $row;
     }
     Theme::Set('table_rows', $rows);
     // Render the Theme
     $response->SetGridResponse(Theme::RenderReturn('library_form_assign_list'));
     $response->callBack = 'LibraryAssignCallback';
     $response->pageSize = 5;
     $response->Respond();
 }
开发者ID:fignew,项目名称:xibo-cms,代码行数:28,代码来源:content.class.php


注:本文中的Theme::RenderReturn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。