| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- @using IwbZero.ToolCommon.StringModel
- @using Abp.Extensions
- @using ContractService.Views.Shared.Modals
- @model ContractService.Views.Shared.Modals.Input
- @{
- string sm = Model.IsSm ? "input-group-sm" : "", search = string.IsNullOrEmpty(Model.SearchModalId) ? "" : "search-input", divId = string.IsNullOrEmpty(Model.DivId) ? "" : "id=\"" + Model.DivId + "\"";
- Model.Styles = Model.Styles.IsNullOrEmpty()|| !Model.Styles.Contains("width") ? "width:100%" : Model.Styles;
- }
- <div @(Html.Raw(divId)) class="input-group @(Html.Raw(sm)) @(Html.Raw(search)) @(Html.Raw(Model.DivSearchClass))" style="position: relative">
- @if (Model.InputType == InputTypes.List)
- {
- var ajax = "";
- if (Model.IsAjaxSelect)
- {
- ajax += "data-table-key=\"" + Model.TableKey + "\"";
- ajax += "data-column-key=\"" + Model.ColumnKey + "\"";
- ajax += "data-take-count=\"" + Model.TakeCount + "\"";
- ajax += string.IsNullOrEmpty(Model.FunResultTemplateName) ? "" : "data-fun-result-template-name=\"" + Model.FunResultTemplateName + "\"";
- Model.Class += " ajax-select";
- }
- var multiple = Model.IsMultiple ? "multiple" : "";
- <select class="@Model.Class @Model.Required" id="@Model.Id" name="@Model.Name" placeholder="@(Model.Placeholder)" value="@Model.Value" @multiple @Model.DataOptions @Model.Events @Model.Disabled @Model.ReadOnly style="@Model.Styles" @Model.Other @Html.Raw(ajax)>
- @Html.Raw(Model.SelectOptions)
- </select>
- if (!string.IsNullOrEmpty(Model.SearchModalId))
- {
- <div class="search-icon-box select-icon-box">
- @if (Model.Clear.NotEmpty())
- {
- <div class="search-icon input-group-text" title="@(L("Clean"))" style="" onclick="ClearSearchValue('@(Model.Target)','@(Model.Clear)');">
- <i class="fa fa-minus-square-o"></i>
- </div>
- }
- <div class="search-icon input-group-text" title="@(L("Search"))" style="" onclick="ShowQueryModal('@Model.SearchModalId','@(Model.Target)');">
- <i class="fa fa-search"></i>
- </div>
- </div>
- }
- }
- else if (Model.InputType == InputTypes.Textarea)
- {
- <textarea rows="5" class="@Model.Class @Model.Required" id="@Model.Id" name="@Model.Name" placeholder="@(Model.Placeholder)" data-placeholder="@(Model.Placeholder)" value="@Model.Value" @Model.DataOptions @Model.Events @Model.Disabled @Model.ReadOnly style="@Model.Styles" @Model.Other></textarea>
- }
- else if (Model.InputType == InputTypes.WangEditor)
- {
- <div class="iwb-wang-editor" id="wang-@Model.Id" data-id="@Model.Id" data-name="@Model.Name" data-menu="@Model.Other" data-opt="@Model.DataOptions" style="width:100%"></div>
- }
- else if (Model.InputType == InputTypes.File)
- {
- <div class="iwb-file">
- @{
- string infoId = Model.Id, nameId = Model.Id + "_name", extId = Model.Id + "_ext", isImage = "false", maxSize = "";
- if (Model.FileOption != null)
- {
- infoId = Model.FileOption.FileInfoField;
- nameId = Model.FileOption.FileNameField;
- extId = Model.FileOption.FileExtField;
- isImage = Model.FileOption.IsImage ? "true" : "false";
- maxSize = Model.FileOption.MaxSize + "";
- }
- }
- <input type="hidden" id="@(infoId)" name="@(infoId)" value="" />
- <input type="hidden" id="@(nameId)" name="@(nameId)" value="" />
- <input type="hidden" id="@(extId)" name="@(extId)" value="" />
- <input class="iwb-file-input" id="@(Model.Id)_file" type="file" placeholder="@(Model.Placeholder)" data-placeholder="@(Model.Placeholder)" onclick="FileUpload(this, { targetInfo: '@(infoId)', targetName: '@(nameId)', targetExt: '@(extId)', isImage: @(isImage), maxSize: '@(maxSize)' })">
- @* ReSharper disable once Html.IdNotResolved *@
- <label class="iwb-file-label" for="@(Model.Id)_file">@L("SelectFile")</label>
- <span class="clear" title="@(L("Clean"))" onclick="$(this).closest('.iwb-file').find('.iwb-file-input').iwbFileUpload('cleanFile')"><i class="fa fa-minus-square-o"></i></span>
- </div>
- }
- else
- {
- <input class="@Model.Class @Model.Required" id="@Model.Id" name="@Model.Name" type="@Model.TypeStr" placeholder="@(Model.Placeholder)" data-placeholder="@(Model.Placeholder)" @Model.DataOptions @Model.Events @Model.Disabled @Model.ReadOnly style="@Model.Styles" @Model.Other />
- if (!string.IsNullOrEmpty(Model.SearchModalId))
- {
- <div class="search-icon-box">
- @if (Model.Clear.NotEmpty())
- {
- <div class="search-icon input-group-text" title="@(L("Clean"))" style="" onclick="ClearSearchValue('@(Model.Target)','@(Model.Clear)');">
- <i class="fa fa-minus-square-o"></i>
- </div>
- }
- <div class="search-icon input-group-text" title="@(L("Search"))" style="" onclick="ShowQueryModal('@Model.SearchModalId','@(Model.Target)');">
- <i class="fa fa-search"></i>
- </div>
- </div>
- }
- }
- </div>
|