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


PHP LinkButton::createAccept方法代码示例

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


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

示例1: htmlReady

    $config = ExternConfig::GetInstance($range_id, '', $config_id);
    if ($config->deleteConfiguration()) {
        my_msg(sprintf(_("Konfiguration <strong>\"%s\"</strong> für Modul <strong>\"%s\"</strong> gelöscht!"), htmlReady($config->getConfigName()), htmlReady($GLOBALS['EXTERN_MODULE_TYPES'][$config->getTypeName()]['name'])), 'blank', 1, false);
    } else {
        my_error(_("Konfiguration konnte nicht gelöscht werden"));
    }
}

echo "<tr><td class=\"blank\" width=\"100%\" valign=\"top\">\n";

if (Request::option('com') == 'delete_sec') {
    $config = ExternConfig::GetConfigurationMetaData($range_id, $config_id);

    $message = sprintf(_("Wollen Sie die Konfiguration <b>&quot;%s&quot;</b> des Moduls <b>%s</b> wirklich löschen?"), $config["name"], $GLOBALS["EXTERN_MODULE_TYPES"][$config["type"]]["name"]);
    $message .= '<br><br>';
    $message .= LinkButton::createAccept("JA", URLHelper::getURL('?com=delete&config_id='.$config_id));
    $message .= LinkButton::createCancel("NEIN", URLHelper::getURL('?list=TRUE&view=extern_inst'));

    my_info($message, "blank", 1);
    print_footer();

    $template = $GLOBALS['template_factory']->open('layouts/base.php');
    $template->content_for_layout = ob_get_clean();
    echo $template->render();
    page_close();
    die;
}

$css_switcher = new cssClassSwitcher();

if (Request::option('com') == 'info') {
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:admin_extern.inc.php

示例2: execCommandAssertDeleteItem

 /**
 * Creates a delete-request
 *
 * @access   public
 * @return    boolean  false
 */
 function execCommandAssertDeleteItem()
 {
     $group =& $this->tree->getGroupObject($this->itemID);
     if ($group->getChildType() == "EvaluationQuestion") {
         $numberofchildren = $group->getNumberChildren();
     } else {
         $numberofchildren = $this->tree->getNumKidsKids($this->itemID);
     }
     $title = htmlready($group->getTitle());
     // constructing the message
     $this->msg[$this->itemID] = "info§";
     if ($group->getChildType() == "EvaluationQuestion") {
         if ($numberofchildren) {
             $this->msg[$this->itemID] .= "" . sprintf(_("Sie beabsichtigen den Fragenblock <b>%s</b> inklusive aller Fragen zu löschen. "), $title) . sprintf(_("Es werden insgesamt %s Fragen gelöscht!"), $numberofchildren);
         } else {
             $this->msg[$this->itemID] .= "" . sprintf(_("Sie beabsichtigen den Fragenblock <b>%s</b> inklusive aller Fragen zu löschen. "), $title);
         }
         $this->msg[$this->itemID] .= "<br>" . _("Wollen Sie diesen Fragenblock wirklich löschen?");
     } else {
         if ($numberofchildren) {
             $this->msg[$this->itemID] .= "" . sprintf(_("Sie beabsichtigen den Gruppierungsblock <b>%s</b> inklusive aller Unterblöcke zu löschen. "), $title) . sprintf(_("Es werden insgesamt %s Unterblöcke gelöscht!"), $numberofchildren);
         } else {
             $this->msg[$this->itemID] .= "" . sprintf(_("Sie beabsichtigen den Gruppierungsblock <b>%s</b> inklusive aller Unterblöcke zu löschen. "), $title);
         }
         $this->msg[$this->itemID] .= "<br>" . _("Wollen Sie diesen Gruppierungsblock wirklich löschen?");
     }
     $this->msg[$this->itemID] .= "<br><br>" . LinkButton::createAccept(_('JA!'), $this->getSelf('cmd[DeleteItem]=1'), array('title' => _('Löschen'))) . "&nbsp;" . LinkButton::createCancel(_('NEIN!'), $this->getSelf('cmd[Cancel]=1'), array('title' => _('Abbrechen'))) . "\n";
     return false;
 }
开发者ID:ratbird,项目名称:hope,代码行数:35,代码来源:EvaluationTreeEditView.class.php

示例3: delete_entry_action

 /**
  * Delete the submitted entry.
  * 
  * @param string $topic_id the entry to delete
  */
 function delete_entry_action($topic_id)
 {
     // get the page of the posting to be able to jump there again
     $page = ForumEntry::getPostingPage($topic_id);
     URLHelper::addLinkParam('page', $page);
     if (ForumPerm::hasEditPerms($topic_id) || ForumPerm::check('remove_entry', $this->getId(), $topic_id)) {
         $path = ForumEntry::getPathToPosting($topic_id);
         $topic = array_pop($path);
         $parent = array_pop($path);
         if ($topic_id != $this->getId()) {
             // only delete directly if passed by ajax, otherwise ask for confirmation
             if (Request::isXhr() || Request::get('approve_delete')) {
                 ForumEntry::delete($topic_id);
                 $this->flash['messages'] = array('success' => sprintf(_('Der Eintrag %s wurde gelöscht!'), $topic['name']));
             } else {
                 $this->flash['messages'] = array('info_html' => sprintf(_('Sind sie sicher dass Sie den Eintrag %s löschen möchten?'), $topic['name']) . '<br>' . \Studip\LinkButton::createAccept(_('Ja'), PluginEngine::getUrl('coreforum/index/delete_entry/' . $topic_id . '?approve_delete=1')) . \Studip\LinkButton::createCancel(_('Nein'), PluginEngine::getUrl('coreforum/index/index/' . ForumEntry::getParentTopicId($topic_id) . '/' . $page)));
             }
         } else {
             $this->flash['messages'] = array('success' => _('Sie können nicht die gesamte Veranstaltung löschen!'));
         }
     }
     if (Request::isXhr()) {
         $this->render_template('messages');
         $this->flash['messages'] = null;
     } else {
         $this->redirect(PluginEngine::getLink('coreforum/index/index/' . $parent['id'] . '/' . $page));
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:33,代码来源:index.php

示例4: testCreateAccept

 function testCreateAccept()
 {
     $this->assertEquals('<a class="accept button" href="?" name="accept" tabindex="0">Übernehmen</a>', '' . LinkButton::createAccept());
 }
开发者ID:ratbird,项目名称:hope,代码行数:4,代码来源:LinkButtonTest.php

示例5: _

?>
</span>
            <a href="<?php 
echo $disapprovalLink;
?>
" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-icon-only ui-dialog-titlebar-close">
                <span class="ui-button-icon-primary ui-icon ui-icon-closethick"></span>
                <span class="ui-button-text"><?php 
echo _('Schliessen');
?>
</span>
            </a>
        </div>
        <div class="content ui-widget-content ui-dialog-content studip-confirmation">
            <?php 
echo formatReady($question);
?>
        </div>
        <div class="buttons ui-widget-content ui-dialog-buttonpane">
            <div class="ui-dialog-buttonset">
                <?php 
echo LinkButton::createAccept(_('Ja'), $approvalLink);
?>
                <?php 
echo LinkButton::createCancel(_('Nein'), $disapprovalLink);
?>
            </div>
        </div>
    </div>    
</div>
开发者ID:ratbird,项目名称:hope,代码行数:30,代码来源:question.php

示例6: createSafeguard

 /**
  * creates the 'Safeguard'
  *
  * @access  private
  * @param sign   string Sign to draw (must be "ok" or "ausruf")
  * @param text   string        The Text to draw
  * @param evalID string needed if you want to delete an evaluation (not needed)
  */
 function createSafeguard($sign, $text, $mode = NULL, $evalID = NULL, $showrangeID = NULL, $referer = NULL)
 {
     //TODO: auf messagebox bzw. createQuestion umstellen!!!
     $label = array("referer" => _("Zum vorherigen Bereich zurückkehren."), "yes" => _("Ja!"), "no" => _("Nein!"), "delete" => _("Löschen."), "template" => _("Zu den eigenen Evaluationsvorlagen verschieben."), "cancel" => _("Abbrechen."));
     $html = "   <table align=\"center\" width=\"100%\" border=0 cellpadding=3 cellspacing=0>\n" . "   <tr>\n" . "    <td width=\"34\" valign=\"middle\" style=\"vertical-align:middle;\">\n";
     if ($sign != "") {
         if ($sign == 'ok') {
             $sign = 'messagebox/info.png';
         } elseif ($sign == 'ausruf') {
             $sign = 'messagebox/question.png';
         }
         $html .= Assets::img($sign, array('class' => 'middle'));
     }
     $html .= "    </td>\n";
     $html .= "    <td align=\"left\" valign=\"middle\" style=\"vertical-align:middle;\">\n";
     $html .= "     <span class=\"" . ($sign == "ausruf" ? "eval_error" : "eval_success") . "\"><br>" . $text . "</span><br><br>\n";
     if ($referer) {
         $linkreferer = "&referer=" . $referer;
     }
     if ($mode == "delete_request") {
         $value1 = "delete_confirmed";
         $value2 = "delete_aborted";
         $request = YES;
     }
     if ($mode == "restart_request") {
         $value1 = "restart_confirmed";
         $value2 = "restart_aborted";
         $request = YES;
     }
     if ($referer) {
         URLHelper::bindLinkParam('referer', $referer);
     }
     if ($request) {
         $html .= LinkButton::createAccept(_("Ja"), URLHelper::getURL('admin_evaluation.php?evalAction=' . $value1 . '&evalID=' . $evalID . '&rangeID=' . $showrangeID), array('title' => $label["yes"])) . "\n";
         $html .= LinkButton::createCancel(_("Nein"), URLHelper::getURL('admin_evaluation.php?evalAction=' . $value2 . '&evalID=' . $evalID . '&rangeID=' . $showrangeID), array('title' => $label["no"])) . "\n";
     }
     if ($mode == "unlink_delete_request") {
         $add_cancel = !$referer ?: "&referer=" . $referer;
         $links = array(URLHelper::getURL('admin_evaluation.php?evalAction=delete_confirmed&evalID=' . $evalID . '&rangeID=' . $showrangeID), URLHelper::getURL('admin_evaluation.php?evalAction=unlink_delete_aborted&evalID=' . $evalID . '&rangeID=' . $showrangeID), URLHelper::getURL('admin_evaluation.php?evalAction=unlink_and_move&evalID=' . $evalID . '&rangeID=' . $showrangeID . $add_cancel));
         $html .= LinkButton::create(_('Löschen'), $links[0], array('title' => $label["delete"])) . "\n";
         $html .= LinkButton::create(_('Verschieben'), $links[1], array('title' => $label["template"])) . "\n";
         $html .= LinkButton::createCancel(_('Abbrechen'), $links[2], array('title' => $label["cancel"])) . "\n";
         $html .= "<br><br>";
     }
     $html .= "    </td>\n" . "   </tr>\n";
     if ($referer) {
         $html .= "    <tr><td>&nbsp;</td><td><a href=\"" . URLHelper::getLink($referer) . "\">" . $label["referer"] . "</a></td></tr>";
     }
     $html .= "   </table>\n";
     return $html;
 }
开发者ID:ratbird,项目名称:hope,代码行数:59,代码来源:evaluation_admin_overview.lib.php

示例7: execCommandAssertDeleteItem

 function execCommandAssertDeleteItem(){
     $item_id = Request::option('item_id');
     if ($this->isParentAdmin($item_id)){
         $this->mode = "AssertDeleteItem";
         $this->open_items[$item_id] = true;
         $this->msg[$item_id] = "info§" ._("Sie beabsichtigen diesen Bereich inklusive aller Unterbereiche zu löschen. ")
         . sprintf(_("Es werden insgesamt %s Bereiche gelöscht!"),count($this->tree->getKidsKids($item_id))+1)
         . "<br>" . _("Wollen Sie diese Bereiche wirklich löschen?") . "<br>"
         . LinkButton::createAccept(_('JA!'),
                 URLHelper::getURL($this->getSelf('cmd=DeleteItem&item_id='.$item_id)),
                 array('title' => _('löschen')))
         . "&nbsp;"
         . LinkButton::createCancel(_('NEIN!'),
                 URLHelper::getURL($this->getSelf('cmd=Cancel&item_id='. $item_id)),
                 array('title' => _('abbrechen')));
     }
     return false;
 }
开发者ID:ratbird,项目名称:hope,代码行数:18,代码来源:StudipSemTreeViewAdmin.class.php

示例8: execCommandAssertDeleteItem

 function execCommandAssertDeleteItem()
 {
     $item_id = Request::option('item_id');
     if ($this->isParentAdmin($item_id)) {
         $this->mode = "AssertDeleteItem";
         $this->msg[$item_id] = "info§" . _("Sie beabsichtigen dieses Element, inklusive aller Unterelemente, zu löschen. ") . sprintf(_("Es werden insgesamt %s Elemente gelöscht!"), count($this->tree->getKidsKids($item_id)) + 1) . "<br>" . _("Wollen Sie diese Elemente wirklich löschen?") . "<br>" . '<div class="button-group">' . LinkButton::createAccept(_("JA"), URLHelper::getURL($this->getSelf("cmd=DeleteItem&item_id={$item_id}"))) . LinkButton::createCancel(_("NEIN"), URLHelper::getURL($this->getSelf("cmd=Cancel&item_id={$item_id}"))) . "</div>";
     }
     return false;
 }
开发者ID:ratbird,项目名称:hope,代码行数:9,代码来源:StudipRangeTreeViewAdmin.class.php

示例9: Statusgruppe

    $statusgruppe->getMessages(array());
}

// ask, if the user really intends to delete the role
if (Request::option('cmd') == 'deleteRole') {
    $statusgruppe = new Statusgruppe(Request::option('role_id'));
    if (Request::get('really')) {
        $statusgruppe->delete();
        $message = sprintf(_('Die Gruppe %s wurde gelöscht!'),
                           htmlReady($statusgruppe->getName()));
        PageLayout::postMessage(MessageBox::success($message));
    } else {
        $message  = sprintf(_('Sind Sie sicher, dass Sie die Gruppe %s löschen möchten?'),
                            '<b>'. htmlReady($statusgruppe->getName()) .'</b>');
        $message .= '<br>';
        $message .= LinkButton::createAccept(_('JA!'), URLHelper::getURL('', array('cmd' => 'deleteRole', 'really' => 'true', 'role_id' => Request::option('role_id'))));
        $message .= '&nbsp;&nbsp;&nbsp;&nbsp;';
        $message .= LinkButton::createCancel(_('NEIN!'), URLHelper::getURL(''));

        PageLayout::postMessage(MessageBox::info($message));
    }
}

// adding a new role
if (Request::option('cmd') == 'addRole' && !Request::submitted('choosePreset')) {
    // to prevent url-hacking for changing the data of an existing role
    $role_id = md5(uniqid(rand()));
    if (!Statusgruppe::roleExists($role_id)) {
        $new_role = new Statusgruppe();

        // this is necessary, because it could be the second try to add after the user has corrected errors
开发者ID:ratbird,项目名称:hope,代码行数:31,代码来源:admin_statusgruppe.php


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