diff --git a/modules/backend/database/migrations/2014_10_01_000007_Db_Backend_Add_Description_Field.php b/modules/backend/database/migrations/2014_10_01_000007_Db_Backend_Add_Description_Field.php index ccd46f9f3..eae52a347 100644 --- a/modules/backend/database/migrations/2014_10_01_000007_Db_Backend_Add_Description_Field.php +++ b/modules/backend/database/migrations/2014_10_01_000007_Db_Backend_Add_Description_Field.php @@ -8,6 +8,7 @@ class DbBackendAddDescriptionField extends Migration public function up() { Schema::table('backend_user_groups', function (Blueprint $table) { + $table->string('code')->index(); $table->text('description')->nullable(); $table->boolean('is_new_user_default')->default(false); }); @@ -16,6 +17,7 @@ class DbBackendAddDescriptionField extends Migration public function down() { Schema::table('backend_user_groups', function (Blueprint $table) { + $table->dropColumn('code'); $table->dropColumn('description'); $table->dropColumn('is_new_user_default'); }); diff --git a/modules/backend/lang/en/lang.php b/modules/backend/lang/en/lang.php index af2c81101..d7b6348e0 100644 --- a/modules/backend/lang/en/lang.php +++ b/modules/backend/lang/en/lang.php @@ -99,6 +99,8 @@ return [ 'name_field' => 'Name', 'description_field' => 'Description', 'is_new_user_default_field' => 'Add new administrators to this group by default', + 'code_field' => 'Code', + 'code_comment' => 'Enter a unique code if you want to access it with the API.', 'menu_label' => 'Groups', 'list_title' => 'Manage Groups', 'new' => 'New Administrator Group', diff --git a/modules/backend/models/usergroup/fields.yaml b/modules/backend/models/usergroup/fields.yaml index 6da12d55f..1e382e750 100644 --- a/modules/backend/models/usergroup/fields.yaml +++ b/modules/backend/models/usergroup/fields.yaml @@ -6,6 +6,12 @@ fields: name: label: backend::lang.user.group.name_field + span: auto + + code: + label: backend::lang.user.group.code_field + comment: backend::lang.user.group.code_comment + span: auto description: label: backend::lang.user.group.description_field