demo20230512/Views/Partial/Management/CreateUser.cshtml
2023-05-12 10:20:28 +08:00

144 lines
7.8 KiB
Plaintext

<div class="survey_form" ng-style="{height: (Survey_Height + 2) * 28 + 24 + 'px'}" style="padding: 0 16px;">
<form name="form" style="position: relative; margin: 0 auto;" novalidate>
<div class="add_survey_body">
<div class="add_survey_header_title"></div>
<div class="survey_info">
<div class="title">
@Resource.StaticLabelUserInfo
</div>
<div class="survey_content">
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.StaticLabelUserName</label>
<div class="col">
<input type="text" name="accountName"
placeholder="@Resource.RequiredMessage"
required
@*ng-pattern="/^\w+$/"*@
ng-minlength="5"
ng-maxlength="25"
ng-model="user.UserName" />
</div>
<div class="validation_block">
<small ng-show="form.accountName.$dirty && form.accountName.$error.required">@Resource.RequiredMessage</small>
<small ng-show="form.accountName.$dirty && form.accountName.$error.pattern">@Resource.FormatNotMatch</small>
<small ng-show="form.accountName.$dirty && form.accountName.$error.minlength">@Resource.CharacterLessFive</small>
<small ng-show="form.accountName.$dirty && form.accountName.$error.maxlength">@Resource.CharacterGreaterTwentyFive</small>
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.StaticLabelUserPassword</label>
<div class="col">
<input type="password"
name="password"
placeholder="@Resource.RequiredMessage"
required
ng-model="user.Password" />
</div>
<div class="validation_block">
<small ng-show="form.password.$dirty && form.password.$error.required">@Resource.RequiredMessage</small>
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.StaticLabelUserPasswordRepeat</label>
<div class="col">
<input type="password"
name="confirmPassword"
ng-model="user.PasswordRepeat"
match="user.Password" />
</div>
<div class="validation_block">
<small ng-show="form.confirmPassword.$dirty && form.confirmPassword.$error.match">@Resource.PwValidationConfirmationMsg</small>
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.StaticLabelName</label>
<div class="col">
<input type="text"
name="name"
placeholder="@Resource.RequiredMessage"
required
ng-model="user.Name" />
</div>
<div class="validation_block">
<small ng-show="form.name.$dirty && form.name.$error.required">@Resource.RequiredMessage</small>
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.StaticLabelUserEmail</label>
<div class="col">
<input type="email" name="email"
placeholder="user@example.com"
required
ng-model="user.Email" />
</div>
<div class="validation_block">
<small ng-show="form.email.$dirty && form.email.$error.required">@Resource.RequiredMessage</small>
<small ng-show="form.email.$dirty && form.email.$error.email">@Resource.EmailValidateMsg</small>
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.StaticLabelUserPhoneNumber</label>
<div class="col">
<input type="text"
name="phoneNumber"
placeholder="@Resource.RequiredMessage"
required
ng-pattern="/[\d]{0,3}[\-]?[\d]{0,3}[\d]+[\-]?[\d]+[\-]?[\d]+/"
ng-model="user.PhoneNumber" />
</div>
<div class="validation_block">
<small ng-show="form.phoneNumber.$dirty && form.phoneNumber.$error.required">@Resource.RequiredMessage</small>
<small ng-show="form.phoneNumber.$dirty && form.phoneNumber.$error.pattern">@Resource.PhoneValidateMsg</small>
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.StaticLabelUserJob</label>
<div class="col">
<input type="text"
name="job"
placeholder="@Resource.RequiredMessage"
required
ng-model="user.Job" />
</div>
<div class="validation_block">
<small ng-show="form.job.$dirty && form.job.$error.required">@Resource.RequiredMessage</small>
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">@Resource.StaticLabelUserDepartment</label>
<div class="col">
<input type="text"
name="department"
placeholder="@Resource.RequiredMessage"
required
ng-model="user.Department" />
</div>
<div class="validation_block">
<small ng-show="form.department.$dirty && form.department.$error.required">@Resource.RequiredMessage</small>
</div>
</div>
</div>
</div>
<div class="survey_info survey_btn_wrap">
<div class="survey_content">
<div class="row">
<button class="header_button" style="float: left; margin-left: 16px;" ng-disabled="form.$invalid" ng-click="createUser()">
@Resource.StaticLabelGlobal_Save
</button>
<button class="header_button" style="margin-left: 16px;" ng-click="backToManagement()">
@Resource.StaticLabelGlobal_Cancel
</button>
</div>
</div>
</div>
</div>
</form>
</div>