Skip to content
Snippets Groups Projects
Select Git revision
  • efc82aad19df21bb515c5b6ca08a46ab58ce3da9
  • master default protected
  • Legacy_Php7
3 results

act_delete.php

Blame
  • act_delete.php 3.41 KiB
    <?php
    
    /* ######################################################################
    
      IML DEPLOYMENT
    
      webgui - delete
    
      Maybe we can delete file (see inc_functions.php there is the menu).
      Cleanup will be done in build method.
    
      ---------------------------------------------------------------------
      2014-03-24  Axel <axel.hahn@iml.unibe.ch>
      ###################################################################### */
    
    require_once("./classes/project_gui.class.php");
    require_once("./classes/formgen.class.php");
    
    $oPrj = new projectgui($sPrj);
    
    $sOut = '<h3>' . t('page-delete-project-info') . '</h3>';
    
    
    if (!array_key_exists("confirm", $aParams)) {
    
        // ----- form to confirm deletion
    
        $sOut .= '<p>' . t('page-delete-project-introtext') . '</p>'
                . $oPrj->renderVersionUsage() . '<br><br>';
    
    
        $i = 0;
        $aForms = array(
            'setup' => array(
                'meta' => array(
                    'method' => 'POST',
                    'action' => '?',
                ),
                'validate' => array(),
                'form' => array(
                    'input' . $i++ => array(
                        'type' => 'hidden',
                        'name' => 'confirm',
                        'value' => '1',
                    ),
                    'input' . $i++ => array(
                        'type' => 'checkbox',
                        'name' => 'removeOptions',
                        'label' => t("page-delete-remove-options"),
                        'validate' => 'isastring',
                        'value' => 1,
                        'options' => array(
                            'bRemoveRepolinks' => array(
                                'label' => t("page-delete-cb-label-remove-links-for-repo"),
                                'checked' => false,
                            ),
                            'bRemoveArchive' => array(
                                'label' => t("page-delete-cb-label-remove-archive"),
                                'checked' => false,
                            ),
                            'bRemoveConfig' => array(
                                'label' => t("page-delete-cb-label-remove-config"),
                                'checked' => true,
                            ),
                        ),
                    ),
                    'markup' . $i++ => array(
                        'type' => 'markup',
                        'value' => '<hr>',
                    ),