Guest User

Untitled

a guest
Nov 22nd, 2018
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 6.12 KB | None | 0 0
  1. @model CapacityManagement.Prometric.Data.Services.AllocationRule
  2. @using CapacityManagement.Helpers
  3. @{
  4.     ViewBag.Title = Resources.Resources.EditPageTitle + " " + Html.DisplayTextFor(model => model.Name);
  5.    
  6. }
  7. <script src="../../Scripts/CPE_Zone_Dropdown.js" type="text/javascript"></script>
  8. <script type="text/javascript">
  9.     $(document).ready(function () {
  10.         //Date picker buttons
  11.         $('#@Html.IdFor(model => model.EffectiveStartDate)').datepicker({
  12.             showOn: "button"
  13.         });
  14.         $('#@Html.IdFor(model => model.EffectiveEndDate)').datepicker({
  15.             showOn: "button"
  16.         });
  17.         $('button.ui-datepicker-trigger').button({
  18.             text: false,
  19.             icons: {
  20.                 primary: 'ui-icon-calendar',
  21.                 secondary: ''
  22.             }
  23.         }).addClass('right');
  24.  
  25.         //slider
  26.         $("#slider").slider({
  27.             range: "min",
  28.             min: 0,
  29.             max: 100,
  30.             slide: function (event, ui) {
  31.                 $("#@Html.IdFor(model => model.Amount)").val("%" + ui.value);
  32.             }
  33.  
  34.         });
  35.  
  36.         //TODO: make this use proper selection syntax
  37.         $("input[type='radio']").change(function () {
  38.             var selection = $(this).val();
  39.             $("#slider").toggle();
  40.             $("#@Html.IdFor(model => model.Amount)").val('');
  41.         });
  42.     });
  43. </script>
  44. @using (Html.BeginForm())
  45. {
  46.     <div id="accordion" style="height: 610px">
  47.         <h3>
  48.             <a href="#">@Resources.Resources.EditAllocationRule @Html.DisplayTextFor(model => model.Name)</a></h3>
  49.         <div>
  50.             <fieldset>
  51.                 <table>
  52.                     <tr>
  53.                         <td>
  54.                             <div class="editor-label">
  55.                                 @Html.LabelFor(model => model.Name)
  56.                             </div>
  57.                         </td>
  58.                         <td colspan="3">
  59.                             <div class="editor-field">
  60.                                 @Html.EditorFor(model => model.Name)
  61.                                 @Html.ValidationMessageFor(model => model.Name)
  62.                             </div>
  63.                         </td>
  64.                     </tr>
  65.                     <tr>
  66.                         <td>
  67.                             <div class="editor-label">
  68.                                 @Resources.Resources.LabelEffectiveStartDate
  69.                             </div>
  70.                         </td>
  71.                         <td>
  72.                             <div class="editor-field">
  73.                                 @Html.TextBoxFor(model => model.EffectiveStartDate, new { @class = "jquery_datepicker", @Value = Model.EffectiveStartDate.ToString("dd/MM/yyyy") })
  74.                                 @Html.ValidationMessageFor(model => model.EffectiveStartDate)
  75.                             </div>
  76.                         </td>
  77.                         <td>
  78.                             <div class="editor-label">
  79.                                 @Resources.Resources.LabelEffectiveEndDate
  80.                             </div>
  81.                         </td>
  82.                         <td>
  83.                             <div class="editor-field">
  84.                                 @Html.TextBoxFor(model => model.EffectiveEndDate, new { @class = "jquery_datepicker", @Value = Model.EffectiveEndDate.ToString("dd/MM/yyyy") })
  85.                                 @Html.ValidationMessageFor(model => model.EffectiveEndDate)
  86.                             </div>
  87.                         </td>
  88.                     </tr>
  89.                 </table>
  90.             </fieldset>
  91.             <fieldset class="InputFieldSet">
  92.                 <legend>@Resources.Resources.LabelExamScopes</legend>
  93.                 @Html.Partial("_ExamDropDown")
  94.                 @Html.ExamGrid(Model, true)
  95.             </fieldset>
  96.             <fieldset class="InputFieldSet">
  97.                 <legend>@Resources.Resources.LabelZones</legend>
  98.                 @Html.Partial("_ZoneDropDown")
  99.                 @Html.ZoneGrid(Model, true)
  100.             </fieldset>
  101.             <fieldset>
  102.                 <table>
  103.                     <tr>
  104.                         <td>
  105.                             <div class="editor-label">
  106.                                 @Resources.Resources.LabelUnitOfMeasure
  107.                             </div>
  108.                         </td>
  109.                         <td>
  110.                             <div class="editor-field">
  111.                                 @Html.RadioButtonFor(model => model.UnitOfMeasure, "Hours")
  112.                                 Hours
  113.                                 @Html.RadioButtonFor(model => model.UnitOfMeasure, "Percentage")
  114.                                 Percentage
  115.                                 @Html.ValidationMessageFor(model => model.UnitOfMeasure)
  116.                             </div>
  117.                         </td>
  118.                     </tr>
  119.                     <tr>
  120.                         <td>
  121.                             <div class="editor-label">
  122.                                 @Html.LabelFor(model => model.Amount)
  123.                             </div>
  124.                         </td>
  125.                         <td>
  126.                             <div class="editor-field">
  127.                                 @Html.TextBoxFor(model => model.Amount)
  128.                                 @Html.ValidationMessageFor(model => model.Amount)
  129.                             </div>
  130.                         </td>
  131.                         <td>
  132.                             <div id="slider" style="width: 200px">
  133.                             </div>
  134.                         </td>
  135.                     </tr>
  136.                 </table>
  137.                 @Html.HiddenFor(model => model.Finalized)
  138.                 <div class="buttonP">
  139.                     <input type="submit" name="submit" value="@Resources.Resources.ButtonSave" />
  140.                     <input type="submit" name="submit" value="@Resources.Resources.ButtonCommit" />
  141.                     <input type="submit" name="submit" value="@Resources.Resources.ButtonDisable" />
  142.                 </div>
  143.             </fieldset>
  144.         </div>
  145.     </div>
  146. }
Add Comment
Please, Sign In to add comment