Skip to content

Commit

Permalink
Merge branch 'MDL-46481-master' of https://github.com/FMCorz/moodle
Browse files Browse the repository at this point in the history
Conflicts:
	theme/bootstrapbase/style/moodle.css
  • Loading branch information
Sam Hemelryk committed Oct 8, 2014
2 parents 6668936 + 70e7b63 commit 9ff1380
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 24 deletions.
19 changes: 4 additions & 15 deletions backup/util/ui/backup_moodleform.class.php
Expand Up @@ -55,22 +55,11 @@ public function __construct(backup_ui_stage $uistage, $action = null, $customdat
}
/**
* Initial backup user interface stage moodleform.
*
* Nothing to override we only need it defined so that moodleform doesn't get confused
* between stages.
*/
class backup_initial_form extends backup_moodleform {

/**
* We override the initial form to offer a one click backup option.
*/
public function definition() {
$mform = $this->_form;

$mform->addElement('header', 'backupheading', get_string('backup'));
$mform->addElement('html', html_writer::tag('p', get_string('performoneclickbackup_desc', 'backup')));
$mform->addElement('submit', 'oneclickbackup', get_string('performoneclickbackup', 'backup'));

parent::definition();
}
}
class backup_initial_form extends backup_moodleform {}
/**
* Schema backup user interface stage moodleform.
*
Expand Down
3 changes: 3 additions & 0 deletions backup/util/ui/base_moodleform.class.php
Expand Up @@ -123,6 +123,9 @@ function definition_after_data() {
$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 {
$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);
Expand Down
2 changes: 1 addition & 1 deletion backup/util/ui/tests/behat/behat_backup.php
Expand Up @@ -122,7 +122,7 @@ public function i_perform_a_quick_backup_of_course($backupcourse) {
$this->wait();

// Initial settings.
$this->find_button(get_string('performoneclickbackup', 'backup'))->press();
$this->find_button(get_string('jumptofinalstep', 'backup'))->press();
$this->wait();

// Waiting for it to finish.
Expand Down
5 changes: 2 additions & 3 deletions lang/en/backup.php
Expand Up @@ -164,21 +164,20 @@
$string['includeditems'] = 'Included items:';
$string['includesection'] = 'Section {$a}';
$string['includeuserinfo'] = 'User data';
$string['loglifetime'] = 'Keep logs for';
$string['includefilereferences'] = 'File references to external contents';
$string['jumptofinalstep'] = 'Jump to final step';
$string['locked'] = 'Locked';
$string['lockedbypermission'] = 'You don\'t have sufficient permissions to change this setting';
$string['lockedbyconfig'] = 'This setting has been locked by the default backup settings';
$string['lockedbyhierarchy'] = 'Locked by dependencies';
$string['loglifetime'] = 'Keep logs for';
$string['managefiles'] = 'Manage backup files';
$string['missingfilesinpool'] = 'Some files could not be saved during the backup, it won\'t be possible to restore them.';
$string['moodleversion'] = 'Moodle version';
$string['moreresults'] = 'There are too many results, enter a more specific search.';
$string['nomatchingcourses'] = 'There are no courses to display';
$string['norestoreoptions'] = 'There are no categories or existing courses you can restore to.';
$string['originalwwwroot'] = 'URL of backup';
$string['performoneclickbackup'] = 'Perform quick backup';
$string['performoneclickbackup_desc'] = 'Performing a quick backup will create a backup using the currently selected settings below. If you wish to further make choices regarding what sections or activities that you want to include in your backup, please process onto the "Next" step.';
$string['previousstage'] = 'Previous';
$string['preparingui'] = 'Preparing to display page';
$string['preparingdata'] = 'Preparing data';
Expand Down
5 changes: 4 additions & 1 deletion theme/base/style/core.css
Expand Up @@ -1067,7 +1067,10 @@ x#fitem_id_availabilityconditionsjson input[type=text] {
.backup-restore .detail-pair-value {display:inline-block;width:65%;padding:8px;margin:0;}
.backup-restore .detail-pair-value > .sub-detail {display:block;color:#1580B6;margin-left:2em;font-size:90%;font-style: italic;}
.backup-restore > .singlebutton {text-align:right;}
.path-backup .mform .fgroup .proceedbutton {float:right;margin-right:1%;}
.path-backup .mform .fgroup .proceedbutton,
.path-backup .mform .fgroup .oneclickbackup {float:right;margin-right:1%;}
.dir-rtl.path-backup .mform .fgroup .proceedbutton,
.dir-rtl.path-backup .mform .fgroup .oneclickbackup {float:left;margin-left:1%;margin-right: 0;}

.restore-course-search .rcs-results {width:70%;min-width:400px;border:1px solid #ddd;margin:5px 0;}
.restore-course-search .rcs-results table {width:100%;margin:0;border-width:0;}
Expand Down
25 changes: 22 additions & 3 deletions theme/bootstrapbase/less/moodle/backup-restore.less
Expand Up @@ -120,9 +120,15 @@
.backup-restore > .singlebutton {
text-align: right;
}
.path-backup .mform .fgroup .proceedbutton {
float: right;
margin-right: 5%;
.path-backup .mform .fgroup {
.proceedbutton {
float: right;
margin-right: 5%;

}
.oneclickbackup {
float: right;
}
}
.restore-course-search .rcs-results {
width: 70%;
Expand Down Expand Up @@ -229,3 +235,16 @@
height: 300px;
overflow-y: scroll;
}

.dir-rtl {
&.path-backup .mform .fgroup {
.proceedbutton {
float: left;
margin-left: 5%;
margin-right: 0;
}
.oneclickbackup {
float: left;
}
}
}
2 changes: 1 addition & 1 deletion theme/bootstrapbase/style/moodle.css

Large diffs are not rendered by default.

0 comments on commit 9ff1380

Please sign in to comment.