Skip to content

Commit 51ae217

Browse files
authored
Capture user category for new mGAP users (#136)
1 parent 6145538 commit 51ae217

File tree

6 files changed

+27
-1
lines changed

6 files changed

+27
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE mGAP.userRequests ADD category varchar(1000);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ALTER TABLE mGAP.userRequests ADD category nvarchar(1000);

mGAP/resources/schemas/mgap.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,10 @@
362362
<columnTitle>Institution</columnTitle>
363363
<nullable>false</nullable>
364364
</column>
365+
<column columnName="category">
366+
<columnTitle>Category</columnTitle>
367+
<nullable>true</nullable>
368+
</column>
365369
<column columnName="reason">
366370
<columnTitle>Reason For Request</columnTitle>
367371
<nullable>false</nullable>

mGAP/resources/views/requestLogin.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@
5353
name: 'institution',
5454
width: 500,
5555
allowBlank: false
56+
},{
57+
xtype: 'ldk-simplecombo',
58+
labelWidth: 130,
59+
fieldLabel: 'Category',
60+
name: 'category',
61+
width: 500,
62+
allowBlank: false,
63+
storeValues: ['Academic/NPRC', 'Academic/Non-NPRC', 'Foundation', 'Industry', 'Other']
5664
},{
5765
xtype: 'textarea',
5866
labelAlign: 'top',

mGAP/src/org/labkey/mgap/mGAPController.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ public Object execute(RequestUserForm form, BindException errors) throws Excepti
197197
row.put("lastName", form.getLastName());
198198
row.put("title", form.getTitle());
199199
row.put("institution", form.getInstitution());
200+
row.put("category", form.getCategory());
200201
row.put("reason", form.getReason());
201202
row.put("container", mGAPManager.get().getMGapContainer().getId());
202203

@@ -259,6 +260,7 @@ public static class RequestUserForm
259260
private String lastName;
260261
private String title;
261262
private String institution;
263+
private String category;
262264
private String reason;
263265

264266
public void setEmail(String email)
@@ -321,6 +323,16 @@ public void setInstitution(String institution)
321323
this.institution = institution;
322324
}
323325

326+
public String getCategory()
327+
{
328+
return category;
329+
}
330+
331+
public void setCategory(String category)
332+
{
333+
this.category = category;
334+
}
335+
324336
public String getReason()
325337
{
326338
return reason;

mGAP/src/org/labkey/mgap/mGAPModule.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public String getName()
7171
@Override
7272
public Double getSchemaVersion()
7373
{
74-
return 16.67;
74+
return 16.68;
7575
}
7676

7777
@Override

0 commit comments

Comments
 (0)