GX-Task #50030 » disableDeleteLanguageButton.patch
src/admin/languages.php (revision ) | ||
---|---|---|
1256 | 1256 |
if(is_object($lInfo)) |
1257 | 1257 |
{ |
1258 | 1258 |
$editButton = '<a class="btn btn-primary btn-edit" href="' . xtc_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=edit') . '">' . BUTTON_EDIT . '</a>'; |
1259 |
$deleteButton = '<a class="btn btn-delete" href="' . xtc_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=delete') . '">' . BUTTON_DELETE . '</a>'; |
|
1259 |
|
|
1260 |
$deleteButton = '<a class="btn btn-delete" href="' . xtc_href_link(FILENAME_LANGUAGES, 'page=' . $_GET['page'] . '&lID=' . $lInfo->languages_id . '&action=delete') . '">' . BUTTON_DELETE . '</a>'; |
|
1261 |
|
|
1262 |
// Disable delete button if selected language is a system language |
|
1263 |
if($lInfo->languages_id === '1'|| $lInfo->languages_id === '2') |
|
1264 |
{ |
|
1265 |
$deleteButton = '<button class="btn btn-delete" disabled="disabled" title="'. TEXT_INFO_DISABLED_DELETE_BUTTON .'">' . BUTTON_DELETE . '</button>'; |
|
1266 |
} |
|
1267 |
|
|
1260 | 1268 |
$buttons = $editButton . $deleteButton; |
1261 | 1269 | |
1262 | 1270 |
$heading[] = array('text' => '<b>' . $lInfo->name . '</b>'); |
src/lang/english/original_sections/admin/languages.lang.inc.php (revision ) | ||
---|---|---|
33 | 33 |
'TEXT_INFO_LANGUAGE_SORT_ORDER' => 'Sort Order:', |
34 | 34 |
'TEXT_INFO_INSERT_INTRO' => 'Please enter the new language with its related data', |
35 | 35 |
'TEXT_INFO_DELETE_INTRO' => 'Are you sure you want to delete this language?', |
36 |
'TEXT_INFO_DISABLED_DELETE_BUTTON' => 'System languages could not be deleted.', |
|
36 | 37 |
'TEXT_INFO_HEADING_NEW_LANGUAGE' => 'New Language', |
37 | 38 |
'TEXT_INFO_HEADING_EDIT_LANGUAGE' => 'Edit Language', |
38 | 39 |
'TEXT_INFO_HEADING_DELETE_LANGUAGE' => 'Delete Language', |
src/lang/german/original_sections/admin/languages.lang.inc.php (revision ) | ||
---|---|---|
25 | 25 |
'TABLE_HEADING_STATUS' => 'Status', |
26 | 26 |
'TEXT_INCOMPLETE_LANGUAGES_HINT' => 'Folgende Sprachen sind nicht vollständig implementiert und können daher nicht aktiviert werden', |
27 | 27 |
'TEXT_INFO_DELETE_INTRO' => 'Sind Sie sicher, dass Sie die Sprache löschen möchten?', |
28 |
'TEXT_INFO_DISABLED_DELETE_BUTTON' => 'Systemsprachen können nicht gelöscht werden.', |
|
28 | 29 |
'TEXT_INFO_EDIT_INTRO' => 'Bitte führen Sie alle notwendigen Änderungen durch.', |
29 | 30 |
'TEXT_INFO_HEADING_DELETE_LANGUAGE' => 'Sprache löschen', |
30 | 31 |
'TEXT_INFO_HEADING_EDIT_LANGUAGE' => 'Sprache bearbeiten', |