Skip to content

Commit

Permalink
Merge branch 'MDL-63653-master' of https://github.com/lucaboesch/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Nov 14, 2018
2 parents 79c4c80 + 3a7117b commit 0d8c3b7
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 15 deletions.
7 changes: 5 additions & 2 deletions admin/tool/xmldb/actions/edit_field/edit_field.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ function invoke() {
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="'.xmldb_field::NAME_MAX_LENGTH.'" maxlength="'.xmldb_field::NAME_MAX_LENGTH.'" id="name" value="' . s($field->getName()) . '" /></td></tr>';
}
// XMLDB field comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($field->getComment()) . '</textarea></td></tr>';
$o .= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2">
<textarea name="comment" rows="3" cols="80" id="comment" class="form-control">' .
s($field->getComment()) . '</textarea></td></tr>';
// xmldb_field Type
$typeoptions = array (XMLDB_TYPE_INTEGER => $field->getXMLDBTypeName(XMLDB_TYPE_INTEGER),
XMLDB_TYPE_NUMBER => $field->getXMLDBTypeName(XMLDB_TYPE_NUMBER),
Expand Down Expand Up @@ -167,7 +169,8 @@ function invoke() {
$o.= ' <tr valign="top"><td><label for="default" accesskey="d">Default:</label></td>';
$o.= ' <td colspan="2"><input type="text" name="default" size="30" maxlength="80" id="default" value="' . s($field->getDefault()) . '" /></td></tr>';
// Change button
$o.= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o .= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' . $this->str['change'] .
'" class="btn btn-secondary" /></td></tr>';
$o.= ' </table>';
$o.= '</div></form>';
// Calculate the buttons
Expand Down
7 changes: 5 additions & 2 deletions admin/tool/xmldb/actions/edit_index/edit_index.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ function invoke() {
}
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="'.xmldb_field::NAME_MAX_LENGTH.'" id="name"' . $disabled . ' value="' . s($index->getName()) . '" /></td></tr>';
// XMLDB key comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($index->getComment()) . '</textarea></td></tr>';
$o .= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2">
<textarea name="comment" rows="3" cols="80" id="comment" class="form-control">' .
s($index->getComment()) . '</textarea></td></tr>';
// xmldb_index Type
$typeoptions = array (0 => 'not unique',
1 => 'unique');
Expand All @@ -129,7 +131,8 @@ function invoke() {
$o.= ' <tr valign="top"><td><label for="hints" accesskey="h">Hints:</label></td>';
$o.= ' <td colspan="2"><input name="hints" type="text" size="40" maxlength="80" id="hints" value="' . s(implode(', ', $index->getHints())) . '" /></td></tr>';
// Change button
$o.= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o .= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .
$this->str['change'] . '" class="btn btn-secondary"/></td></tr>';
$o.= ' </table>';
$o.= '</div></form>';
// Calculate the buttons
Expand Down
7 changes: 5 additions & 2 deletions admin/tool/xmldb/actions/edit_key/edit_key.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ function invoke() {
}
$o.= ' <tr valign="top"><td><label for="name" accesskey="n">Name:</label></td><td colspan="2"><input name="name" type="text" size="'.xmldb_field::NAME_MAX_LENGTH.'" id="name"' . $disabled . ' value="' . s($key->getName()) . '" /></td></tr>';
// XMLDB key comment
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2"><textarea name="comment" rows="3" cols="80" id="comment">' . s($key->getComment()) . '</textarea></td></tr>';
$o .= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td colspan="2">
<textarea name="comment" rows="3" cols="80" id="comment" class="form-control">' .
s($key->getComment()) . '</textarea></td></tr>';
// xmldb_key Type
$typeoptions = array (XMLDB_KEY_PRIMARY => $key->getXMLDBKeyName(XMLDB_KEY_PRIMARY),
XMLDB_KEY_UNIQUE => $key->getXMLDBKeyName(XMLDB_KEY_UNIQUE),
Expand All @@ -139,7 +141,8 @@ function invoke() {
$o.= ' <tr valign="top"><td><label for="reffields" accesskey="t">Reffields:</label></td>';
$o.= ' <td colspan="2"><input name="reffields" type="text" size="40" maxlength="80" id="reffields" value="' . s(implode(', ', $key->getRefFields())) . '" /></td></tr>';
// Change button
$o.= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o .= ' <tr valign="top"><td>&nbsp;</td><td colspan="2"><input type="submit" value="' .
$this->str['change'] . '" class="btn btn-secondary"/></td></tr>';
$o.= ' </table>';
$o.= '</div></form>';
// Calculate the buttons
Expand Down
7 changes: 5 additions & 2 deletions admin/tool/xmldb/actions/edit_table/edit_table.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,11 @@ function invoke() {
} else {
$o.= ' <tr valign="top"><td><label for="name" accesskey="p">Name:</label></td><td><input name="name" type="text" size="'.xmldb_table::NAME_MAX_LENGTH.'" maxlength="'.xmldb_table::NAME_MAX_LENGTH.'" id="name" value="' . s($table->getName()) . '" /></td></tr>';
}
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td><textarea name="comment" rows="3" cols="80" id="comment">' . s($table->getComment()) . '</textarea></td></tr>';
$o.= ' <tr valign="top"><td>&nbsp;</td><td><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o .= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td>
<textarea name="comment" rows="3" cols="80" id="comment" class="form-control">' .
s($table->getComment()) . '</textarea></td></tr>';
$o .= ' <tr valign="top"><td>&nbsp;</td><td><input type="submit" value="' . $this->str['change'] .
'" class="btn btn-secondary"/></td></tr>';
$o.= ' </table>';
$o.= '</div></form>';
// Calculate the pending changes / save message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,11 @@ function invoke() {
$o .= ' <table id="formelements">';
$o.= ' <tr valign="top"><td>Path:</td><td>' . s($structure->getPath()) . '</td></tr>';
$o.= ' <tr valign="top"><td>Version:</td><td>' . s($structure->getVersion()) . '</td></tr>';
$o.= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td><textarea name="comment" rows="3" cols="80" id="comment">' . $structure->getComment() . '</textarea></td></tr>';
$o.= ' <tr><td>&nbsp;</td><td><input type="submit" value="' .$this->str['change'] . '" /></td></tr>';
$o .= ' <tr valign="top"><td><label for="comment" accesskey="c">Comment:</label></td><td>
<textarea name="comment" rows="3" cols="80" id="comment" class="form-control">' .
$structure->getComment() . '</textarea></td></tr>';
$o .= ' <tr><td>&nbsp;</td><td><input type="submit" value="' . $this->str['change'] .
'"class="btn btn-secondary" /></td></tr>';
$o.= ' </table>';
$o.= '</div></form>';
// Calculate the pending changes / save message
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ function invoke() {
// The textarea showing all the reserved words
$o.= ' <table id="formelements" class="boxaligncenter" cellpadding="5">';
$o.= ' <tr><td align="center">' . $this->str['listreservedwords'].'</td></tr>';
$o.= ' <tr><td><textarea cols="80" rows="32">';
$o .= ' <tr><td><textarea cols="80" rows="32" class="form-control">';
$o.= s(implode(', ', array_keys($reserved_words)));
$o.= '</textarea></td></tr>';
$o.= ' </table>';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ function invoke() {
$o.= ' </table>';
$o.= '</div></form>';
$o.= ' <table id="phpcode" class="boxaligncenter" cellpadding="5">';
$o.= ' <tr><td><textarea cols="80" rows="32">';
$o .= ' <tr><td><textarea cols="80" rows="32" class="form-control">';
// Based on current params, call the needed function
switch ($commandparam) {
case 'create_table':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function invoke() {
$o = $b;

$o.= ' <table id="formelements" class="boxaligncenter" cellpadding="5">';
$o.= ' <tr><td><textarea cols="80" rows="32">';
$o .= ' <tr><td><textarea cols="80" rows="32" class="form-control">';
// Get an array of statements
if ($starr = $DB->get_manager()->generator->getCreateStructureSQL($structure)) {
$starr = $dbman->generator->getEndedStatements($starr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function invoke() {
$o.= '</div></form>';

$o.= ' <table id="phpcode" class="boxaligncenter" cellpadding="5">';
$o.= ' <tr><td><textarea cols="80" rows="32">';
$o .= ' <tr><td><textarea cols="80" rows="32" class="form-control">';
// Check we have selected some field/key/index from the popup
if ($fieldkeyindexparam == 'fieldshead' || $fieldkeyindexparam == 'keyshead' || $fieldkeyindexparam == 'indexeshead') {
$o.= s($this->str['selectonefieldkeyindex']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function invoke() {
$o = $b;

$o.= ' <table id="formelements" class="boxaligncenter" cellpadding="5">';
$o.= ' <tr><td><textarea cols="80" rows="32">';
$o .= ' <tr><td><textarea cols="80" rows="32" class="form-control">';

// Get an array of statements
if ($starr = $DB->get_manager()->generator->getCreateTableSQL($table)) {
Expand Down

0 comments on commit 0d8c3b7

Please sign in to comment.