5858 {
5959 linkList .SaveLink (Request .Form [" hdnId" ], Request .Form [" txtTitle" ], Request .Form [" txtUrl" ], Request .Form [" cbTarget" ]);
6060 }
61- @: < script type = " text/javascript" > window .parent .toastr .success (" Completed" );< / script >
61+ @:
62+ < script type = " text/javascript" > window .parent .toastr .success (" Completed" );< / script >
6263 }
6364 }
6465 if (settings != null && settings .Count > 0 )
7374 <link rel =" stylesheet" href =" ~/Content/bootstrap.min.css" >
7475 <link rel =" stylesheet" href =" ~/Content/font-awesome.min.css" >
7576 <link rel =" stylesheet" href =" ~/admin/themes/standard/css/styles.css" >
76- <style >
77- body { background-color : #fff ; }
78- .fa-times { color : #e45252 ; }
79- .fa-pencil { color : #25811a ;}
80- .links-row { margin : 20px 0 10px -15px ; padding-top : 10px ; border-top : 1px solid #ccc ; border-bottom : 1px solid #ccc ; }
81- .field-validation-error { background-color : #d9534f ; border-color : #d9534f ; color : #fff ; padding : 5px 15px ; display : block ; }
82- </style >
8377</head >
84- <body >
85- <form method =" post" >
86- <div class =" form-group" >
87- <label >@Resources.labels.numberOfDisplayedItems </label >
88- <input type =" text" class =" form-control" id =" txtNumberOfLinks" name =" txtNumberOfLinks" value =" @NumberOfLinks" />
78+ <body class =" widget-edit" >
79+ <div class =" widget-edit-linklist" >
80+ <form method =" post" >
81+ <div class =" form-group" >
82+ <label >@Resources.labels.numberOfDisplayedItems </label >
83+ <div class =" input-group" >
84+ <input type =" text" class =" form-control" id =" txtNumberOfLinks" name =" txtNumberOfLinks" value =" @NumberOfLinks" />
85+ <div class =" input-group-btn" >
86+ <button type =" submit" id =" btnSave" name =" btnSave" class =" btn btn-success" >@Resources.labels.save </button >
87+ </div >
88+ </div >
89+ </div >
8990 @Html.ValidationMessage( "txtNumberOfLinks")
90- </div >
91- <div >
92- <button type =" submit" id =" btnSave" name =" btnSave" class =" btn btn-success btn-sm pull-left" >
93- @Resources.labels.save
94- </button >
95- </div >
96- <div class =" clearfix" >  ; </div >
97- <div class =" row links-row" >
98- <div class =" col-xs-6 col-md-6" >
99- <div class =" form-content" >
91+ <hr />
92+ <div class =" form-group" >
93+ <input placeholder =" @Resources.labels.title" type =" text" class =" form-control" id =" txtTitle" name =" txtTitle" value =" @TitleAdd" />
94+ @Html.ValidationMessage( "txtTitle")
95+ </div >
96+ <div class =" form-group" >
97+ <input placeholder =" @Resources.labels.websiteUrl" type =" text" class =" form-control" id =" txtUrl" name =" txtUrl" value =" @LinkAdd" />
98+ @Html.ValidationMessage( "txtUrl")
99+ </div >
100+ <div class =" row" >
101+ <div class =" col-sm-6" >
100102 <div class =" form-group" >
101- <label >@Resources.labels.title </label >
102- <input type =" text" class =" form-control" id =" txtTitle" name =" txtTitle" value =" @TitleAdd" />
103- @Html.ValidationMessage( "txtTitle")
103+ @Html.CheckBox( "cbTarget", targetNew) Open in new window
104104 </div >
105+ </div >
106+ <div class =" col-sm-6" >
105107 <div class =" form-group" >
106108 @if (! string .IsNullOrEmpty (editId ))
107- {
108- <button type =" submit" id =" btnUpdate" name =" btnUpdate" formaction =" @updateLink" class =" btn btn-success btn-sm pull-left" >
109- @Resources.labels.update
110- </button >
109+ {
110+ <button type =" submit" id =" btnUpdate" name =" btnUpdate" formaction =" @updateLink" class =" btn btn-success" >@Resources.labels.update </button >
111111 }
112112 else
113113 {
114- <button type =" submit" id =" btnAdd" name =" btnAdd" class =" btn btn-success btn-sm pull-left" >
115- @Resources.labels.addLink
116- </button >
114+ <button type =" submit" id =" btnAdd" name =" btnAdd" class =" btn btn-success" >@Resources.labels.addLink </button >
117115 }
118116 </div >
119117 </div >
120118 </div >
121- <div class =" col-xs-6 col-md-6" >
122- <div class =" form-content" >
123- <div class =" form-group" >
124- <label >@Resources.labels.websiteUrl </label >
125- <input type =" text" class =" form-control" id =" txtUrl" name =" txtUrl" value =" @LinkAdd" />
126- @Html.ValidationMessage( "txtUrl")
127- </div >
128- <div class =" form-group" >
129- @Html.CheckBox( "cbTarget", targetNew) Open in new window
130- </div >
131- </div >
132- </div >
133- </div >
134-
135- <table class =" table table-striped" >
136- <thead >
137- <tr >
138- <th width =" 10%" >  ; </th >
139- <th width =" 35%" >@Resources.labels.title </th >
140- <th width =" 35%" >@Resources.labels.url </th >
141- <th width =" 20%" >@Resources.labels.newWindow </th >
142- </tr >
143- </thead >
144- <tbody >
145- @foreach ( var link in links )
119+ <table class =" table" >
120+ <thead >
121+ <tr >
122+ <th width =" 10%" >  ; </th >
123+ <th width =" 35%" >@Resources.labels.title </th >
124+ <th width =" 35%" >@Resources.labels.url </th >
125+ <th width =" 20%" >@Resources.labels.newWindow </th >
126+ </tr >
127+ </thead >
128+ <tbody >
129+ @foreach ( var link in links )
146130 {
147- <tr >
148- <td >
149- <
a href =
" ?id=@widgetId&[email protected] " title =
" @Resources.labels.edit" ><
i class =
" fa fa-pencil" ></
i ></
a >
  ; 150- <
a href =
" ?id=@widgetId&[email protected] " title =
" @Resources.labels.delete" ><
i class =
" fa fa-times" ></
i ></
a >
151- </td >
152- <td >@link.Title </td >
153- <td >@link.Url </td >
154- <td >
155- @if (link .Target == " on" )
156- {
157- <i class =" fa fa-check" ></i >
158- }
159- </td >
160- </tr >
161- }
162- @if (links .Count == 0 )
163- {
164- <tr ><td colspan =" 4" >@Resources.labels.empty </td ></tr >
165- }
166- </tbody >
167- </table >
168- <input type =" hidden" id =" hdnId" name =" hdnId" value =" @hdnId" />
169- </form >
131+ <tr >
132+ <td >
133+ <
a href =
" ?id=@widgetId&[email protected] " title =
" @Resources.labels.edit" ><
i class =
" fa fa-pencil" ></
i ></
a >
  ; 134+ <
a href =
" ?id=@widgetId&[email protected] " title =
" @Resources.labels.delete" ><
i class =
" fa fa-times" ></
i ></
a >
135+ </td >
136+ <td >@link.Title </td >
137+ <td >@link.Url </td >
138+ <td >
139+ @if (link .Target == " on" )
140+ {
141+ <i class =" fa fa-check" ></i >
142+ }
143+ </td >
144+ </tr >
145+ }
146+ @if (links .Count == 0 )
147+ {
148+ <tr ><td colspan =" 4" >@Resources.labels.empty </td ></tr >
149+ }
150+ </tbody >
151+ </table >
152+ <input type =" hidden" id =" hdnId" name =" hdnId" value =" @hdnId" />
153+ </form >
154+
155+ </div >
170156</body >
171157</html >
0 commit comments