Пример #1
0
 /**
  * Definition applied after the data is organised.. why's it here? because I want
  * to add elements on the fly.
  * @global moodle_page $PAGE
  */
 function definition_after_data()
 {
     $buttonarray = array();
     $buttonarray[] = $this->_form->createElement('submit', 'submitbutton', get_string($this->uistage->get_ui()->get_name() . 'stage' . $this->uistage->get_stage() . 'action', 'backup'), array('class' => 'proceedbutton'));
     if (!$this->uistage->is_first_stage()) {
         $buttonarray[] = $this->_form->createElement('submit', 'previous', get_string('previousstage', 'backup'));
     }
     $buttonarray[] = $this->_form->createElement('cancel', 'cancel', get_string('cancel'), array('class' => 'confirmcancel'));
     $this->_form->addGroup($buttonarray, 'buttonar', '', array(' '), false);
     $this->_form->closeHeaderBefore('buttonar');
     $this->_definition_finalized = true;
 }
Пример #2
0
 /**
  * Definition applied after the data is organised.. why's it here? because I want
  * to add elements on the fly.
  * @global moodle_page $PAGE
  */
 public function definition_after_data()
 {
     $buttonarray = array();
     $buttonarray[] = $this->_form->createElement('submit', 'submitbutton', get_string($this->uistage->get_ui()->get_name() . 'stage' . $this->uistage->get_stage() . 'action', 'backup'), array('class' => 'proceedbutton'));
     if (!$this->uistage->is_first_stage()) {
         $buttonarray[] = $this->_form->createElement('submit', 'previous', get_string('previousstage', 'backup'));
     } else {
         if ($this->uistage instanceof backup_ui_stage) {
             // Only display the button on the first stage of backup, they only place where it has an effect.
             $buttonarray[] = $this->_form->createElement('submit', 'oneclickbackup', get_string('jumptofinalstep', 'backup'), array('class' => 'oneclickbackup'));
         }
     }
     $buttonarray[] = $this->_form->createElement('cancel', 'cancel', get_string('cancel'), array('class' => 'confirmcancel'));
     $this->_form->addGroup($buttonarray, 'buttonar', '', array(' '), false);
     $this->_form->closeHeaderBefore('buttonar');
     $this->_definition_finalized = true;
 }
Пример #3
0
 /**
  * Definition applied after the data is organised.. why's it here? because I want
  * to add elements on the fly.
  * @global moodle_page $PAGE
  */
 function definition_after_data()
 {
     global $PAGE;
     $buttonarray = array();
     $buttonarray[] = $this->_form->createElement('submit', 'submitbutton', get_string($this->uistage->get_ui()->get_name() . 'stage' . $this->uistage->get_stage() . 'action', 'backup'), array('class' => 'proceedbutton'));
     if (!$this->uistage->is_first_stage()) {
         $buttonarray[] = $this->_form->createElement('submit', 'previous', get_string('previousstage', 'backup'));
     }
     $buttonarray[] = $this->_form->createElement('cancel', 'cancel', get_string('cancel'), array('class' => 'confirmcancel'));
     $this->_form->addGroup($buttonarray, 'buttonar', '', array(' '), false);
     $this->_form->closeHeaderBefore('buttonar');
     $config = new stdClass();
     $config->title = get_string('confirmcancel', 'backup');
     $config->question = get_string('confirmcancelquestion', 'backup');
     $config->yesLabel = get_string('confirmcancelyes', 'backup');
     $config->noLabel = get_string('confirmcancelno', 'backup');
     $PAGE->requires->yui_module('moodle-backup-confirmcancel', 'M.core_backup.watch_cancel_buttons', array($config));
 }
Пример #4
0
 public function __construct(backup_ui $ui, array $params = null)
 {
     parent::__construct($ui, $params);
 }
Пример #5
0
 /**
  * Gets the name of the stage we are on
  * @return string
  */
 public function get_stage_name()
 {
     return $this->stage->get_name();
 }