File tree Expand file tree Collapse file tree 3 files changed +25
-7
lines changed
AdminUI/LearningHub.Nhs.AdminUI Expand file tree Collapse file tree 3 files changed +25
-7
lines changed Original file line number Diff line number Diff line change @@ -164,7 +164,11 @@ public async Task<IActionResult> GetDevIdDetails(int resourceVersionId)
164164 public async Task < IActionResult > UpdateDevIdDetails ( ResourceVersionDevIdViewModel model )
165165 {
166166 var message = string . Empty ;
167- if ( await this . resourceService . DoesDevIdExistsAsync ( model . DevId ) )
167+ if ( string . IsNullOrEmpty ( model . DevId ) )
168+ {
169+ message = "Enter a Dev id for the resource" ;
170+ }
171+ else if ( await this . resourceService . DoesDevIdExistsAsync ( model . DevId ) )
168172 {
169173 message = "Duplicate" ;
170174 }
Original file line number Diff line number Diff line change 651651 {
652652 <!-- Alert Text -->
653653 <div class =" d-flex ml-5 my-2" >
654- <div id =" alertInfo" class =" alert alert-success" >Successfully updated the details </div >
654+ <div id =" alertInfo" class =" alert alert-success" >Successfully added the Dev ID . </div >
655655 </div >
656656 }
657657 @if (this .ViewBag .Status == " Duplicate" )
658658 {
659659 <div class =" d-flex ml-5 my-2" >
660- <div id =" alertInfo" class =" alert alert-danger" >Dev Id already exists .</div >
660+ <div id =" alertInfo" class =" alert alert-danger" >Dev ID already exists .</div >
661+ </div >
662+ }
663+ else if (this .ViewBag .Status == " Enter a Dev id for the resource" )
664+ {
665+ <div class =" d-flex ml-5 my-2" >
666+ <div id =" alertInfo" class =" alert alert-danger" >You must enter a Dev ID .</div >
661667 </div >
662668 }
663669 <div id =" devIdDetails" class =" pl-2" >
Original file line number Diff line number Diff line change 88 <form asp-controller =" Resource" asp-action =" UpdateDevIdDetails" method =" post" >
99 <div class =" row m-0" >
1010 <div class =" form-group col-4" >
11- <label asp-for =" DevId" class =" control-label" >Development Id</label >
12- <input asp-for =" DevId" class =" form-control" />
11+ <div class =" col-12" style =" padding-left :0px ;" >
12+ <dl >
13+ <dt >Dev ID: </dt >
14+ <dd >
15+ @Html.DisplayFor(model => model.DevId)
16+ </dd >
17+ </dl >
18+ </div >
19+ <label asp-for =" DevId" class =" control-label" >Add Dev ID</label >
20+ <input asp-for =" DevId" class =" form-control" maxlength =" 30" />
1321 <input type =" hidden" asp-for =" ResourceVersionId" />
1422 </div >
1523 </div >
1624 <div class =" form-group col-lg-2 d-flex flex-row justify-content-between" >
1725 <div >
18- <button type =" submit" class =" btn btn-common btn-success" >Save</button >
19- </div >
26+ <button type =" submit" class =" btn btn-common btn-success nhsuk-button " >Save</button >
27+ </div >
2028 </div >
2129 </form >
2230</div >
You can’t perform that action at this time.
0 commit comments